Run an AI agent company — not a pile of prompts.
Crewlet is an open-source engine for orchestrating hierarchically organized AI agent companies. It treats the organizational hierarchy as the primary orchestration structure — knowledge, permissions, communication, and decisions are all scoped by position in the org chart.
name: "Acme AI"mission: "Ship AI-powered products fast"
policies: - "All features need PM sign-off before development starts" - "Communicate decisions in writing"
providers: llm: default: type: anthropic model: claude-sonnet-5 api_keys: - "${ANTHROPIC_API_KEY}" embeddings: type: openai model: text-embedding-3-small api_key: "${OPENAI_API_KEY}" # used by the agent-learning subsystem # (diary vector search + episode recall)
# Org-wide roles — these sit above all teams and manage team leads.roles: # You, in the chart. A `kind: human` seat is addressable but never # spawned (no runtime, no inbox, no LLM) — it gives escalation a person # to stop at, and lets agents recognise your activity on the surfaces # you connect later. Needs at least one `contact` identity; scope # `manages` to the top seat so you aren't copied on everything. - name: Your Name kind: human manages: [CEO] contact: slack_user_id: "${SLACK_FOUNDER_USER_ID}" # your Slack member ID
- name: CEO handle: ceo # see the note under this block — set these now goal: "Set product vision, prioritize initiatives, and make final calls" backstory: "Experienced founder who balances speed with quality" manages: [CTO, PM] # A zero-integration way to see your first agent turn: a scheduled task. # Delete this once you have real integrations delivering work. schedules: - name: hello-crewlet cron: "*/5 * * * *" task: "Write a short status note on what the company should focus on this week."
# Flexible org structure — use any nesting depth and unit types.units: - name: Product Management type: team lead: PM purpose: "Define what gets built and why" roles: - name: PM handle: pm goal: "Turn business goals into clear specs and prioritized backlogs" backstory: "Data-driven product manager who writes crisp requirements" manages: [Engineer]
- name: Core Engineering type: team lead: CTO purpose: "Build and ship the product" goals: - "Ship MVP in 4 weeks" - "Maintain test coverage above 80%" roles: - name: CTO handle: cto goal: "Set technical direction, make architecture decisions, unblock engineers" backstory: "Senior architect with deep distributed systems experience" manages: [Engineer]
- name: Engineer handle: eng goal: "Implement features, write tests, and ship quality code" backstory: "Full-stack engineer who writes clean, tested code"debug: true
providers: queue: type: pulsar url: "pulsar://localhost:6650" # the compose broker database: dsn: "postgresql://crewlet:crewlet@localhost:5432/crewlet" # the compose DB knowledge: type: pgvector
api: host: "0.0.0.0" port: 8000 # a port > 0 makes `crewlet run` serve the API EMBEDDED in # the engine process (dashboard + webhooks included) — one # process is the whole stack. (Avoid 8080: that's Pulsar's # admin port in the bundled compose. The full Nimbus example # uses port 80 instead so webhook URLs need no port suffix — # see examples/nimbus.config.yaml for the trade-offs.) auth: tokens: - id: founder token: "${CREWLET_API_TOKEN_FOUNDER}"pip install crewletexport CREWLET_API_TOKEN_FOUNDER="$(openssl rand -hex 32)"export ANTHROPIC_API_KEY="sk-ant-..."export OPENAI_API_KEY="sk-..." # embeddingsexport SLACK_FOUNDER_USER_ID="U0FOUNDER" # your Slack member ID (the human seat)Getting Started
Section titled “Getting Started”Prerequisites, install extras, and the local Pulsar + PostgreSQL stack
Build a four-agent company and watch its first turn, with LLM provider options (Anthropic / OpenAI / any OpenAI-compatible)
The decision guide for every external dependency: the tracker and knowledge base, the code host, the code sandbox, chat, email — what each path sets up for you, and what you must create manually
Let an AI write your company config: a step-by-step walkthrough, the company-architect skill, crewlet schema for editor autocomplete, and the crewlet validate --json fix loop
Full YAML config schema and examples
Core Concepts
Section titled “Core Concepts”How the engine works, one subsystem per page:
The org chart as execution graph, design principles, high-level architecture
Two-tier config (ops-owned config.yaml + founder-owned versioned PostgreSQL), bootstrap sequence, unconfigured state, live propagation, auth, snapshot/rollback, whole-config encryption at rest
Encrypted secret_values table consulted ahead of os.environ when resolving ${VAR}: crewlet secrets set/list/unset/get/rekey, the --secret-store provisioning sink that hands minted credentials straight to the engine, store-wins precedence, and the Tier A root-of-trust boundary
Hierarchy, departments, teams, roles (seats), handles
Human seats (kind: human): hierarchy membership, contact identities, notify delivery, escalation terminus, prompts and lookup
Agent lifecycle, states, execution model, graceful shutdown
Per-agent Plan / Execute / Review loop, sub-agents, colleague-surface tools, per-phase LLM models
Sandboxed coding-agent execution: the run_sandbox tool, E2B cloud/self-hosted, Claude Code & OpenCode runners, git-auth recipes, mid-run clarifications
Knowledge-base-sourced prompt fragments (Confluence or Plane pages) that teach agents how to use each tool / MCP server
How the engine stays tool-stack agnostic: capability prose + MCP annotations, no hardcoded tool names
EventQueue, topics, routing, inbox batching, distributed tracing
ExecutionTracker, external PM tool integration
Role/unit-scoped cron-style recurring work (standups, audits, nightly jobs)
Query-time knowledge-base search behind the KnowledgeSearcher seam (Confluence CQL or Plane page search — one backend per org) + private agent_diary
Reflection loop, skill induction, episodic memory, counterparty profiles
Manager↔report coaching as a usage pattern over the scheduler + A2A bus + learning loop
DACI model for multi-agent decisions
Integrations
Section titled “Integrations”Connecting the external surfaces agents work on:
Self-hosted tracker and knowledge backend in one product: webhook routing, per-role MCP tools, knowledge search, crewlet plane import, tool-skill sync, skill promotion, crewlet plane provision, and a complete local docker-compose loop
Webhooks (Forge app for Cloud, direct for Data Center), MCP tools, per-team projects
Webhooks, MCP tools, query-time CQL knowledge search, crewlet confluence import
gitlab.com or self-hosted: API-provisioned per-agent service accounts, crewlet gitlab provision, webhook routing, per-role MCP tools, sandbox code authoring
Per-role remote MCP tools for read/review/track; sandbox code authoring
One-app-per-agent setup with automated app provisioning via crewlet slack provision (App Manifest APIs), thread routing, and the per-phase working indicator
Build your own notification transport
Guides
Section titled “Guides”Built-in tools, MCP integration, tool registry
Extension system, hooks, writing extensions
Docker, Pulsar sizing & auth, TimescaleDB observability, tracing
End-to-end curl recipes for bootstrapping a company through /config/*
Reference
Section titled “Reference”Command reference
REST API routes and schemas
The dashboard’s visual system: tokens, the shared panel recipe, the validated categorical hues, and the rules a change has to keep
All configuration env vars
Why certain architectural choices were made
Part of Crewlet. Generated from crewlet/crewlet v0.1.0 at b40ea18.