aai-labs/agent-barn
Self-hosted Kubernetes control plane for AI agent access, audit, and spend
Automated SPDX check for reference only — not legal advice. Disclaimer
GitHub Star History
Full-history star trajectory from GitHub official history. Switch ranges or hover any point for exact counts.
Evidence-Backed Technical Brief
AI Deep ReviewArchitecture & Core Mechanics
Agent Barn is a Python-based control plane that manages OpenClaw and Hermes without replacing either runtime. The codebase separates the API, UI, and workers. In the Kubernetes deployment, the control plane, PostgreSQL, and LiteLLM run in the operator’s namespace, with one pod per running agent. Operators select the runtime per agent; the platform manages its Kubernetes resources, configuration, Skills, and lifecycle. The local stack also includes Redis and Garage S3-compatible storage.
Slack, Microsoft Teams, Telegram, and Discord connect through per-agent communication connections. These are separate from tool access, which uses Skills and attached credentials. Model calls go through the operator’s LiteLLM proxy to OpenRouter using a virtual key assigned to the agent. An ingest service receives runtime telemetry; conversation history, tool-call logs, and domain events give operators several ways to review what happened.
Key Capabilities & Differentiators
Administrators can start, stop, and monitor agents, select models within organization policy, and set agent-specific channel allowlists and DM rules. Organization roles and per-agent access roles are isolated at the data layer. An agent can have several chat connections, including multiple connections on one platform. Slack apps must be created from a generated manifest, while Teams connections export an installable app package.
Organizations can fork versioned templates and Skills seeded at startup, apply per-agent overrides, and pin Skill versions. Workflows can publish private artifacts using per-agent storage, with short-lived app download links and permission-gated deletion. LiteLLM virtual keys support token and spend attribution by agent and organization, but recent calls may not appear until the next cost sync. Templates such as Jira Task Helper provide workflow starting points, not preconfigured access to external systems.
Trade-offs & Limitations
Compared with running OpenClaw or Hermes directly, Agent Barn is most useful when several teams need shared lifecycle management, permissions, audit records, and cost attribution. For a single agent with one owner, the cluster, database, proxy, and gateway services add operational work. The control plane does not unify command approvals across runtimes, so teams should validate tool permissions and approval behavior on the runtime they intend to use.
Compared with a hosted service, self-hosting puts the control plane and encrypted PostgreSQL credentials under your administration, but also makes you responsible for cluster operations and integrations. It does not make the deployment offline: the standard model path goes to OpenRouter, connected tools receive API traffic, and enabled product analytics adds another outbound path. Size the deployment by measuring control-plane and storage overhead, then test at the expected number of active agent pods and level of tool activity. The Apache-2.0 license covers Agent Barn, not the terms of external services.
Hardware & Deployment Guide
For local evaluation, copy .env.spec to .env, configure PostgreSQL, admin credentials, and signing and encryption keys, then run ./run.sh. The Docker Compose development stack requires Compose v2.24 or later, plus Git, Bash, kubectl, OpenSSL, curl, and uv; uv supplies Python 3.14 for the host-side Garage bootstrap. The script brings up k3d and LiteLLM, builds and loads both runtime base images, starts PostgreSQL and Redis, and applies migrations. The initial build takes longer than subsequent starts. Verify the API at /api/v1/health, check the agent-farm namespace, and create an organization before creating an agent.
Use the charts in helm/ and helmfile.yaml.gotmpl for production Kubernetes, not the hot-reloading compose.yml. Preserve LITELLM_SALT_KEY across upgrades and restores: changing it makes stored provider keys unreadable. The memory gateway requires Hindsight; the optional local-hindsight profile supplies it locally. The standard inference path needs an OpenRouter key, not local GPU inference. Release v0.26.0 adds Custom Slack support for Hermes agents on a client’s self-hosted Slack.
Teams already operating Kubernetes that want to run multiple chat-connected OpenClaw or Hermes agents with scoped tool credentials, shared audit records, and per-agent spend reporting.
You only need one agent, want a production deployment without Kubernetes, or require fully offline inference without an external model API.
Quick Start & Installation
curl -s localhost:8000/api/v1/health # {"status":"ok","db":"connected"}
Comparison vs. Top Agents & Frameworks Alternatives
Full comparison →| Repository | Stars | 7d Trend | Stack | License | Core Positioning |
|---|---|---|---|---|---|
| agent-barn ★ | 116 | +4 | Python | Apache-2.0 | Self-hosted Kubernetes control plane for AI agent access, audit, and spend |
| dify | 162.4k | +370 | Python | — | Visual workflow and RAG workspace for building and serving LLM apps |
| AutoGPT | 188.3k | +74 | Python | — | Coordinate specialist AI agents through chat and build repeatable visual workflo |
| n8n | 213.1k | +787 | TypeScript | — | Visual Node.js platform for self-hosted workflows and multi-step AI agents |
AI Context Briefing (for Claude / Cursor / Windsurf)
Standardized architecture summary & quickstart commands ready to paste into coding agents.
curl -sL https://repoforai.com/repo/aai-labs/agent-barn.md
Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).
Frequently Asked Questions about agent-barn
Does connecting an agent to Slack also give it Jira access?
Do I need a GPU, and what should I size the cluster for?
Can we use Agent Barn commercially, and does self-hosting keep all data in our cluster?
When is Agent Barn preferable to running OpenClaw or Hermes directly?
Upstream README & Documentation
This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.
Top 10 Breakout Open-Source AI Repos, Every Thursday
Signal-only digest of fast-growing AI repos, SPDX license alerts, and architecture picks. Zero spam.
Zero spam · 1-click unsubscribe · Privacy Policy