Engineering/AI documentation
Agent Detail Panels
Selected agent details expose overview, identity, memory, and permission information for that agent.
Concepts: a2a
Implementation Summary
Selected agent details expose overview, identity, memory, and permission information for that agent.
Frontend Surface
frontend/src/components/agents/AgentsView.tsxbackend/app/core/agent_identity.pybackend/app/core/agent_learning.pybackend/app/core/agent_memory.pybackend/app/core/permissions.py
State, API, And Backend Contracts
Stores
frontend/src/stores/agentStore.ts
API And Backend
backend/app/api/routes/agents.py
Architecture Notes
- The feature is mounted through
frontend/src/components/agents/AgentsView.tsxand the UI navigation path recorded in the inventory. - Shared detail access policy lives in
backend/app/api/agent_project_scope.py, with the route layer passing active project ids fromfrontend/src/lib/api.ts. - Detail, identity, prompt diagnostic, learning, and memory reads must include the active project for non-admin users. The backend verifies that project-scoped agents belong to that project before returning agent data.
- Detail panel mutations are project-owned operations. The UI only exposes pause/resume, delete, identity-save, permissions toggles, export, and import for agents whose
project_idmatches the active project when the shared role-capability contract says the user is a global admin or active-project admin. Every corresponding API call includes that active project id. - The embedded steering input follows the current backend steering contract and is mounted only for global-admin-capable sessions.
- The backend rejects project-facing detail mutations when
project_idis missing, when the id belongs to another project, or when the target is a universal/system agent whose mutable state is shared outside the current project. - Structured agent learnings are stored and retrieved only with an explicit project id. Project task failures or review feedback must not append private project content into universal persona MEMORY overlays.
- Agent-run and manually-run skill outputs are stored as candidate/provisional Research Spine artifacts unless exact source spans are available for governed coding and later reliability/reconciliation gates accept them. Agent detail and work history must not imply those artifacts are reportable before Done-task approval.
- Custom workers never write
TaskStatus.DONE. Successful agent execution ends in the normal In Review flow, while a task whose project cannot be resolved is markedIN_REVIEWwithneeds_revisionand an explicit human-facing failure reason. Only the human approval route may create approved Done state. - Custom-worker execution failures persist
retry_countandlast_retry_at, respect bounded exponential backoff before another pickup, and return retryable failures to Backlog with a terminal realtimeretry_scheduledoutcome. Oncemax_retriesis reached, the worker creates asystem_failedreview event, moves the task toIN_REVIEW, preserves any existing humanwhat_to_reviewinstruction, and emits an explicit terminal error outcome for the live Kanban/status UI. - Self-evolution candidate scans, auto-evolution, and promotion mutations require an explicit active project id. The route and engine reject paused or missing projects before returning candidates or writing persona-file promotions, so one project's evidence cannot mature or mutate another project's agent behavior.
- Agent promotion review notifications are persisted with the selected agent's owning project id and project metadata. Review queues must not create global notification records from project-owned agent improvement activity.
- Universal agent runtime memory is not exposed in project detail panels for non-admin users; project-specific notes should be read through the project-scoped memory APIs.
- The frontmatter and manifest entries are the durable contract for agents updating this page after code changes.
- When the referenced component, store, route, agent, skill, or test behavior changes, regenerate and validate the feature documentation.
Agents, Skills, LLM, MCP, And Permissions
- Agent-to-agent behavior should be traced through agent stores, A2A routes, permissions, and review surfaces before changing assumptions.
Tests And Verification
tests/test_agents.pyverifies active-project guards for detail, identity, memory, recent logs, promotion requests, A2A messages, and that custom-worker orphan failures cannot bypass human-only Done.tests/test_task_review_history.pyverifies timezone-safe custom-worker retry backoff, bounded retry escalation, preserved human review context, and terminal realtime failure events.tests/test_agent_mutation_scope.pyverifies detail-panel mutation routes reject missing, stale cross-project, and universal/system agent ids.tests/test_agent_scope_contracts.pyverifies that detail-panel mutation calls keep active-project scope in the frontend API, store, view, and backend route layer.tests/test_agent_learning_scope.pyverifies that structured learnings, resolution lookup, self-evolution promotion candidates, and paused-project self-evolution guards do not cross project boundaries.tests/test_project_scope_contracts.pyverifies the notification write contract for promotion requests and the shared category surfaces.
Related Features
Related Concepts
Compass Evidence
- Spec/task: CF-SPEC-60 / CF-776; CF-SPEC-68 / CF-870; CF-SPEC-83 / CF-1075; CF-SPEC-89 / CF-1125; CF-SPEC-129
- Inventory source:
docs/features/inventory.json
When To Update
- Update this page whenever the listed UI components, stores, routes, model behavior, permissions, or tests change.
- Regenerate the site and machine manifests with
python scripts/feature_docs.py --seed-missing --generate-site --check.