Dockerize your AI capabilities.
AgentUnit provides a standard (agentunit.yaml) and a CLI tool (au) to package any AI Agent into a self-contained, versioned, and governable business unit.
Think of it as defining the RPM/DEB for AI Agents. Not a framework, not a runtime, but a packaging standard.
Today, AI Agents are like "scripts" — hard to reuse, harder to trust. Enterprise needs business assets, not experiments.
AgentUnit solves this by turning an Agent into a Unit that has:
- Identity — Who made it? What version?
- Contract — What does it receive? What does it return?
- Governance — Who is responsible? Is audit enabled?
- Reproducibility — Packaged as a Docker image with all dependencies
Get a PRD Writer running in 4 steps:
# 1. Install
pip install git+https://github.com/agentunit-io/agentunit.git
# 2. Scaffold a new unit
au init prd-writer
# 3. Validate and pack
cd prd-writer
au validate
au pack -t prd-writer:1.0.0
# 4. Run it
au run prd-writer:1.0.0 --serve --port 8091Now you have a Docker container running a structured AI business unit.
One-shot mode is also available:
echo '{"prompt": "Build a todo app"}' > input.json
au run prd-writer:1.0.0 --input input.jsonOpen a browser-based UI to call your running Unit:
pip install streamlit requests
streamlit run examples/invokers/streamlit_invoker.pyThen open http://localhost:8501, connect to http://localhost:8091, and click Run.
Every Unit declares what it is. No magic, just a clear contract.
apiVersion: agentunit.io/v1alpha1
kind: AgentUnit
metadata:
name: prd-writer
version: "1.0.0"
description: "Turns requirement notes into structured PRDs"
contract:
inputs:
type: object
properties:
requirement_notes:
type: string
required: [requirement_notes]
outputs:
type: object
properties:
prd_document:
type: string
quality_score:
type: number
governance:
require_human_approval: true
audit_enabled: true
runtime:
framework: "generic-python"
entry: "app.py"
model:
provider: "openai"
name: "gpt-4o"
build:
base_image: "python:3.11-slim"
port: 8091
env:
MODEL_API_KEY: ""See spec/agentunit-spec-v0.1.md for the full specification.
agentunit.yaml → au validate → au pack → Docker Image
│
┌───────────┴───────────┐
│ au run --serve │
│ au run --input │
└───────────────────────┘
- Define — Write
agentunit.yamlto declare your Unit's identity, contract, and runtime - Validate — Check the spec against JSON Schema and file references
- Pack — Generate a Dockerfile and build a Docker image
- Run — Execute as a one-shot task or an HTTP server
AgentUnit is framework-agnostic. Built-in adapters:
| Adapter | Status |
|---|---|
generic-python |
Complete |
langchain |
Skeleton |
Use au init --framework generic-python to scaffold with a specific adapter.
Community adapters can be registered via Python entry points.
We are building towards a world where AI capabilities are as manageable as code.
- Phase 0 ✅ — Standard + CLI (
init,validate,pack,run) - Phase 1 🔄 — Spec stabilization, community adapters, discovery
- Phase 2 — Governance & audit (accountability layer)
To keep this project focused, we explicitly do not:
- Replace LangChain, AutoGen, CrewAI, or any Agent framework
- Provide a chat UI
- Lock you into a specific cloud or model provider
- Manage Agent runtime orchestration
We are just getting started. If you believe AI should be packaged and governed like software, join us.
Issues and pull requests are welcome. Please read the Spec first.
Apache 2.0
Read the story: Why AgentUnit Exists — Shipping AI like Software. | Also on DEV