feat(agents): Agent Designer Phase 1 — /agents surface (dark)#592
Merged
Conversation
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>
This was referenced Jul 8, 2026
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.
Agent Designer — Phase 1, PR-3 (the
/agentssurface, 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) viacompat.to_agent_view. Deploys dark: the whole surface 404s untilAGENTS_API_ENABLED=true, and/assistants/*is completely unaffected.What's here
feature_flags.agents_enabled()—AGENTS_API_ENABLED, default off (theMEMORY_SPACES_ENABLEDincremental-build pattern).require_agents_enabled404-gates every route.app_api/agents/routes.py—draft,create,list,get,update,delete, and the 4sharesendpoints. Each delegates to the sameapis.shared.assistantsservice functions and identity-based access gates as/assistants, then reprojects toAgentResponse.create/updaterun the PR-2binding_validation.AgentResponse/AgentsListResponse/AgentSharesResponse—agentId == assistantId; legacy ids valid unchanged.main.pymounts the router.Scope decisions
test-chat+ document sub-routes excluded.test-chatis 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 detailGETcarries full bindings, which is what matters now.Testing
47 tests pass (12 new agent-route tests: 404-gate,
agentId/bindings/modelConfigprojection, CRUD permission gating, shares) +/assistantsregression + the architecture import-boundary gate. App boots with all 4 route groups mounted.Next
memory_spacebinding (flip the flag in dev, create the record, docs). Its binding goes live when Phase 3 harness resolution lands.🤖 Generated with Claude Code