Skip to content

feat(agents): Agent Designer Phase 1 — /agents surface (dark)#592

Merged
philmerrell merged 1 commit into
developfrom
feature/agent-designer-agents-router
Jul 8, 2026
Merged

feat(agents): Agent Designer Phase 1 — /agents surface (dark)#592
philmerrell merged 1 commit into
developfrom
feature/agent-designer-agents-router

Conversation

@philmerrell

Copy link
Copy Markdown
Contributor

Agent Designer — Phase 1, PR-3 (the /agents surface, dark)

Builds on #591. Adds the governed Agent read/write surface — a thin alias over the evolved assistant store returning the Agent shape (modelConfig + bindings) via compat.to_agent_view. Deploys dark: the whole surface 404s until AGENTS_API_ENABLED=true, and /assistants/* is completely unaffected.

What's here

  • feature_flags.agents_enabled()AGENTS_API_ENABLED, default off (the MEMORY_SPACES_ENABLED incremental-build pattern). require_agents_enabled 404-gates every route.
  • app_api/agents/routes.pydraft, create, list, get, update, delete, and the 4 shares endpoints. Each delegates to the same apis.shared.assistants service functions and identity-based access gates as /assistants, then reprojects to AgentResponse. create/update run the PR-2 binding_validation.
  • AgentResponse / AgentsListResponse / AgentSharesResponseagentId == assistantId; legacy ids valid unchanged.
  • main.py mounts the router.

Scope decisions

  • test-chat + document sub-routes excluded. test-chat is the sole reason the assistants router is on the architecture import-boundary allow-list; aliasing it would force a second exception. Those stay on /assistants/*.
  • GET /agents = owner + shared-with-me. include_public/pagination parity is deferred to the Phase-4 Designer that will actually consume the list. The detail GET carries full bindings, which is what matters now.

Testing

47 tests pass (12 new agent-route tests: 404-gate, agentId/bindings/modelConfig projection, CRUD permission gating, shares) + /assistants regression + the architecture import-boundary gate. App boots with all 4 route groups mounted.

Next

  • PR-4: dogfood — make Oliver a real Agent with a memory_space binding (flip the flag in dev, create the record, docs). Its binding goes live when Phase 3 harness resolution lands.

🤖 Generated with Claude Code

Phase 1 (PR-3). A governed Agent read/write surface over the evolved assistant
store: same shared service functions and identity-based access gates as
/assistants, but returning the Agent shape (compat.to_agent_view -> AgentResponse)
so callers see modelConfig + bindings. Legacy ids valid unchanged.

- feature_flags.agents_enabled(): AGENTS_API_ENABLED, default OFF (memory-spaces
  pattern) — surface 404s while off, ships incrementally, /assistants unaffected
- app_api/agents/routes.py: require_agents_enabled 404-gate; draft/create/list/
  get/update/delete + 4 shares endpoints, delegating to apis.shared.assistants
  service and reprojecting via to_agent_view; create/update run binding_validation
- AgentResponse/AgentsListResponse/AgentSharesResponse (agentId == assistantId)
- main.py mounts the router
- test-chat + document sub-routes deliberately excluded (would force a 2nd
  architecture import-boundary exception); list is owner+shared (public/pagination
  parity deferred to the Phase-4 Designer)
- tests: 404-gate, agentId/bindings projection, CRUD permission gating, shares

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@philmerrell philmerrell merged commit 4403040 into develop Jul 8, 2026
4 checks passed
@philmerrell philmerrell deleted the feature/agent-designer-agents-router branch July 8, 2026 01:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant