feat: the orchestrating agent
Entry point for the estate: understands a request, consults the specialists that can settle it, composes one answer. LangGraph 1.2.11, a2a-sdk 1.1.2, both current as of August 2026. It holds no data, and the realm is what enforces that rather than the prompt. classic-models-agent-assistant is granted two optional scopes — one per specialist, plus the inference endpoint — and every domain audience it could request comes back Invalid scopes. An injection that succeeds here finds no path to a domain because there is none. "No scopes at all" was too absolute: the agent has to reason, and inference is not a domain. The two-hop token chain was the heaviest unproven thing in the design and it holds: sub stays the end user through all four hops, so their own roles apply at the far end and the MCP server filters tool discovery for the right human. azp names the last agent, not the first — Keycloak accepts actor_token and emits no act claim, so an orchestrator's identity survives only in the traces. Verified end to end: a routed question answered from the specialist's data; a question outside every remit refused rather than answered from memory; and a write proposed through the orchestrator, held by the specialist in input-required, relayed here unchanged, approved by the user through the same conversation, and written. The orchestrator never owns that decision. The graph is plan → delegate → plan, tools described by what a specialist decides rather than what it holds, delegations in one step run concurrently and capped at eight counted in calls. Rebuilt per turn, because its tools carry the user's token. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
[project]
|
||||
name = "assistant-agent"
|
||||
version = "0.1.0"
|
||||
description = "Assistant — the orchestrating agent for the classic-models estate"
|
||||
readme = "README.md"
|
||||
requires-python = ">=3.12"
|
||||
dependencies = [
|
||||
# The A2A facade, and the client for calling specialists. The official SDK
|
||||
# rather than a framework's own: this estate exists to prove A2A
|
||||
# interoperability across five runtimes, so the reference implementation is
|
||||
# the safer base for the others to interoperate with.
|
||||
"a2a-sdk[http-server]>=1.1.2,<2",
|
||||
# The graph. The orchestrator is where routing is worth making explicit —
|
||||
# which specialist is consulted when, and where the answers are reconciled.
|
||||
"langgraph>=1.2.11,<2",
|
||||
# The model client. The inference endpoint speaks the OpenAI protocol.
|
||||
"langchain-openai>=1.6.0,<2",
|
||||
"langchain-core>=1.6.1,<2",
|
||||
"httpx>=0.28.1,<1",
|
||||
"pydantic-settings>=2.7",
|
||||
"uvicorn>=0.52.4",
|
||||
]
|
||||
|
||||
[project.optional-dependencies]
|
||||
dev = ["pytest>=8", "pytest-asyncio>=0.24"]
|
||||
|
||||
[build-system]
|
||||
requires = ["hatchling"]
|
||||
build-backend = "hatchling.build"
|
||||
|
||||
[tool.hatch.build.targets.wheel]
|
||||
packages = ["src/assistant_agent"]
|
||||
|
||||
[tool.pytest.ini_options]
|
||||
pythonpath = ["src"]
|
||||
asyncio_mode = "auto"
|
||||
Reference in New Issue
Block a user