How agenta-ai/agenta works
Agenta is an open-source workspace for building, sharing, and running agents. The documented user journey is to define an agent, connect tools and workspace resources, then run it in chat or in the background; permissions govern tool actions, and traces and evaluations support improvement. The tree provides paths for these capabilities, but the sampled source excerpts are mostly unrelated frontend hooks, so the runtime wiring below reflects README-documented behavior rather than inspected call sites.
Main entry points: sessions Session runtime · agent_templates/router.py Agent APIs · sessions/router.py Session API · triggers/router.py Background triggers
Components 20
Agent authoring
- Agent definitions
api/oss/src/core/agent_templates - Agent APIs
api/oss/src/apis/fastapi/agent_templates/router.py
Agent runtime
- Session API
api/oss/src/apis/fastapi/sessions/router.py - Session runtime
api/oss/src/core/sessions - Session commands
api/oss/src/core/sessions/commands/service.py - Background triggers
api/oss/src/apis/fastapi/triggers/router.py - Workflows
api/oss/src/core/invocations/service.py - Chat channels
api/oss/src/core/channels/service.py
Tools and resources
- MCP integrations
api/oss/src/core/gateways/mcps/service.py - Composio apps
api/oss/src/core/gateway/connections/providers/composio/adapter.py - Workspace resources
api/oss/src/core/mounts/service.py - Model gateways
api/oss/src/core/gateways/llms/service.py
Observability
- Run events
api/oss/src/core/events/service.py - Run tracing
api/oss/src/apis/fastapi/tracing/router.py - Evaluations
api/oss/src/core/evaluations/service.py
Platform controls
- Tool permissions
api/oss/src/core/gateways/policy/service.py - Team access
api/oss/src/core/access/permissions/service.py
Other components
- User or team
- Connected applications
- Model provider
Connections 22
- User or team → Agent APIs: defines agent
- Agent APIs → Agent definitions: manages definitions
- User or team → Session API: starts chat
- Session API → Session runtime: handles session
- Session runtime → Session commands: processes commands
- Session runtime → Chat channels: serves chat
- User or team → Background triggers: configures runs
- Background triggers → Workflows: starts runs
- Workflows → Session runtime: runs agent
- Session runtime → Tool permissions: checks actions
- Session runtime → MCP integrations: uses tools
- Session runtime → Composio apps: uses integrations
- Session runtime → Workspace resources: uses resources
- Session runtime → Model gateways: requests completions
- Model gateways → Model provider: calls provider
- Composio apps → Connected applications: dispatches actions
- MCP integrations → Connected applications: connects tools
- Session runtime → Run events: emits events
- Session runtime → Run tracing: records runs
- User or team → Evaluations: reviews quality
- User or team → Team access: manages roles
- Team access → Agent APIs: controls access