How jigarjani-dev/sutradhaar works
Purpose and entry points
Workshop Agent Gateway is a Docker-deployed learning platform for creating persona-driven agents, connecting them through A2A handoffs, equipping them with MCP tools, and observing activity in a live UI. The backend entry point is app.py; container orchestration is docker-compose.yml and Dockerfile. The primary user entry point is the dashboard at port 8192.
Backend gateway and API surface
The gateway/ package is the application core. It loads agent definitions, exposes agent interactions, streams live events, and coordinates integrations:
• gateway/agent_chat.py
• gateway/ws.py
• gateway/config.py
The gateway is a boundary between browser/Telegram clients and the agent runtime rather than a standalone agent implementation.
Agent definition, discovery, and execution
Agents are filesystem-defined from a persona (SOUL.md) and manifest (agent.yaml). Templates provide reusable starting roles; the loader and registry turn those files into available runtime agents:
• gateway/loader.py
• gateway/registry.py
• templates/orchestrator/agent.yaml
Role templates include orchestrator, business-analysis, development, QA, and finance agents. Workshop-specific agent instances are under workshop/software-engineering-agents/.
Multi-agent routing and A2A
A2A communication is implemented as a first-class handoff layer. An orchestrator or active agent can delegate work to peers; handoffs and their resulting messages/events are separate from local model invocation:
• gateway/a2a.py
• gateway/handoff.py
• gateway/event_log.py
This separation supports the dashboard’s real-time visualization of inter-agent activity and provides a natural control boundary for delegation policy and tracing.
LLM, providers, memory, and persistence
The runtime centralizes model access and provider selection in provider/LLM modules, while preserving agent context and operational state through memory and database layers:
• gateway/llm.py
• gateway/providers.py
• gateway/memory.py
• gateway/db.py
Provider configuration is therefore isolated from agent personas and orchestration. Persistence/event storage is also distinct from the WebSocket delivery path.
Skills, tools, and MCP integrations
Agents gain capabilities through skill definitions and tool/MCP dispatch rather than direct coupling to external APIs:
• gateway/skills.py
• gateway/tools.py
• gateway/mcp.py
• data/mcp.json
Skills combine instructions with executable scripts, e.g. Gmail search and Google Sheets read/write operations in data/skills/. MCP server adapters cover browser, filesystem, Gmail, and Sheets; Google OAuth and credential handling remain inside gateway/mcp_servers/.
Channels and UI
The React/Vite frontend is the visual control and observability plane, rooted at:
• frontend/src/main.tsx
• frontend/src/App.tsx
• frontend/src/components/SoftLabDashboard.tsx
It includes an agent editor, pipeline canvas, skills panel, and workshop progression UI. Telegram is an alternate inbound/outbound channel backed by gateway/telegram_channel.py and gateway/telegram_store.py. External services include Telegram Bot APIs, Google Gmail/Sheets APIs via OAuth, configured LLM providers, and optional SearXNG (searxng/settings.yml).
Main entry points: agent_chat.py Gateway API · mcp.py MCP Integration · App.tsx Dashboard UI · ws.py Live Event Stream
Components 20
Gateway Runtime
Backend control plane and agent execution boundary.
- Gateway API · Serves client interactions and coordinates the runtime.
gateway/agent_chat.py - Live Event Stream
gateway/ws.py
Agent System
Filesystem-defined personas and multi-agent delegation.
- Agent Loader & Registry · Builds available runtime agents from filesystem definitions.
gateway/loader.py - Agent Personas · SOUL.md and manifests define reusable roles and workshop agents.
templates/orchestrator/agent.yaml - A2A Routing · Separates peer handoffs from local model invocation.
gateway/a2a.py - Handoff Control
gateway/handoff.py - Event Log
gateway/event_log.py
Capabilities & State
Tools, integrations, model access, and durable context.
- LLM Runtime
gateway/llm.py - Provider Selection
gateway/providers.py - Agent Memory
gateway/memory.py - Operational Database
gateway/db.py - Skills & Tool Dispatch · Maps skill instructions and scripts to tool execution.
gateway/tools.py - MCP Integration · Connects browser, filesystem, Gmail, and Sheets adapters.
gateway/mcp.py - MCP Servers
data/mcp.json
Clients & Deployment
Interactive clients and container entry points.
- Docker Compose
docker-compose.yml - Backend Entry
app.py - Dashboard UI · Visual control and observability plane on port 8192.
frontend/src/App.tsx - Live Dashboard · Agent editor, pipeline canvas, skills, and workshop progression.
frontend/src/components/SoftLabDashboard.tsx - Telegram Channel
gateway/telegram_channel.py
Other components
- External Services · Includes OAuth-backed Gmail/Sheets and optional SearXNG.
searxng/settings.yml
Connections 23
- Docker Compose → Backend Entry: deploys
- Backend Entry → Gateway API: starts
- Dashboard UI → Live Dashboard: renders
- Dashboard UI → Gateway API: agent requests
- Gateway API → Live Event Stream: publishes live activity
- Live Event Stream → Dashboard UI: streams events
- Gateway API → Agent Loader & Registry: resolves agents
- Agent Loader & Registry → Agent Personas: loads definitions
- Gateway API → A2A Routing: delegates work
- A2A Routing → Handoff Control: controls handoffs
- Handoff Control → Event Log: records activity
- Event Log → Live Event Stream: feeds visualization
- Gateway API → LLM Runtime: invokes models
- LLM Runtime → Provider Selection: selects provider
- Provider Selection → External Services: calls LLM providers
- Gateway API → Agent Memory: maintains context
- Agent Memory → Operational Database: persists state
- Gateway API → Skills & Tool Dispatch: executes capabilities
- Skills & Tool Dispatch → MCP Integration: dispatches MCP tools
- MCP Integration → MCP Servers: loads server config
- MCP Integration → External Services: uses Google and other APIs
- Telegram Channel → Gateway API: messages
- Telegram Channel → External Services: Bot API