Skip to main content

Quartermaster — modular AI agent orchestration framework. Install this to get all packages.

Project description

Quartermaster SDK

Modular AI agent orchestration framework by MindMade.

Quartermaster lets you build AI agent workflows as directed graphs — define nodes (LLM calls, decisions, user input, tools), connect them with edges, and execute them with a pluggable engine.

Quick Install

# Core framework (graph + providers + tools + nodes + engine)
pip install quartermaster-sdk

# With OpenAI
pip install quartermaster-sdk[openai]

# With everything (all providers, all tools, MCP client, code runner)
pip install quartermaster-sdk[all]

Quick Start (local Ollama, zero config)

ollama pull gemma4:26b      # or any model you've pulled
import quartermaster_sdk as qm

qm.configure(
    provider="ollama",
    base_url="http://localhost:11434",   # or set $OLLAMA_HOST
    default_model="gemma4:26b",
)

# Graph() auto-creates Start; .end() / .build() are both optional when running via qm.run().
result = qm.run(qm.Graph("chat").user().agent(), "Pozdravljen, koliko je ura?")
print(result.text)

Single-shot helpers (no graph visible)

# prompt → str
reply = qm.instruction(system="Respond in Slovenian.", user="Pozdravljen!")

# prompt → Pydantic model (typed JSON extraction)
from pydantic import BaseModel

class Classification(BaseModel):
    category: str
    priority: str

data = qm.instruction_form(Classification, system="Classify.", user=email_body)

Reading specific node outputs with capture_as=

graph = (
    qm.Graph("enrich")
    .agent("Research", tools=[...], capture_as="notes")
    .instruction_form(CustomerData, system="Extract.", capture_as="data")
)
result = qm.run(graph, "VT-Treyd Slovenija")
result["notes"].output_text    # agent's free-text research
result["data"].output_text     # extracted JSON

Streaming

for chunk in qm.run.stream(qm.Graph("chat").user().agent(), "Tell me a story"):
    if chunk.type == "token":
        print(chunk.content, end="", flush=True)
    elif chunk.type == "done":
        final = chunk.result    # qm.Result

Quick Start (cloud provider)

agent = (
    qm.Graph("My Agent")
    .user("What can I help you with?")
    .instruction("Respond", model="gpt-4o", system_instruction="You are a helpful assistant.")
)
result = qm.run(agent, "How does photosynthesis work?")

Sync chat shim (no graph needed)

For one-shot LLM calls from sync code (Celery workers, Django views, CLI scripts) — no asgiref.async_to_sync wrapper required:

from quartermaster_providers.providers.local import OllamaProvider

provider = OllamaProvider(default_model="gemma4:26b")
result = provider.chat(
    messages=[{"role": "user", "content": "Pozdravljen!"}],
    max_output_tokens=128,
    thinking_level="off",
)
print(result.content)        # promoted from `reasoning` if `content` is empty
print(result.usage)          # {prompt_tokens, completion_tokens, total_tokens}

Packages

Package Description
quartermaster-graph Graph schema, builder API, validation
quartermaster-providers LLM provider abstraction (OpenAI, Anthropic, Google, Groq, local)
quartermaster-tools Tool definition, registry, built-in tools
quartermaster-nodes Node execution protocols and implementations
quartermaster-engine Flow execution, traversal, memory, streaming
quartermaster-mcp-client MCP protocol client (standalone)
quartermaster-code-runner Docker sandboxed code execution (standalone)

Documentation

See the docs/ directory:

License

Apache 2.0

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

quartermaster_sdk-0.2.1.tar.gz (25.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

quartermaster_sdk-0.2.1-py3-none-any.whl (20.9 kB view details)

Uploaded Python 3

File details

Details for the file quartermaster_sdk-0.2.1.tar.gz.

File metadata

  • Download URL: quartermaster_sdk-0.2.1.tar.gz
  • Upload date:
  • Size: 25.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for quartermaster_sdk-0.2.1.tar.gz
Algorithm Hash digest
SHA256 b3993b198fc2abade060af87a787080b524b5b02e6e90f9d54ab1c4e0cc60bef
MD5 02a3540009dea29fda1f53f088bf2534
BLAKE2b-256 a6d1ce828315699b5152747a78236d2b77161f9a26a968a2d47c9e45f34fe54b

See more details on using hashes here.

File details

Details for the file quartermaster_sdk-0.2.1-py3-none-any.whl.

File metadata

File hashes

Hashes for quartermaster_sdk-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 61af526717b87528d261f04fd4433efe2ac9c7b42bd8d28f84042d3a39e55c61
MD5 d7b18d7a4bdff48769ad7c3c0cc153c7
BLAKE2b-256 533a54a524563c2600795db610428a67bf22546e656d4ee14d819af1be340af5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page