Metadata-Version: 2.5
Name: agentbuildkit
Version: 0.2.0
Summary: Open-source Python harness for building reliable AI agents.
Project-URL: Homepage, https://agentbuildkit.com
Project-URL: Repository, https://github.com/agentbuildkit/agentbuildkit
Project-URL: Issues, https://github.com/agentbuildkit/agentbuildkit/issues
Author: AgentBuildKit
Maintainer: AgentBuildKit
License-Expression: Apache-2.0
License-File: LICENSE
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Typing :: Typed
Requires-Python: >=3.12
Requires-Dist: agent-framework-anthropic==1.0.0b261022
Requires-Dist: agent-framework-core==1.22.0
Requires-Dist: agent-framework-openai==1.17.0
Requires-Dist: agent-framework-orchestrations<2,>=1.3.2
Requires-Dist: httpx<1,>=0.28
Requires-Dist: mcp<2,>=1.24
Requires-Dist: opentelemetry-api>=1.45.2
Requires-Dist: opentelemetry-exporter-otlp>=1.39
Requires-Dist: opentelemetry-sdk>=1.39
Requires-Dist: pyjwt[crypto]<3,>=2.10
Provides-Extra: composio
Requires-Dist: composio==0.32.0; extra == 'composio'
Provides-Extra: foundry
Requires-Dist: agent-framework-foundry==1.15.0; extra == 'foundry'
Description-Content-Type: text/markdown

# AgentBuildKit

**Build agents. Not demos.**

AgentBuildKit is the production layer around your agent framework.

A model alone is not an agent. AgentBuildKit is the harness that turns a model into something you can route, constrain, approve, audit, and evaluate.

**Model + Harness = Agent**

It currently builds on Microsoft Agent Framework. Each agent declares its own provider and model. OpenAI and Anthropic are the built-in providers, and one workflow can mix them. Deterministic Python owns routing, tool permission, and whether a side effect may run.

## What it adds

- **Models.** Per-agent provider and model selection.
- **Agents.** Typed inputs and outputs.
- **Tools.** An allowlist on each agent. Reads can run. Side effects wait.
- **Workflows.** Deterministic routing across agents.
- **Guardrails and human approval.** A side effect pauses until a person decides.
- **State and audit.** SQLite pause and resume, idempotent side effects, and an audit trail that records the provider and model.
- **Evaluation.** The same run can be checked against expectations.

## Quick start

### Upcoming 0.2.0 install

These commands are not on the public index yet. Today's `npx agentbuildkit` is npm 0.0.2 and installs the harness only.

```bash
npx agentbuildkit@0.0.3
```

The upcoming bootstrapper installs `agentbuildkit>=0.2.0,<0.3.0` and `agentbuildkit-templates>=0.2.0,<0.3.0`, runs `agentkit doctor`, explains the state directory, and can open the local dashboard. Press Ctrl+C to stop the dashboard. It does not call a model. See [Install](docs/install.md).

### Development install

From a clone of this repository:

```bash
node npm/agentbuildkit/bin/agentbuildkit.js --source local
```

That installs this checkout into an isolated uv tool environment. `--upgrade` reinstalls it. `--no-demo` skips the demo prompt. If `uv` is missing, an interactive terminal asks before running Astral's installer. A non-interactive run installs uv only when you pass `--install-uv`.

To work on the Python package directly:

```bash
uv sync
uv run agentkit demo
```

Python 3.12 is required. uv manages that interpreter. The bootstrapper does not change the system Python.

### Commands

```bash
agentkit version
agentkit doctor
agentkit demo
```

`agentkit doctor` checks the installation. Missing OpenAI or Anthropic credentials are reported and are not a failure.

`agentkit demo` is offline. It needs no API key and it does not call a model provider. It shows the harness: an agent routes the request, a specialist reads an allowed tool, an unauthorised tool is rejected, a side effect pauses for approval, the run resumes after that decision, a reviewer checks the result, and the evaluation passes or fails from the audit trail.

`agentkit demo --approve` and `agentkit demo --reject` make that decision without a prompt.

## Architecture

```text
Model
  ↓
Agent                 provider and model belong to that agent
  ↓
Tools                 allowlist; reads run, side effects wait
  ↓
Workflow              deterministic routing
  ↓
Guardrails / approval human decision before a side effect
  ↓
State / audit         SQLite pause, resume, and audit events
  ↓
Evaluation            expectations checked against the trace
```

A workflow can mix providers:

```text
alex    → OpenAI / one model
taylor  → OpenAI / another model
jordan  → Anthropic / another model
```

The names above are the offline demo's agents. The provider and model are fields on each agent definition. The workflow that receives the clients does not branch on the provider. The offline demo uses scripted clients, so those calls are not OpenAI or Anthropic requests.

## The offline demo

The demo is a loading-bay request: book a technician for tomorrow.

1. Alex, the orchestrator, chooses the `service` route.
2. Taylor, the service specialist, calls `read_ticket`. That read is allowed.
3. `cancel_ticket` is not on Taylor's allowlist, so it is rejected.
4. `schedule_visit` is a side effect. The run pauses and stores the approval in SQLite.
5. A person approves or rejects it. Approval runs the visit once. Rejection does not.
6. Jordan reviews the outcome.
7. The evaluation checks the trace, including the route, the rejected tool, the approval, and the audit record.

That is the production harness running locally, with the model text supplied by a script.

## Current scope

This release includes the Python package `agentbuildkit`, the `agentkit` command, and the Node bootstrapper in `npm/agentbuildkit`. Microsoft Foundry is an optional extra and is not installed by a normal sync.

Skills and persistent agent memory are not in this release. The harness loads declarative team bundles. One local dashboard installs Customer Service and Operations Reporting, and Create team can add another inactive instance of either template. Each instance keeps its own runs, approvals, audit, revisions, and spreadsheet window. A new instance cannot run until its draft is validated, evaluated offline, and activated. Set `APP_STATE_DIRECTORY` to keep instances and drafts in `revisions.sqlite`. When that name is in `.env`, it overrides the shell. Use `--state-directory` to choose a different directory for one process. The scripted check does not measure a live model or account readiness. Google Sheets stays optional, and the key stays on the server.

`examples/agentbuildkit_templates/customer_service` is a separate example with fixture data. It is not the offline demo. It is packaged as `agentbuildkit-templates`, not copied into the harness. See [Install](docs/install.md).

A local install of that templates package serves drafts over stdio MCP and starts the dashboard. `agentkit mcp serve` requires an absolute `--state-directory` and does not read `APP_STATE_DIRECTORY`. `agentkit dashboard --state-directory` selects one process directory and overrides `.env`. Without that flag, a `.env` file in the current directory wins over the shell. The startup lock is POSIX `flock`. The published `agentbuildkit` 0.1.0 package and the published `npx agentbuildkit` 0.0.2 package do not include the templates. The upcoming 0.2.0 commands are in [Install](docs/install.md) and are not published yet. See [MCP](docs/mcp.md).

Further detail is in [docs/architecture.md](docs/architecture.md).

## Development checks

```bash
uv run ruff check .
uv run ruff format --check .
uv run pyright
uv run pytest
```

Bootstrapper tests, from `npm/agentbuildkit`:

```bash
npm test
```

## License

Apache License 2.0. See [LICENSE](LICENSE).
