Skip to content

Tech Stack¤

The crewmaster library is built on a modern Python stack that prioritizes robust, scalable, and maintainable code. Here is an overview of the key technologies and libraries that form the foundation of this project.

Core Technologies¤

PydanticAI¤

PydanticAI is the primary LLM driver in CrewMaster v2.0.0. It provides a type-safe, agent-agnostic interface for interacting with LLM providers (OpenAI, Anthropic, Google, etc.) and is the default RuntimeDriver implementation. PydanticAI's key benefits include:

  • Structured Output: Native support for Pydantic models as output schemas, enabling type-safe structured responses from LLMs.
  • Tool Integration: First-class tool/function calling support with type-safe schemas.
  • Model-Agnostic: Works with any provider that implements the PydanticAI model protocol.
  • Dependency Injection: Built-in dependency injection system for runtime context and tools.

PromptEngine + BlockStore¤

PromptEngine is CrewMaster's prompt composition and rendering system. It works with an injectable BlockStore (e.g., LocalDiskStore) that resolves .j2 template files with YAML frontmatter. Key features:

  • Block Composition: Assembles prompts from reusable .j2 template blocks with requires/provides contracts in frontmatter.
  • Pre-Flight Validation: engine.validate_blocks() catches unsatisfied template requirements before any LLM call, failing fast.
  • Namespace Safety: Templates are restricted to ctx.*, deps.*, and cfg.* namespaces.

Pydantic¤

Pydantic is a library for data validation and settings management using Python type hints. It is deeply integrated into crewmaster to ensure data integrity and provide a clear and explicit contract for the input and output of operations and agents. This enhances type-safety and reduces common runtime errors.

FastAPI¤

FastAPI is a high-performance, easy-to-use web framework for building APIs with Python. In v2.0.0, FastAPI is used by applications (not bundled into CrewMaster itself) to serve operations as HTTP endpoints. FastAPI's key benefits include:

  • Asynchronous Support: Built on asyncio, it handles concurrent requests efficiently, crucial for long-running LLM invocations.
  • Automatic Docs: It automatically generates interactive API documentation with Swagger UI and ReDoc.
  • Type Hinting: It leverages Python's type hints to provide powerful data validation and code completion.

Server-Sent Events (SSE)¤

Server-Sent Events are a web technology that allows a server to send a continuous stream of data to a client over a single HTTP connection. crewmaster.execute_stream() provides real-time updates on agent progress, tool usage, and thought processes, enhancing the developer experience by offering transparency into the agent's actions as they happen.

Other Key Libraries¤

  • langchain-openai: An optional LLM driver. In v2.0.0, LangChain is no longer the core framework — it is one of two available RuntimeDriver implementations (alongside PydanticAI). No langgraph, crew, team, or runnable abstractions are used.
  • mkdocstrings: Generates API Reference documentation automatically from Python docstrings, used to produce the API Reference section of these docs.
  • uvicorn: An ASGI server that runs FastAPI applications, known for its speed and efficiency.
  • pytest: A powerful and popular testing framework used for all unit and integration tests.