Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

crewmaster

CrewMaster v2.0.0 — The Ultimate Framework for Building AI Teams 🚀

CrewMaster is a framework-agnostic Python library for building, orchestrating, and evaluating type-safe multi-agent systems. Define Operations, wire them into DAGs, and execute with structured, streaming output — without being locked into a single LLM framework.


Why CrewMaster v2.0.0?

v2.0.0 is a complete redesign built on lessons learned from v1. Every concept has been rethought for developer ergonomics, type safety, and framework independence.

v1 (legacy) v2.0.0
AgentBase, Skill, Team, Crew Operation, AgentConfig, ExecutionPlan
LangChain only Pluggable RuntimeDriver (PydanticAI, LangChain, bring your own)
Ad-hoc data flow Typed DAG with produces/consumes
No prompt management PromptEngine + BlockStore with Jinja2 templates
No evaluation Built-in evaluation framework with snapshots, datasets, criteria

Quick Example

import asyncio
from pydantic import BaseModel
from crewmaster import execute
from crewmaster.agents.agent import AgentConfig
from crewmaster.agents.context.store import ContextStore
from crewmaster.operations.operation import Operation
from crewmaster.execution.runtime import FakeDriver


class Greeting(BaseModel):
    message: str


# 1. Define an agent
greeter = AgentConfig(
    name="greeter",
    identity_blocks=["blocks://greeter/identity"],
)

# 2. Define an operation
say_hello = Operation(
    name="say_hello",
    produces=Greeting,
    kind="artifact",
    agent=greeter,
    task_blocks=["blocks://greeter/task"],
)

# 3. Execute with FakeDriver (no API key needed)
async def main():
    result = await execute(
        operation=say_hello,
        context_store=ContextStore(),
        default_runtime=FakeDriver(),
    )
    print(result.message)


asyncio.run(main())

Key Concepts

  • Operation — Typed, recursive unit of work that declares produces/consumes
  • AgentConfig — Persistent agent identity with prompt blocks, tool scope, context projections
  • ExecutionPlan — DAG resolved automatically from Operation trees via resolve_plan()
  • ContextStore — Type-keyed container of domain objects
  • PromptEngine + BlockStore — Jinja2-based prompt composition from blocks:// URIs
  • ToolRegistry — Scoped tool storage with semantic retrieval at runtime (request_capability)
  • RuntimeDriver — Async protocol for LLM backends (PydanticAI, LangChain, custom)
  • execute / execute_stream — Top-level entry points for blocking and streaming execution

Installation

pip install crewmaster

With extras

# PydanticAI runtime driver (recommended)
pip install "crewmaster[pydantic-ai]"

# Sandbox UI for interactive evaluation
pip install "crewmaster[sandbox-ui]"

Environment

# For PydanticAIDriver
export OPENAI_API_KEY=<your-api-key>

See the installation guide for full details.


Framework-Agnostic

Swap drivers without changing your code:

from crewmaster.execution.drivers.pydantic_ai import PydanticAIDriver

driver = PydanticAIDriver(model_name="openai:gpt-4o")

result = await execute(
    operation=my_op,
    default_runtime=driver,  # just swap the driver
    ...
)

Built-in Collaboration & Conversation

# Sequential multi-agent channel
from crewmaster.conversation.channel import channel_dispatch

# Human-agent dialogue with structured clarification
from crewmaster.conversation.dialogue import dialogue, AgentOutputClarification

# Grill-me: structured critique-and-revision cycles
from crewmaster.collaboration.protocol import GrillMeProtocol

Evaluation

CrewMaster v2.0.0 includes a complete evaluation framework:

  • Snapshots — Version your operations with expected inputs/outputs
  • Datasets — Define test data in YAML
  • Criteria — Write evaluation criteria as Operation nodes producing Score objects
  • Reports — Aggregate results with per-criterion averages and global scores

Sandbox

CrewMaster ships with a built-in sandbox — a FastAPI application that lets you explore, test, and evaluate operations interactively without writing code:

pip install "crewmaster[sandbox-ui]"
python -m crewmaster.sandbox.ui.app

Open http://localhost:8080 to access:

  • Execute — Run operations with real or fake drivers
  • Stream — Watch multi-node DAGs execute in real-time via SSE
  • Evaluate — Run evaluation scenarios against datasets and criteria
  • Pre-built scenarios — Channel, dialogue, DAG pipeline, error recovery, grill-me collaboration, and evaluation examples

Documentation

Full documentation →

Section
Getting Started Installation and core concepts
Tutorials Step-by-step with FakeDriver
How-to Guides Agent with tool, HTTP serving, pipelines, channels, dialogue, collaboration, evaluation
API Reference Per-module API docs from docstrings
Migration v1 → v2.0.0 migration guide

Development

# Install dev dependencies
poetry install

# Run tests (674+ and counting)
poetry run pytest

# Build docs
poetry run mkdocs build --strict

License

MIT — see LICENSE for details.

Metadata

Release files for crewmaster 2.0.2b0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for crewmaster 2.0.2b0
File Size Uploaded
crewmaster-2.0.2b0.tar.gz 191.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for crewmaster 2.0.2b0
File Interpreter ABI Platform
crewmaster-2.0.2b0-py3-none-any.whl Python 3 none any Details

Total release size: 462.0 kB

Release files / crewmaster-2.0.2b0.tar.gz

Download URL crewmaster-2.0.2b0.tar.gz
Size 191.2 kB
Tags Source
SHA-256 checksum
How to use checksums
f63d895ccf1ef4ecf02f2315e8572fe4d194a3695be397879cbd99df243b5c0a
BLAKE2b-256 checksum
How to use checksums
441407d7f01ff76a11575fc701d862ae7f25256ad7f07b0eb2879ce9cbe9df6d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.1.3 CPython/3.12.12 Linux/5.4.293-0504293-generic

Release files / crewmaster-2.0.2b0-py3-none-any.whl

Download URL crewmaster-2.0.2b0-py3-none-any.whl
Size 270.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1aec8f7a47fd750a838cbe89c59520cc11eab124789016e347556bf76775af23
BLAKE2b-256 checksum
How to use checksums
a4bd4594b1c8af5d88a6c9ddf4bad1225b56ac6416db873df949a16174e2324f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.1.3 CPython/3.12.12 Linux/5.4.293-0504293-generic
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page