epic: add built-in agent support#1145
Merged
geoffjay merged 23 commits intofeature/autonomous-pipelinefrom Apr 17, 2026
Merged
Conversation
- Add m20260415_000013_add_builtin_to_agents migration (INTEGER NOT NULL DEFAULT 0) - Add built_in: i32 field to agent entity - Add built_in: bool field to Agent struct and AgentResponse - Update model_to_agent() and storage add() to persist/read the field - Add built_in?: boolean to TypeScript Agent interface - CreateAgentRequest intentionally omits built_in (system-only field)
…-agents endpoint - GET /agents now excludes built_in agents by default - ?include_builtin=true opts in to seeing all agents - Add GET /system-agents returning only built_in=true agents - list_paginated() gains built_in_filter: Option<bool> parameter - AgentStorage::list_system_agents() fetches only system agents - AgentManager::list_system_agents() delegates to storage - OrchestratorClient::list_system_agents() hits GET /system-agents - debug_agents endpoint unchanged (shows all agents)
- Add system_agents.rs with SYSTEM_AGENT_NAME constant and build_system_agent_config() - System agent uses sonnet model, AllowList tool policy (read-only), joins 'system' room - Includes inline system prompt covering agentd architecture and services - AgentManager::bootstrap_system_agents() spawns/restarts system agent after reconcile - spawn_agent() gains built_in: bool parameter; API always passes false - terminate_agent() guards against deleting built_in agents (returns error) - bootstrap_system_agents() called from main.rs after reconcile()
- system_agent_prompt covers: service inventory with ports, agent lifecycle, status/activity states, built-in agent concept, CLI operations, communicate rooms, memory service, diagnostics guide, metrics/observability, tool policy - version prepended dynamically via env!(CARGO_PKG_VERSION) at build time - tool policy documented with rationale for each allowed category - AllowList entries align with prompt documentation (update both in tandem) - prompt targets <6000 tokens
- Add 'agent system-agents list' — fetch from GET /system-agents - Add 'agent system-agents get <id|name>' — resolve by UUID or name - Add 'agent system-agents message <id> <text>' — send prompt to system agent - Add 'agent system-agents status' — compact table of name/status/model/activity - All subcommands support --json output mode - Add --include-builtin flag to 'agent list' (passes ?include_builtin=true) - OrchestratorClient::list_agents_filtered() added for include_builtin support - system_agents command registered in Commands enum and dispatched via orchestrator URL
- AgentsPage renders SystemAgentList above AgentList
- SystemAgentList fetches from GET /system-agents with 10s auto-refresh
- Shows name (with 'system' badge), status, model, rooms columns
- Collapsible panel with refresh button; distinguishes loading/error/empty states
- Clicking a row navigates to /agents/{id} detail page (same as user agents)
- No create/delete actions exposed (built-in agents are not user-managed)
- useSystemAgents hook follows same pattern as useAgents
- OrchestratorClient.listSystemAgents() added (GET /system-agents)
- AgentConfig TS interface gains rooms?: string[]
Adds 10 HTTP integration tests covering the full system-agent feature surface via tower::ServiceExt::oneshot (no real TCP). Includes a NullBackend to avoid external dependencies. Also fixes terminate_agent handler to return 403 Forbidden (not 500) when attempting to delete a built-in system agent. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This was referenced Apr 17, 2026
test(orchestrator): integration tests for system agent lifecycle
feat(ui): add system agents section to agents page
feat(cli): add system-agents subcommand
feat(orchestrator): finalize system agent system prompt and tool policy
feat(orchestrator): define system agent config and spawn at startup
feat(orchestrator): filter built-in agents from list API, add /system-agents endpoint
feat(orchestrator): add built_in flag to agent schema and storage layer
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rollup PR tracking all sub-issues for the built-in agent epic.
Sub-issues (implemented as stacked branches on top of this):
Closes #1144