Appearance
Crate Map
The backend is a Cargo workspace at backend/. It has 29 library/binary crates under backend/crates/ and 26 connector crates under backend/sources/.
Use this page as an index. For the deeper "how it fits together" view, read System Architecture.
History
Early versions used kg-* crate names (e.g. kg-core, kg-api). Everything was renamed to the agentcy-* prefix. If you see kg-* in an old commit or issue, the modern equivalent is agentcy-*.
Platform core
| Crate | Purpose |
|---|---|
agentcy-core | Shared types: OrgId, UserId, Realm, TenantContext, settings, errors. Imported by almost every other crate. |
agentcy-db | Database pool wrappers — PostgreSQL (sqlx), Neo4j (neo4rs), Redis. Loads migrations at boot. |
agentcy-auth | Authentication providers (Local bcrypt+HS256, OIDC RS256 via JWKS). Axum auth middleware. |
agentcy-api | Axum 0.8 HTTP server. All REST routes live under src/routes/. Holds AppState. |
agentcy-ws | WebSocket broadcast service for realtime UI updates (graph changes, task runs). |
agentcy-sdk | Internal client SDK — shared request/response types and helpers. |
Graph & retrieval
| Crate | Purpose |
|---|---|
agentcy-graph | Neo4j reader/writer. Cypher helpers, realm-filtered queries, subgraph expansion. |
agentcy-rag | Embedding pipeline, vector index, semantic search API. |
agentcy-memory | Persistent organizational memory (.mv2 memvid files). Syncs to Memory nodes in Neo4j. |
agentcy-code-intel | Code analysis / indexing support for coding-agent workflows. |
Ingestion
| Crate | Purpose |
|---|---|
agentcy-ingest | SourceRegistry, pipeline runner, ConnectorEventBus. Each connector registers here. |
For the 26 connector crates, see Connectors Overview.
Chat & agents
| Crate | Purpose |
|---|---|
agentcy-chat | Conversation service, tool catalog meta-tools, ApprovalRegistry, LLM orchestration. |
agentcy-agent | Multi-provider LLM abstraction (Anthropic, OpenAI, Google Gemini, Ollama, vLLM, LM Studio). |
agentcy-agent-bin | Out-of-process agent runtime binary. |
agentcy-agents | Built-in agents: enrichment, anomaly detection, relationship discovery. |
Execution & scheduling
| Crate | Purpose |
|---|---|
agentcy-worker | Redis-stream-backed background job queue. |
agentcy-worker-bin | Worker daemon binary. |
agentcy-sandbox | Sandboxed code execution, port forwarding, session management. |
agentcy-ciab-client | Client for the CIAB (Claude-in-a-box) coding-agent runtime. Supports local + EC2. |
agentcy-durable | Durable execution primitives (retry, resume). |
agentcy-tasks | Cron scheduler (tokio-cron-scheduler), scheduled task manager. |
Policy & governance
| Crate | Purpose |
|---|---|
agentcy-policy | OPA/Rego evaluation via regorus. PolicyEnforcer, policy middleware, audit writer. |
Storage & artifacts
| Crate | Purpose |
|---|---|
agentcy-storage | Artifact store — local FS or S3-compatible backend. |
Channels
| Crate | Purpose |
|---|---|
agentcy-whatsapp | WhatsApp integration; wraps a Node.js Baileys gateway. |
agentcy-slack-bot | Slack bot plugin (feature-gated). |
agentcy-slack-channel | Slack Socket-Mode channel listener (feature-gated). |
agentcy-plugins | Plugin registry, legacy feature-flag plugins. |
Voice
| Crate | Purpose |
|---|---|
agentcy-voice | STT/TTS pipeline. Providers: Deepgram, Google, Azure, ElevenLabs. |
CLIs
| Crate | Purpose |
|---|---|
agentcy-cli | Primary CLI — org admin, local dev helpers. |
agentcy-proxy-cli | Local reverse-proxy / tunnel used by sandbox previews. |
Connector crates (26)
Listed here by category. Each exposes IngestionSource (ETL) and/or ConnectorToolProvider (live tools). See per-connector pages under Connectors.
Files & generic
agentcy-source-csv,agentcy-source-json
Dev & infrastructure
agentcy-source-github,agentcy-source-kubernetes,agentcy-source-openapiagentcy-source-remote-exec,agentcy-source-mcp,agentcy-source-ciabagentcy-source-os,agentcy-source-git,agentcy-source-jenkinsagentcy-source-figma,agentcy-source-remotion
Cloud
agentcy-source-aws,agentcy-source-gcp,agentcy-source-vercelagentcy-source-supabase,agentcy-source-localstack,agentcy-source-firecrawlagentcy-source-websearch,agentcy-source-elevenlabs,agentcy-source-runwayagentcy-source-slack,agentcy-source-google-workspace,agentcy-source-readaiagentcy-source-hubspot,agentcy-source-grafana
Data
agentcy-source-sql,agentcy-source-mongodb,agentcy-source-powerbi
Workspace dependencies
Notable shared versions pinned in backend/Cargo.toml:
| Dependency | Version |
|---|---|
tokio | 1.x |
axum | 0.8 |
tower-http | 0.6 |
sqlx | 0.8 |
neo4rs | 0.7 |
redis | 0.25 |
jsonwebtoken | 9 |
reqwest | 0.12 (rustls) |
tracing | 0.1 |
regorus | 0.2 |
Binary targets
sh
# Run from backend/
cargo run -p agentcy-api # HTTP API (port 8080 by default)
cargo run -p agentcy-worker-bin # Worker daemon
cargo run -p agentcy-agent-bin # Out-of-process agent
cargo run -p agentcy-cli -- --help
cargo run -p agentcy-proxy-cli -- --help