How jholhewres/devclaw works
DevClaw is a Go-based AI agent backend for teams, exposed through a CLI, WebUI, messaging channels, and an MCP server. The primary workflow is an interface submitting a request to the assistant, which uses an LLM and tools, incorporates persistent memory, and returns a response through that interface. The graph also preserves documented integrations and major subsystems. Source excerpts show selected wiring; README statements support the broader product branches, while unsampled implementation details and their internal call paths are omitted.
Main entry points: assistant.go Assistant agent loop · server.go WebUI server and API · chat.go CLI commands · App.tsx Dashboard and setup UI
Components 23
User interfaces
- CLI commands
cmd/devclaw/commands/chat.go - WebUI server and API
pkg/devclaw/webui/server.go - Dashboard and setup UI
web/src/App.tsx - OpenAI-compatible gateway
pkg/devclaw/gateway/handlers.go
Agent runtime
- Assistant agent loop
pkg/devclaw/copilot/assistant.go - Context routing
pkg/devclaw/copilot/context_router.go - LLM providers and failover
pkg/devclaw/copilot/llm.go - Agent tools
pkg/devclaw/copilot/tool_executor.go - Concurrent subagents
pkg/devclaw/copilot/subagent.go
Channels and integrations
- Channel manager
pkg/devclaw/channels/manager.go - Messaging adapters
pkg/devclaw/channels/channel.go - MCP server
pkg/devclaw/mcp/server.go - Plugin system
pkg/devclaw/plugins/registry.go - Skills catalog
pkg/devclaw/skills/catalog.go - Media service
pkg/devclaw/media/service.go
State and persistence
- Persistent memory
pkg/devclaw/copilot/memory/store.go - Sessions and workspaces
pkg/devclaw/copilot/session.go - SQLite and PostgreSQL backends
pkg/devclaw/database/factory.go
Operations and security
- OAuth credentials
pkg/devclaw/oauth/token_manager.go - Scheduled jobs
pkg/devclaw/scheduler/scheduler.go - Encrypted secrets vault
pkg/devclaw/copilot/vault.go - Execution sandbox
pkg/devclaw/sandbox/runner.go
Other components
- Team users and clients
Connections 25
- Team users and clients → CLI commands: submit requests
README.md - Team users and clients → Dashboard and setup UI: use dashboard
README.md - Team users and clients → Messaging adapters: message agent
README.md - Dashboard and setup UI → WebUI server and API: call API
- CLI commands → Assistant agent loop: submit prompts
cmd/devclaw/commands/chat.go - OpenAI-compatible gateway → Assistant agent loop: execute agent
pkg/devclaw/gateway/handlers.go - WebUI server and API → Assistant agent loop: serve assistant API
- Messaging adapters → Channel manager: register channels
- Channel manager → Assistant agent loop: deliver messages
- Assistant agent loop → Context routing: build context
README.md - Context routing → Persistent memory: retrieve memories
pkg/devclaw/copilot/context_router.go - Assistant agent loop → LLM providers and failover: request completion
README.md - Assistant agent loop → Agent tools: invoke tools
README.md - Assistant agent loop → Concurrent subagents: delegate tasks
README.md - Assistant agent loop → Sessions and workspaces: maintain sessions
- Sessions and workspaces → SQLite and PostgreSQL backends: persist state
- Persistent memory → SQLite and PostgreSQL backends: store memory
- Assistant agent loop → MCP server: expose MCP tools
- Assistant agent loop → Plugin system: load extensions
- Assistant agent loop → Skills catalog: use skills
- Assistant agent loop → Media service: process media
- Assistant agent loop → Encrypted secrets vault: access secrets
- Assistant agent loop → Execution sandbox: run commands
- Scheduled jobs → Assistant agent loop: trigger jobs
- WebUI server and API → OAuth credentials: manage provider auth