Agent Barn
Run a fleet of AI coworkers in Slack, Teams, Telegram, and Discord on your own Kubernetes.
- Source repo
- aai-labs/agent-barn
- Stars
- ★ 116
- Last updated
- 1d ago v0.26.0
- FARS reviewed
- Nov 08, 2026 +5 new
- License
- Apache-2.0
- Primary language
- Python
- FA score
- 72/100 · Some gaps
At a glance
- How it runs
- Works with
- Portable with changesOpenAI API (Needs adaptation)
- Cost
- Free software; you pay for model usage
- Setup effort
- High · needs real infrastructure
- You'll need
- Typical use
- Platform teams already running Kubernetes who want internal assistants for their department living in their own namespace, instead of asking colleagues to sign into another SaaS.
- Not a fit if
- Teams unwilling to operate a Kubernetes cluster plus PostgreSQL and Redis
- Individuals who want a turnkey SaaS and won't supply an OpenRouter key
- Website
- agentbarn.dev ↗ set on GitHub
- Maintenance
- Commits in the last 30 dayslast commit 2026-12-02latest release v0.26.0 (2026-11-24)+0.6 ★/day over 7 days
- Source review
- 72/100 · Some gaps
What does this agent do, and when should you use it?
Agent Barn is an Apache-2.0 licensed, open-source control plane for AI agents from AAI Labs in Vilnius, Lithuania. It is assembled from a FastAPI control plane (api/, including the ingest, communications, memory and credential gateways plus a Dramatiq worker), a Next.js App Router frontend (ui/), one pod per running agent built from two pinned base images named OpenClaw and Hermes, and a Helm/Helmfile deployment layer (helm/, helmfile.yaml.gotmpl). An agent is defined as a template plus a model, one or more communication connections, and a set of credentialed skills; templates are content, not code, authored as settings.yaml plus Markdown artifacts (soul, identity, user, tools, agents, boot, bootstrap, heartbeat) and seeded on startup. Model traffic flows through a LiteLLM proxy you operate, with one virtual key per agent, so token and spend attribution is per agent rather than one opaque monthly figure. Everything — control plane, database, model proxy, and each agent pod — runs in your namespace (the shipped namespace is agent-farm), with credentials encrypted at rest in your own PostgreSQL. The software is free, but you bring an OpenRouter API key and pay for model usage.
Agent Barn reads your .env or .env.deploy configuration, brings up a k3d cluster via docker/k3d/k3d-up.sh for local use (or targets a real cluster on deploy), and turns each agent record into Kubernetes resources built by builders that can be reconciled with make reconcile. Every running agent is a pod launched from a pinned base image; the two supported runtimes, OpenClaw and Hermes, consume the same runtime-neutral communications protocol, so every messaging platform works on either one. Agents stream conversation and tool-call events from in-pod runtime plugins to the ingest API on port 8001, and the UI reads only what was persisted; Web Chat and Email go through the separately served communications gateway on port 8002, where pods claim and complete deliveries via http://host.docker.internal:8002/communications/v1. Skills mount provider documentation into the agent workspace and are gated on the credential their provider needs, so a skill is attached only once the matching credential exists; agents also reach a self-hosted Firecrawl for web retrieval. Model calls are minted per agent as LiteLLM virtual keys and forwarded to OpenRouter, giving per-agent and per-organisation token and spend attribution. Identity covers sign-up, login, logout, access and refresh tokens in an httpOnly cookie, password change and reset, organisations with fixed permission-backed roles, and separate per-agent access roles and assignments. Platform administration covers users, organisations, statistics and the Event Delivery Monitor, while domain events run through a transactional outbox, a Dramatiq worker and a security-audit projection. Each agent also has conversation history and a tool-call audit log.
- Platform teams already running Kubernetes who want internal assistants for their department living in their own namespace, instead of asking colleagues to sign into another SaaS.
- Companies with data-residency or compliance constraints that require credentials, conversations and model traffic to stay in their own PostgreSQL and network, reaching OpenRouter only through a self-operated LiteLLM proxy.
- Engineering or finance leads who need per-agent and per-organisation token and spend attribution rather than a single monthly bill.
- Development teams that want fixed roles such as PR Reviewer, Documentation Agent or Jira Task Helper and can start one straight from the shipped template seeds.
- Multilingual teams that need plain-language requests turned into structured Jira tasks, merged pull requests documented into Confluence, or a weekly Slack digest posted automatically.
- Teams evaluating the OpenClaw and Hermes runtimes side by side, since both share one communications protocol and can be chosen per agent along with the command-approval mode.
Key setup facts
Pulled from the install and usage notes below. The project README has the current values.
- Environment variables
POSTGRES_PASSWORDPOSTGRES_PORTSECRET_SIGNING_KEYAGENT_TOKEN_ENCRYPTION_KEYOPENROUTER_API_KEYLITELLM_MASTER_KEY- Config files
.env.spec.env.env.deploy.k3d/kubeconfig-host.yaml- Install notes cover
- Docker
How do you install or deploy this agent?
You need Git, Docker with Compose v2, bash, kubectl, OpenSSL, curl and an OpenRouter API key; Python and Node.js are only needed for the native dev-* targets, tests and lint. Ports 3000, 5432, 7070, 8000, 8001, 8002, 8003, 8004 and 16443 must be free.
Clone the repository and create your local configuration:
git clone https://github.com/aai-labs/agent-barn.git
cd agent-barn
cp .env.spec .envGenerate the two keys — the Fernet key encrypts platform credentials at rest, and the LiteLLM master key must stay stable because LiteLLM encrypts the virtual keys it stores with it:
openssl rand -base64 32 | tr '+/' '-_'
echo "sk-$(openssl rand -hex 16)"Fill in POSTGRES_USER, POSTGRES_PASSWORD, POSTGRES_DB and POSTGRES_PORT, SECRET_SIGNING_KEY, PLATFORM_ADMIN_CREDENTIALS (email:password, at least 8 characters with upper, lower and a digit), AGENT_TOKEN_ENCRYPTION_KEY, OPENROUTER_API_KEY, LITELLM_MASTER_KEY, AGENT_LITELLM_BASE_URL=http://host.docker.internal:7070, and full image tags for OPENCLAW_IMAGE and HERMES_IMAGE whose tags match openclaw-base/VERSION and hermes-base/VERSION.
Then start the full stack (the first run builds both agent base images and takes a while):
./run.shDeploying to Kubernetes instead requires a cluster with an ingress controller, a cert-manager ClusterIssuer and a StorageClass, plus kubectl, Helm 3, Helmfile 0.171.0 and the helm-diff plugin on your machine:
cp .env.deploy.spec .env.deploy
# replace every example image tag; fill in registry, passwords, hosts and keys
./deploy.shHow do you use this agent?
Once the stack is up, open the UI and sign in with the email:password from PLATFORM_ADMIN_CREDENTIALS, then confirm the API and the cluster agents will run on are healthy:
curl -s localhost:8000/api/v1/health
# {"status":"ok","db":"connected"}export KUBECONFIG=.k3d/kubeconfig-host.yaml
kubectl get nodes
kubectl get ns agent-farmAgents are organisation-scoped and a fresh database has none, so create an organisation first. Then pick a template (PR Reviewer, Documentation Agent, Email Reminder, Jira Task Helper, Scrum Master or General Purpose), choose a model, attach any credentials its skills need, and start it. Connecting it to Slack, Microsoft Teams, Telegram or Discord is a per-agent Communication Connection, and the UI walks through each platform's setup including manual creation of a Slack app from the generated manifest.
For programmatic access, create a Personal API Key in Account settings and call the existing user-authenticated /api/v1 routes:
curl -H 'Authorization: Bearer <your-personal-api-key>' \
https://your-host/api/v1/openapi.jsonThe deployed API also serves an interactive reference at /api/v1/docs, an OpenAPI schema at /api/v1/openapi.json and agent guidance at /llms.txt. For fast iteration, switch to the native path (make setup, make db-up, make migrate, then make dev-api, dev-ui, dev-worker and the other dev-* targets), but make sure DB_CONNECTION_URL is correct in .env and that LITELLM_BASE_URL is set to http://127.0.0.1:7070, since nothing fills it in and agents will silently be created without a usable LiteLLM key.
Safety boundaries, hardening & integrations
Operational blast radius, source-verified safety controls, and first-run hardening steps before connecting this agent to real workspaces.
Declared capability surface (blast radius)
Can run terminal commands; pair with approval gates or container/OS sandboxing.
Modifies local files; work on a clean Git branch or dedicated worktree.
Makes outbound requests; verify telemetry settings and model data routing on private repos.
FARS trust-control audit
- data-flow disclosure
What are this agent's strengths and limitations?
- Fully self-hosted data path: the control plane, PostgreSQL, LiteLLM proxy and every agent pod run in your namespace, credentials are encrypted at rest in your own database, and outbound model traffic goes only through the proxy you operate.
- Per-agent metering that most chat assistants do not expose: each agent gets its own LiteLLM virtual key, enabling token and spend attribution per agent and per organisation.
- Multi-tenancy is built into the data layer, with organisations on fixed permission-backed roles, separate per-agent access roles and assignments, versioned templates and skills that organisations can fork or override, and agents pinned to the skill version they run.
- Broad delivery surface for internal tools: Slack, Microsoft Teams, Telegram and Discord, with multiple connections per agent, plus Web Chat and Email through a dedicated communications gateway.
- Complete Helm and Helmfile deployment layer, including separate PostgreSQL instances for the app, LiteLLM and Firecrawl, Redis, Hindsight, and a namespace-scoped Prometheus and Grafana, alongside k3d scripts for local clusters.
- Auditability is a first-class feature: conversation history, a tool-call log, domain events via a transactional outbox and Dramatiq worker, and a security-audit projection, with an Event Delivery Monitor in platform administration.
- Setup is heavy by design: Git, Docker Compose v2, kubectl, OpenSSL, curl and an OpenRouter key locally, plus an ingress controller, cert-manager ClusterIssuer, StorageClass, Helmfile 0.171.0 and helm-diff for a real deployment.
- Kubernetes is not optional. Agents run as pods, the native development path still needs a k3d cluster with loaded images, and two full ./run.sh stacks cannot run side by side on one machine because container names, volumes and ports are shared.
- The model egress path is currently tied to OpenRouter through LiteLLM, so you need an external API key and pay per use; there is no documented alternative provider adapter in the repository.
- Some views depend on extra infrastructure: without Prometheus the Resource usage tab and the Agents overview report that resource usage is not configured.
- Several steps remain manual: Slack apps must be created by hand from a generated manifest, and the Cloudflare Email Worker routing rule cannot be configured by CI, so inbound mail bounces with 550 5.1.1 until someone points the rule at the Worker with subaddressing enabled.
- Paid-by-default telemetry: installs send business events to Agent Barn's PostHog EU project unless ANALYTICS_ENABLED is set to false and the deployment is redone, and local development stacks report too.
How does this agent compare with similar options?
Key facts side by side with the most closely related agents.
| Agent | Source review | Form / cost | Stars | Updated | Language | Full support on |
|---|---|---|---|---|---|---|
| Agent Barn This agent | 72 · Some gaps | Self-hosted serviceFree + model costs | ★ 116 | 1d ago | Python | — |
| MATE — Command Center for AI Agents | 72 · Some gaps | Self-hosted serviceFree + model costs | ★ 112 | today | Python | OpenAI API · Claude API |
| Moltis Personal Agent Server | 58 · Major gaps | Self-hosted serviceFree + model costs | ★ 3k | 1mo ago | Rust | Codex · Claude Code |
| Second Brain Personal AI Assistant | 58 · Major gaps | CLIFree + model costs | ★ 691 | 2mo ago | Python | — |
How does FollowAgents rate this agent?
Why each dimension lost points
The source and documentation describe per-agent access roles, channel allowlists, DM policies, encrypted credentials, and audit records. An ADR also documents deny-by-default behavior and current membership authorization, supporting a meaningful least-privilege score. Destructive file or workbook operations have confirmation or refusal safeguards, and failed inbound mail is rejected; however, OpenClaw command approval is always AUTO and per-action confirmation for ordinary external effects is not fully evidenced. The README names traffic to OpenRouter, tool APIs, and optional analytics, while the security policy describes credential keys and operator responsibilities. The packet does not establish complete handling of every sensitive-data path, dependency auditing, or supply-chain risks. Startup, stopping, and migrations are documented, but a complete rollback procedure is not evidenced. Security reporting channels are clear; publisher identity is unknown and verifiable source-to-release attribution is thin.
The docs, configuration, and code show reasonably clear service boundaries and failure handling, including health checks, structured CLI errors, inbound mail timeouts and rejection, and explainable states when Prometheus is unavailable. CI workflows cover multiple components and integration checks, but static workflow files do not show that checks actually passed. Local deployment and graceful-degradation notes support dependency availability, though the product still relies on external model and tool services and cluster infrastructure.
The product targets operators running team agents on their own Kubernetes infrastructure and provides several chat platforms, templates, skills, two runtimes, and a native development path. The security policy explains that agent permissions depend on attached credentials and that operators own parts of deployment security; skill documents also describe applicability and limitations. Scenarios are broad, but boundaries are spread across documents rather than consolidated into a single decision guide, so scores remain conservative.
The README provides a contents map, feature-document routing, quick start, environment variables, ports, troubleshooting, stop procedures, and contribution guidance. The Apache-2.0 license text is present. The security policy states supported-version expectations and ADRs have dates and statuses, but the packet does not show a continuous release changelog, and names retain older terms such as Agent Farm. Several important limits are explicit, including AUTO command approval for OpenClaw, key-rotation implications, and metrics retention. Vulnerability reporting and response targets are documented, but publisher identity is unverified and evidence of a broader maintenance commitment is limited.
The control plane combines runtime management, access control, cost attribution, activity auditing, and cluster deployment, giving it clear incremental value. JSON CLI output, audit views, and cost/resource views support practical workflows, though the provided examples are insufficient to assess usability across all outputs and users. Deployment requires Kubernetes, multiple services, a model proxy, and external credentials, creating meaningful operating costs; the local quick start and self-hosting model partly offset them.
Many claims are traceable to feature documents, ADRs, configuration, or workflows; resource-usage paths, permissions, and retention are described across sources. The README's product overview is corroborated by some supplied code and documentation, but not every advertised capability has corresponding implementation evidence in this packet. The text generally distinguishes implemented behavior, limitations, and design rationale. Because this is a sample of repository files, repository-wide consistency cannot be confirmed, and no runtime outcome is inferred.
- OpenClaw command approval is fixed to AUTO; assess the scope of credentials, channels, and tools available to agents before deployment.
- Deployment depends on Kubernetes, a model proxy, external model/tool APIs, and operator-managed keys. Model traffic leaves the self-hosted network, and enabled analytics also sends outbound traffic.
- This assessment uses only the supplied static file sample; the presence of CI workflows does not establish that this revision passed them.
Recent releases
Latest entries from the project's GitHub Releases. Notes are quoted from upstream as written, not rewritten or tested by FollowAgents.
-
Release notes excerpt
What's Changed Communications * feat(communications): let Hermes Agents chat on a client's self-hosted Slack (Custom Slack) by @kalibetre in https://github.com/aai-labs/agent-barn/pull/409 Full Changelog: https://github.com/aai-labs/agent-barn/compare/v0.25.0...v0.26.0View on GitHub ↗ -
Release notes excerpt
What's Changed * Merge staging into main by @kalibetre in https://github.com/aai-labs/agent-barn/pull/408 Full Changelog: https://github.com/aai-labs/agent-barn/compare/v0.24.0...v0.25.0View on GitHub ↗ -
Release notes excerpt
What's Changed * Merge staging into main by @kalibetre in https://github.com/aai-labs/agent-barn/pull/404 Full Changelog: https://github.com/aai-labs/agent-barn/compare/v0.23.0...v0.24.0View on GitHub ↗
FAQ
Is the product itself paid, and where do the costs come from?
What data leaves my cluster?
An agent starts but never answers. What should I check first?
Can we remix the shipped templates and skills for our own processes?
Which chat platforms can agents live in, and can one agent cover several?
Thanks — we use this to improve the page.
Subscribe to the FollowAgents RSS feed, or save this agent to your browser shortlist to compare on your next visit.