How sayandeep-coder/agentforge works
AgentForge is agent-execution infrastructure, not a chat application. Its main workflow accepts task requests through versioned REST routes, persists task state and queues work, then a worker invokes the agent runtime to execute workflow steps using tools or an LLM; clients retrieve task status and results through the API. Separate capabilities manage agents, workflows, memory, and schedules. The sampled code shows cron scheduling as a trigger-callback abstraction, but not its wiring to task submission; the graph therefore leaves that connection out.
Main entry points: router.go REST Router · runtime.go Agent Runtime · task.go Task Service · engine.go Workflow Engine
Components 22
HTTP API
- REST Router
internal/api/router.go
Application Services
- Agent Service
internal/service/agent.go - Workflow Service
internal/service/workflow.go - Task Service
internal/service/task.go - Memory Service
internal/service/memory.go - Schedule Service
internal/service/schedule.go
Execution Plane
- Task Publisher
internal/queue/publisher.go - Task Queue
internal/queue/queue.go - Worker Pool
internal/worker/pool.go - Agent Runtime
internal/agent/runtime.go - Workflow Engine
internal/workflow/engine.go - Tool Registry
internal/tools/registry.go - LLM Provider Port
internal/llm/provider.go - Cron Scheduler
internal/scheduler/scheduler.go
Persistence
- Agent Repository
internal/repository/agent.go - Workflow Repository
internal/repository/workflow.go - Task Repository
internal/repository/task.go - Memory Repository
internal/repository/memory.go - Schedule Repository
internal/repository/schedule.go - PostgreSQL
Other components
- API Client
- Trigger Callback
Connections 27
- API Client → REST Router: sends requests
- REST Router → Agent Service: calls
- REST Router → Workflow Service: calls
- REST Router → Task Service: calls
- REST Router → Memory Service: calls
- REST Router → Schedule Service: calls
- Agent Service → Agent Repository: reads and writes
- Workflow Service → Workflow Repository: reads and writes
- Task Service → Task Repository: reads and writes
- Task Service → Task Publisher: publishes task
- Memory Service → Memory Repository: reads and writes
- Schedule Service → Schedule Repository: reads and writes
- Agent Repository → PostgreSQL: queries
- Workflow Repository → PostgreSQL: queries
- Task Repository → PostgreSQL: queries
- Memory Repository → PostgreSQL: queries
- Schedule Repository → PostgreSQL: queries
- Task Publisher → Task Queue: enqueues task
- Worker Pool → Task Queue: dequeues tasks
- Worker Pool → Agent Runtime: executes task
- Agent Runtime → Task Repository: loads and updates
- Agent Runtime → Agent Repository: loads agent
- Agent Runtime → Workflow Repository: loads workflow
- Agent Runtime → Workflow Engine: executes workflow
- Workflow Engine → Tool Registry: executes tool
- Workflow Engine → LLM Provider Port: generates response
- Cron Scheduler → Trigger Callback: invokes callback