DEV Community

Cover image for AgentUnit: Shipping AI like Software
angdem
angdem

Posted on

AgentUnit: Shipping AI like Software

Not a framework. Not a runtime. A packaging standard for AI Agents.

Repo: https://github.com/agentunit-io/agentunit
Longer story: https://github.com/agentunit-io/agentunit/blob/main/blog/why-agentunit-exists.md


Why this exists

AI Agents today feel like scripts: they work great locally, then hit a wall when you ask who owns it / what version is running / how do we audit it / can we trust it in prod.

We don't need more frameworks.
We need packaging discipline:

  • Identity — who built it, what version
  • Contract — what it receives, what it returns
  • Governance — who is responsible, audit trail, human-approval boundary
  • Reproducibility — ship as a Docker image, not a prompt folder

AgentUnit does exactly that: it turns an Agent into a Unit via agentunit.yaml + a small CLI called au.

Think: the rpm / deb for AI Agents.


4-step quick start

# 1. Install
pip install git+https://github.com/agentunit-io/agentunit.git

# 2. Scaffold
au init prd-writer

# 3. Validate & pack
cd prd-writer
au validate
au pack -t prd-writer:1.0.0

# 4. Run (HTTP)
au run prd-writer:1.0.0 --serve --port 8091
Enter fullscreen mode Exit fullscreen mode

One-shot mode:

echo '{"prompt":"Build a todo app"}' > input.json
au run prd-writer:1.0.0 --input input.json
Enter fullscreen mode Exit fullscreen mode

Optional browser Invoker UI:

pip install streamlit requests
streamlit run examples/invokers/streamlit_invoker.py
Enter fullscreen mode Exit fullscreen mode

Then open http://localhost:8501, point it at http://localhost:8091, and click Run.


Minimal agentunit.yaml (the heartbeat of a Unit)

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: ""
Enter fullscreen mode Exit fullscreen mode

Full spec: https://github.com/agentunit-io/agentunit/blob/main/spec/agentunit-spec-v0.1.md


Current state & roadmap

  • Phase 0 — Standard + CLI (init / validate / pack / run)
  • Phase 1 — Spec stabilization, community adapters, discovery/registry
  • Phase 2 — Governance & audit (accountability layer / approval gates)

Non-goals (important)

We explicitly don't:

  • replace LangChain / AutoGen / CrewAI
  • provide a chat UI
  • lock you into a cloud or model vendor
  • do runtime orchestration

The end state: AI-native companies

For decades, we perfected shipping software. We defined packages, versions, dependencies, and audit logs. We turned code into reliable business assets.

Yet with AI, we went backward. Prompts, manual clicks, and black boxes.

AgentUnit brings software engineering discipline back to AI. An AI capability should be shipped exactly like a software package — versioned, tested, and governed.

The future belongs to companies that don't just use AI — but are run on AI. Where:

  • AI Units own the "how" — They execute tasks, follow contracts, and produce measurable outputs.
  • Humans own the "why" — They set direction, own risk, and operate the decision gates.

The goal isn't smarter pets. It's reliable factories.


Who this is for

  • You've built an Agent and now wonder how to ship it like software
  • You want a contract-first, Docker-native boundary around prompts/tools/models
  • You care about ownership, audit, and upgrade paths, not just demos

If that sounds right:

  1. Give it a star on GitHub
  2. Try the Quick Start (4 commands to run a PRD writer)
  3. Tell me what your first Unit would be in the comments

AgentUnit is Apache-2.0. Contributions welcome.

Top comments (0)