How yad4o/map works
MAP is a multi-agent task automation platform with a React dashboard and FastAPI backend. A user submits a task; the API queues it, a Celery worker runs the agent controller, and the result is persisted and exposed to the dashboard through polling or an event stream. The documented agent stages are planning, execution, analysis, and memory retrieval. The README also describes authentication, provider fallback, administration, logs, and task observability. Several backend modules are indexed but unsampled, so those branches and their links are shown only where the README documents the relationship.
Main entry points: agent_controller.py Agent controller · routes/tasks.py Task routes · worker/tasks.py Celery task worker · fallback_engine.py Fallback engine
Components 24
Dashboard
- React dashboard
frontend/src/App.tsx - Task views
frontend/src/pages/TaskDetailPage.tsx - Task API client
frontend/src/api/tasks.ts - Live stream hook
frontend/src/hooks/useTaskStream.ts
API and identity
- FastAPI app
backend/app/main.py - Task routes
backend/app/routes/tasks.py - Auth service
backend/app/services/auth_service.py - OAuth exchange
backend/app/services/oauth_service.py - Task service
backend/app/services/task_service.py
Task runtime
- Celery task worker
backend/app/worker/tasks.py - Agent runner
backend/app/worker/agent_runner.py
Agent pipeline
- Agent controller
backend/agents/controller/agent_controller.py - Planner
backend/agents/planner/planner_agent.py - Executor and tools
backend/agents/executor/executor_agent.py - Analyzer
backend/agents/analyzer/analyzer_agent.py - Memory agent
backend/agents/memory/memory_agent.py
State and providers
- Vector store
backend/agents/memory/vector_store.py - Task and user data
backend/app/db/models/task.py - Redis queue and streams
backend/app/core/redis_client.py - Fallback engine
backend/app/core/fallback_engine.py - LLM provider selection
app/core/llm_provider.py
Other components
- User
- LLM providers
- BentoML fallback
Connections 27
- User → React dashboard: submits task
- React dashboard → Task views: opens task views
frontend/src/App.tsx - Task views → Task API client: requests task data
- Task API client → Task routes: calls task endpoints
- Task routes → Task service: delegates task operations
backend/app/routes/tasks.py - FastAPI app → Task routes: registers routes
backend/app/main.py - FastAPI app → Auth service: registers auth routes
backend/app/main.py - OAuth exchange → Auth service: returns verified profile
backend/app/services/oauth_service.py - Task service → Task and user data: persists task data
- Task routes → Celery task worker: queues task
backend/app/routes/tasks.py - Celery task worker → Agent runner: runs task
backend/app/worker/tasks.py - Agent runner → Agent controller: starts agent workflow
- Agent controller → Planner: plans task
backend/agents/controller/agent_controller.py - Agent controller → Executor and tools: executes plan
backend/agents/controller/agent_controller.py - Agent controller → Analyzer: validates results
backend/agents/controller/agent_controller.py - Agent controller → Memory agent: retrieves context
backend/agents/controller/agent_controller.py - Memory agent → Vector store: retrieves memories
- Agent controller → Task and user data: records agent steps
backend/agents/controller/agent_controller.py - Celery task worker → Task and user data: saves results and status
backend/app/worker/tasks.py - Celery task worker → Redis queue and streams: uses distributed queue
- Task routes → Redis queue and streams: streams task events
backend/app/routes/tasks.py - Task routes → Live stream hook: serves event stream
- Live stream hook → Task views: updates live answer
frontend/src/hooks/useTaskStream.ts - Agent controller → Fallback engine: requests inference
- Fallback engine → LLM provider selection: selects provider
- LLM provider selection → LLM providers: calls configured model
app/core/llm_provider.py - Fallback engine → BentoML fallback: uses local fallback