Skip to content

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

CratePurpose
agentcy-coreShared types: OrgId, UserId, Realm, TenantContext, settings, errors. Imported by almost every other crate.
agentcy-dbDatabase pool wrappers — PostgreSQL (sqlx), Neo4j (neo4rs), Redis. Loads migrations at boot.
agentcy-authAuthentication providers (Local bcrypt+HS256, OIDC RS256 via JWKS). Axum auth middleware.
agentcy-apiAxum 0.8 HTTP server. All REST routes live under src/routes/. Holds AppState.
agentcy-wsWebSocket broadcast service for realtime UI updates (graph changes, task runs).
agentcy-sdkInternal client SDK — shared request/response types and helpers.

Graph & retrieval

CratePurpose
agentcy-graphNeo4j reader/writer. Cypher helpers, realm-filtered queries, subgraph expansion.
agentcy-ragEmbedding pipeline, vector index, semantic search API.
agentcy-memoryPersistent organizational memory (.mv2 memvid files). Syncs to Memory nodes in Neo4j.
agentcy-code-intelCode analysis / indexing support for coding-agent workflows.

Ingestion

CratePurpose
agentcy-ingestSourceRegistry, pipeline runner, ConnectorEventBus. Each connector registers here.

For the 26 connector crates, see Connectors Overview.

Chat & agents

CratePurpose
agentcy-chatConversation service, tool catalog meta-tools, ApprovalRegistry, LLM orchestration.
agentcy-agentMulti-provider LLM abstraction (Anthropic, OpenAI, Google Gemini, Ollama, vLLM, LM Studio).
agentcy-agent-binOut-of-process agent runtime binary.
agentcy-agentsBuilt-in agents: enrichment, anomaly detection, relationship discovery.

Execution & scheduling

CratePurpose
agentcy-workerRedis-stream-backed background job queue.
agentcy-worker-binWorker daemon binary.
agentcy-sandboxSandboxed code execution, port forwarding, session management.
agentcy-ciab-clientClient for the CIAB (Claude-in-a-box) coding-agent runtime. Supports local + EC2.
agentcy-durableDurable execution primitives (retry, resume).
agentcy-tasksCron scheduler (tokio-cron-scheduler), scheduled task manager.

Policy & governance

CratePurpose
agentcy-policyOPA/Rego evaluation via regorus. PolicyEnforcer, policy middleware, audit writer.

Storage & artifacts

CratePurpose
agentcy-storageArtifact store — local FS or S3-compatible backend.

Channels

CratePurpose
agentcy-whatsappWhatsApp integration; wraps a Node.js Baileys gateway.
agentcy-slack-botSlack bot plugin (feature-gated).
agentcy-slack-channelSlack Socket-Mode channel listener (feature-gated).
agentcy-pluginsPlugin registry, legacy feature-flag plugins.

Voice

CratePurpose
agentcy-voiceSTT/TTS pipeline. Providers: Deepgram, Google, Azure, ElevenLabs.

CLIs

CratePurpose
agentcy-cliPrimary CLI — org admin, local dev helpers.
agentcy-proxy-cliLocal 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-openapi
  • agentcy-source-remote-exec, agentcy-source-mcp, agentcy-source-ciab
  • agentcy-source-os, agentcy-source-git, agentcy-source-jenkins
  • agentcy-source-figma, agentcy-source-remotion

Cloud

  • agentcy-source-aws, agentcy-source-gcp, agentcy-source-vercel
  • agentcy-source-supabase, agentcy-source-localstack, agentcy-source-firecrawl
  • agentcy-source-websearch, agentcy-source-elevenlabs, agentcy-source-runway
  • agentcy-source-slack, agentcy-source-google-workspace, agentcy-source-readai
  • agentcy-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:

DependencyVersion
tokio1.x
axum0.8
tower-http0.6
sqlx0.8
neo4rs0.7
redis0.25
jsonwebtoken9
reqwest0.12 (rustls)
tracing0.1
regorus0.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

Built by AgentcyLabs. For in-house deployment or Agentcy Cloud (PaaS) access, visit agentcylabs.com.