How awslabs/loom works
Loom is an AWS agent management plane: teams register and deploy agents, invoke them, then govern, evaluate, and operate them. The main path runs from the web console through the FastAPI control plane to deployment and invocation on AgentCore, with custom Strands or ADK runtimes. Separate capabilities cover identity and authorization, integrations and memory, approvals and registry governance, evaluations, and cost/observability. The tree and excerpts support the main API, persistence, and runtime boundaries; several feature-specific routers and frontend pages are represented at subsystem level because their implementation was not sampled.
Main entry points: agents.py Agent lifecycle API · invocations.py Invocation API · main.py FastAPI application · agent.py ADK agent
Components 21
Web console
- Console pages
frontend/src/pages - API client
frontend/src/api/client.ts
Control plane
- FastAPI application
backend/app/main.py - Agent lifecycle API
backend/app/routers/agents.py - Invocation API
backend/app/routers/invocations.py - Identity and scopes
backend/app/dependencies/auth.py - Platform database
backend/app/db.py - AgentCore deployment
backend/app/services/deployment.py
Agent runtime
- Strands runtime handler
agents/strands_agent/src/handler.py - Strands agent
agents/strands_agent/src/agent.py - ADK runtime handler
agents/adk_agent/src/handler.py - ADK agent
agents/adk_agent/src/agent.py - Agent integrations
agents/adk_agent/src/integrations
Governance
- Registry and approvals
backend/app/routers/registry.py - Guardrail services
backend/app/services/guardrails.py
Quality and operations
- Agent evaluations
backend/app/routers/evaluations.py - Cost tracking
backend/app/routers/costs.py - Runtime telemetry
agents/adk_agent/src/telemetry.py
Other components
- Platform user
- AWS AgentCore and Bedrock
- AWS Agent Registry
Connections 22
- Platform user → Console pages: uses
README.md - Console pages → API client: requests data
- API client → FastAPI application: calls API
- FastAPI application → Agent lifecycle API: routes requests
backend/app/main.py - FastAPI application → Invocation API: routes requests
backend/app/main.py - Agent lifecycle API → Platform database: reads and writes
backend/app/routers/agents.py - Invocation API → Platform database: reads and writes
backend/app/routers/invocations.py - Invocation API → Identity and scopes: checks access
backend/app/routers/invocations.py - Agent lifecycle API → AgentCore deployment: deploys agents
backend/app/routers/agents.py - AgentCore deployment → AWS AgentCore and Bedrock: provisions runtime
- AWS AgentCore and Bedrock → Strands runtime handler: invokes runtime
- AWS AgentCore and Bedrock → ADK runtime handler: invokes runtime
- Strands runtime handler → Strands agent: builds agent
agents/strands_agent/src/handler.py - ADK runtime handler → ADK agent: builds agent
agents/adk_agent/src/handler.py - ADK agent → Agent integrations: loads tools
agents/adk_agent/src/agent.py - Agent lifecycle API → Registry and approvals: checks approvals
- Registry and approvals → AWS Agent Registry: uses registry
- Invocation API → Guardrail services: applies guardrails
backend/app/routers/invocations.py - Platform user → Agent evaluations: runs evaluations
- Platform user → Cost tracking: reviews costs
- Strands agent → Runtime telemetry: emits telemetry
agents/strands_agent/src/agent.py - ADK agent → Runtime telemetry: emits telemetry
agents/adk_agent/src/agent.py