Agent Barn

Run a fleet of AI coworkers in Slack, Teams, Telegram, and Discord on your own Kubernetes.

Stars
★ 116
Last updated
1d ago v0.26.0
FARS reviewed
Nov 08, 2026 +5 new
License
Apache-2.0
Primary language
Python

At a glance

How it runs
Self-hosted serviceWeb appChat bot
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
Docker with Compose v2kubectlOpenSSLcurlOpenRouter API keyPostgreSQLRedisk3d (local, provided via helper container)Shell / CLINetwork accessLocal filesystem
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.

  1. 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.
  2. 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.
  3. Engineering or finance leads who need per-agent and per-organisation token and spend attribution rather than a single monthly bill.
  4. 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.
  5. 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.
  6. 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_PASSWORD POSTGRES_PORT SECRET_SIGNING_KEY AGENT_TOKEN_ENCRYPTION_KEY OPENROUTER_API_KEY LITELLM_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 .env

Generate 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.sh

Deploying 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.sh

How 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-farm

Agents 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.json

The 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)

Local shell command execution

Can run terminal commands; pair with approval gates or container/OS sandboxing.

Local filesystem read/write

Modifies local files; work on a clean Git branch or dedicated worktree.

Outbound network access

Makes outbound requests; verify telemetry settings and model data routing on private repos.

FARS trust-control audit

Verified present in source (3/3)
  • data-flow disclosure

What are this agent's strengths and limitations?

Pros
  • 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.
Limitations
  • 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?

FollowAgents source review · FARS-2.1
Some gaps
72/ 100 5-point scale 3.6 / 5
This review covers the source as of Nov 08, 2026. The project has shipped 5 stable release(s) since, which have not been re-reviewed. The score and verdict describe the reviewed version only. Recent releases ↓
Trust 18/29
Reliability 9/14
Adaptability 15/18
Convention 15/18
Effectiveness 10/13
Verifiability 5/8
Why each dimension lost points
Trust18 / 29 · 3.1/5

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.

Reliability9 / 14 · 3.2/5

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.

Adaptability15 / 18 · 4.2/5

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.

Convention15 / 18 · 4.2/5

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.

Effectiveness10 / 13 · 3.8/5

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.

Verifiability5 / 8 · 3.1/5

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.

Risks and how to mitigate them
  • 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.
Evidence confidence: Low Reviewed Nov 08, 2026 Reviewed revision 724a8ace2603 New commits since this review; the score may not cover them
See the full review method →
Maintain this project? Add the FARS badge to your README

The badge shows the current review score and verdict and links back to this page. It refreshes about once an hour after a re-review.

FARS

[![FARS review](https://followagents.com/badge/agent-barn.svg)](https://followagents.com/en/agents/agent-barn)
<a href="https://followagents.com/en/agents/agent-barn"><img src="https://followagents.com/badge/agent-barn.svg" alt="FARS review"></a>

Recent releases

Latest entries from the project's GitHub Releases. Notes are quoted from upstream as written, not rewritten or tested by FollowAgents.

  1. v0.26.0
    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.0
    View on GitHub ↗
  2. v0.25.0
    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.0
    View on GitHub ↗
  3. v0.24.0
    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.0
    View on GitHub ↗

FAQ

Is the product itself paid, and where do the costs come from?
The repository is Apache-2.0, so installing and self-hosting it is free. You must supply your own OpenRouter API key and pay per model call; each agent gets its own LiteLLM virtual key, which makes token and spend attribution possible per agent and per organisation. The infrastructure bill — Kubernetes, PostgreSQL, Redis, storage — is yours as well. Note that the LiteLLM master key must never change, because LiteLLM encrypts stored virtual keys with it and rotating it breaks every agent created under the old value.
What data leaves my cluster?
Outbound traffic goes to OpenRouter through the LiteLLM proxy you operate, to whichever tool APIs you connect, and, while ANALYTICS_ENABLED is true (the default), to Agent Barn's PostHog EU project. Analytics events cover things like agent creation, start and deletion, organisation changes, members joining, sign-ins and invites, plus an hourly message count per agent. They carry random user, organisation and agent IDs and an install name defaulting to your web app host, and never agent or organisation names, prompts, message content, conversations, credentials, changed values, email addresses or full names. Set ANALYTICS_ENABLED=false in .env.deploy and redeploy to opt out.
An agent starts but never answers. What should I check first?
Check AGENT_LITELLM_BASE_URL. It is handed to the pod as LITELLM_PROXY_TARGET and must use http://host.docker.internal:<litellm port>, because a loopback address resolves to the pod itself. If activity is also empty, verify the ingest hop on port 8001, where each pod authenticates with its own INGEST_API_KEY, using the documented curl check from inside the cluster. In the native path, set LITELLM_BASE_URL=http://127.0.0.1:7070 — when it is blank, create_agent silently skips minting a LiteLLM key and the agent looks fine but can never reply.
Can we remix the shipped templates and skills for our own processes?
Yes. Templates are content rather than code: a settings.yaml plus Markdown artifacts, seeded once to bootstrap the platform lineages, after which new versions are authored through the platform admin flow and organisations fork or override them per agent. Agents pin the skill version they run. Skills are gated on the credential their provider needs, so only credentialed skills are auto-attached; Excel, Google Drive, HubSpot, OpenPanel and PostHog are attachable but not auto-attached, and Excel needs no credential because it works on local files.
Which chat platforms can agents live in, and can one agent cover several?
Slack, Microsoft Teams, Telegram and Discord, plus Web Chat and Email via the communications gateway on port 8002 and a Cloudflare Email Worker. An agent may own several connections, including more than one on the same platform. Slack apps are created by hand from a generated manifest, Teams connections export an installable app package, and inbound email requires a manual Cloudflare routing rule pointing agent@<AGENT_EMAIL_DOMAIN> at the deployed Worker with subaddressing turned on.
Was this page helpful?
View on GitHub ↗ Install ↓

Related concepts