How temporal-community/temporal-agent-kit works
Temporal Agent Kit is a Python and TypeScript toolkit for building AI agents as durable Temporal workflows. A user or application submits typed messages through an SDK client; the workflow runs agent behavior, streams events, and can pause for approvals or callbacks. Workers and model plugins connect agent code to Temporal, while the Python harness API and session manager support launching and inspecting sessions in the console. The repository also contains Code Mode, typed UI clients, and Nexus/Chat integrations. Some subsystem paths are present in the tree but were not sampled, so their internal wiring is omitted.
Main entry points: agent_workflow.py Agent Workflow · plugin.py Worker Plugins · workflow.go Connector Router · agent_client.py Agent Client
Components 24
Agent Runtime
- Agent Workflow
python/temporal_agent_kit/agent_workflow.py - Typed Protocol
python/temporal_agent_kit/agent_protocol/agent_interface.py - Stream Events
python/temporal_agent_kit/agent_protocol/events.py - Agent Client
python/temporal_agent_kit/agent_client.py - Stream Merge
python/temporal_agent_kit/stream_merge/merge.py - Agent State
python/temporal_agent_kit/state/session.py - Code Mode
python/temporal_agent_kit/code_mode/driver.py
Agent Integrations
- Worker Plugins
python/temporal_agent_kit/plugin.py - OpenAI Agents
python/temporal_agent_kit/ai_sdks/openai_agents/_kit.py - Google GenAI
python/temporal_agent_kit/ai_sdks/google_genai_plugin/_google_genai_plugin.py - Strands Agents
python/temporal_agent_kit/ai_sdks/strands_agents/_plugin.py
Harness Services
- Harness API
python/temporal_agent_kit/web/app.py - Session Manager
python/temporal_agent_kit/web/session_manager.py - Manager Worker
python/temporal_agent_kit/web/session_manager_worker.py
User Interfaces
- Agent Console
typescript/apps/ui/src/App.svelte - Typed Client
typescript/packages/client/src/session.ts
Nexus and Connectors
- Nexus Resolver
nexus/mcp/nexus_mcp/resolver.py - MCP Gateway
nexus/mcp/nexus_mcp/durable_tools_gateway/registry_service_handler.py - Connector Router
nexus/ui_connector/router/workflow.go - Slack Webhook
nexus/ui_connector/slack/inbound/server.go - Linear Webhook
nexus/ui_connector/linear/inbound/server.go - Teams Webhook
nexus/ui_connector/teams/inbound/server.go
Other components
- User or App
- Temporal Service
Connections 22
- User or App → Agent Console: uses
README.md - Agent Console → Harness API: calls
README.md - Harness API → Temporal Service: uses
README.md - Manager Worker → Temporal Service: hosts manager
README.md - Agent Workflow → Temporal Service: runs on
README.md - Agent Workflow → Typed Protocol: uses types
python/temporal_agent_kit/agent_workflow.py - Agent Workflow → Stream Events: uses events
python/temporal_agent_kit/agent_workflow.py - Agent Workflow → Agent State: uses state
python/temporal_agent_kit/agent_workflow.py - Agent Workflow → Worker Plugins: integrates via
README.md - Agent Client → Typed Protocol: uses types
python/temporal_agent_kit/agent_client.py - Agent Client → Stream Merge: merges streams
python/temporal_agent_kit/agent_client.py - Worker Plugins → OpenAI Agents: includes
- Worker Plugins → Google GenAI: includes
- Worker Plugins → Strands Agents: includes
- Session Manager → Agent Workflow: starts child
python/temporal_agent_kit/web/session_manager.py - Manager Worker → Session Manager: hosts
python/temporal_agent_kit/web/session_manager_worker.py - Typed Client → Agent Workflow: communicates with
- MCP Gateway → Nexus Resolver: registers tools
- MCP Gateway → User or App: calls external MCP
nexus/mcp/nexus_mcp/durable_tools_gateway/registry_service_handler.py - Slack Webhook → Connector Router: starts workflow
nexus/ui_connector/slack/inbound/server.go - Linear Webhook → Connector Router: routes input
nexus/ui_connector/linear/inbound/server.go - Teams Webhook → Connector Router: starts workflow
nexus/ui_connector/teams/inbound/server.go