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

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.1b0

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.1b0
File Size Uploaded
crewmaster-2.0.1b0.tar.gz 190.7 kB Details

Built distribution (wheel)

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

Total release size: 461.3 kB

Release files / crewmaster-2.0.1b0.tar.gz

Download URL crewmaster-2.0.1b0.tar.gz
Size 190.7 kB
Tags Source
SHA-256 checksum
How to use checksums
f1c8b086927e8bd8163dedf130c8a5952dca6a258b8dd86d68aa6159216f9399
BLAKE2b-256 checksum
How to use checksums
12ed81c896ca8ebbdd018fd94ce10945c87941fc3eb4914cf287984ee48f9817
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.1b0-py3-none-any.whl

Download URL crewmaster-2.0.1b0-py3-none-any.whl
Size 270.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
905c9369abdc2b5b242d47399e2098ef77124ab124da9a89571a6d05a80c74bb
BLAKE2b-256 checksum
How to use checksums
1b5f196b71ffcdb1c73429630aa98ab843ec5762523292f4a97b5f5b9336f7e6
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