How agntcy/dir works
Project type and purpose
• This is a full-stack, Go-based “Agent Directory” system comprising:
• A CLI tool (cli/) for end-users
• Multi-language SDKs (sdk/, client/) for programmatic access
• A monolithic API server (server/) exposing gRPC endpoints for storage, routing, search, sign, and sync
• An auxiliary “hub” service (hub/) handling authentication, tenant/org management, and session storage
• A P2P network layer for peer discovery and distributed data exchange
• Deployment artifacts (Docker, Helm charts) and end-to-end tests
• Purpose: publish, discover, and exchange AI agent data models over a distributed network, with provable security, versioning, and extensibility.
File structure
• Top-level modules:
• api/ – Protobuf definitions and generated Go code for all services (core, routing, search, sign, store)
• cli/ – Command-line client with subcommands (publish, search, sync, sign, etc.)
• client/ – Go SDK for embedding client logic in other Go apps
• sdk/ – Python and JavaScript SDKs
• server/ – API server: controllers → services → datastore/database modules → P2P routing
• hub/ – Separate service for authentication, tenant/org management, session persistence
• install/ – Helm charts and Docker Compose files for deployment
• e2e/ – End-to-end test harness
• Internal server layers (in server/):
• config/ – application configuration
• controller/ – translates gRPC calls into service invocations
• datastore/ – generic store interface
• database/ – metadata storage (SQLite)
• store/ – object persistence (local fs, OCI registries, cache)
• routing/ – P2P discovery using libp2p
• sync/ – background sync scheduler and workers
• types/ – port and adapter definitions (hexagonal architecture)
README for additional insights
• The README calls out: Data Models, Dev Kit (CLI), Plugins, Announce, Discover, Security layers.
• Deployment via Taskfile, Docker Compose, or Helm chart, exposing at least two containers: dir-apiserver and dir-ctl (CLI), plus hub service.