# Agent Barn

> Open-source, self-hosted control plane for running and governing fleets of AI agents on your own Kubernetes cluster.

Agent Barn is an open-source control plane from AAI Labs for defining AI agents, connecting them to team tools and chat platforms, and running them in your own Kubernetes cluster. Agents are reachable from Slack, Microsoft Teams, Telegram, and Discord, and the project is released under the Apache 2.0 license.

## What It Is

Agent Barn is an orchestration layer for agents. It runs runtimes such as OpenClaw and Hermes, one pod per agent, and adds the management layer needed to operate many agents: templates, skills, credentials, model routing, activity logs, and cost tracking. Everything, including the control plane, database, model proxy, and agent pods, runs in your namespace.

## How Agents Are Built and Run

An agent is a template plus a model, one or more communication connections, and a set of credentialed skills. Templates are versioned Markdown bundles (role, identity, tools, startup behavior, restrictions) with a settings file, and organisations can fork or override them per agent. Seed templates include PR Reviewer, Documentation Agent, Email Reminder, Jira Task Helper, Scrum Master, and General Purpose. Bundled skills cover services such as Jira, Confluence, GitHub, Bitbucket, Google Drive, HubSpot, Pipedrive, and Zoho Mail; a skill is attached once its credential is present. Each agent gets its own virtual key on a LiteLLM proxy, with model calls routed through OpenRouter.

## Observability and Governance

The control plane records conversation history, a tool-call log, and a domain-event trail, and attributes token spend per agent and per organisation. Access is multi-tenant, with organisation roles and separate per-agent access roles. Credentials are encrypted at rest in your PostgreSQL.

## Deployment Path

A local stack starts with a run script using Docker, k3d, and an OpenRouter API key. Production deployment uses Helm and Helmfile on a Kubernetes cluster with PostgreSQL. By default installs send pseudonymous usage analytics to the vendor's PostHog project, which can be disabled with a configuration setting. The vendor also offers scoped pilots for workflows such as manufacturing and legal operations.

## Features
- Agents in Slack, Microsoft Teams, Telegram, and Discord
- Per-agent model with LiteLLM virtual keys
- Per-agent token and spend attribution
- Versioned agent templates and skills
- Choice of OpenClaw or Hermes runtime per agent
- Conversation history, tool-call log, and domain-event audit trail
- Multi-tenant organisations with per-agent access roles
- Encrypted credential storage
- Scheduled reports and workflows
- Helm and Helmfile Kubernetes deployment
- Programmatic API with Personal API Keys

## Integrations
Slack, Microsoft Teams, Telegram, Discord, Jira, Confluence, GitHub, Bitbucket, Gmail, Google Drive, HubSpot, Pipedrive, Zoho Mail, OpenRouter, LiteLLM, PostgreSQL, Kubernetes, Helm, PostHog, Apollo

## Platforms
WINDOWS, MACOS, LINUX, WEB, API, CLI

## Pricing
Open Source, Free tier available

## Version
v0.20.0

## Links
- Website: https://agentbarn.dev
- Documentation: https://agentbarn.dev/guides
- Repository: https://github.com/aai-labs/agent-barn
- EveryDev.ai: https://www.everydev.ai/tools/agent-barn
