majordomo-frameworks
Framework adapters for routing LLM requests through Majordomo Gateway with centralized logging and cost tracking.
Installation
# Core package (no framework dependencies)
pip install majordomo-frameworks
# With Agno support
pip install majordomo-frameworks[agno]
# With Pydantic AI support
pip install majordomo-frameworks[pydantic-ai]
Quick Start
Shared utilities (zero dependencies)
from majordomo_frameworks import build_headers, check_environment, Provider
# Check required env vars are set
missing = check_environment("openai")
# Build gateway headers
headers = build_headers(feature="my-feature", step="inference", user_id="alice")
Agno
from majordomo_frameworks.agno import create_model
model = create_model("openai", feature="support-agent", user_id="alice")
Pydantic AI
from majordomo_frameworks.pydantic_ai import create_model, build_extra_headers
from pydantic_ai.settings import AnthropicModelSettings
# Create model routed through the gateway
model = create_model("anthropic")
# Build headers for model settings
headers = build_extra_headers(feature="research-agent", step="synthesis")
# Use with Pydantic AI model settings
settings = AnthropicModelSettings(
extra_headers=headers,
# ... other settings like anthropic_thinking, etc.
)
Supported Providers
| Provider | Agno | Pydantic AI |
|---|---|---|
| OpenAI | OpenAIChat |
OpenAIModel |
| Anthropic | OpenAILike |
AnthropicModel |
| Gemini | OpenAILike |
OpenAIModel |
Environment Variables
| Variable | Required | Description |
|---|---|---|
MAJORDOMO_GATEWAY_URL |
No | Gateway URL (default: http://localhost:7680) |
MAJORDOMO_API_KEY |
Yes | Your Majordomo API key |
OPENAI_API_KEY |
Per provider | OpenAI API key |
ANTHROPIC_API_KEY |
Per provider | Anthropic API key |
GEMINI_API_KEY |
Per provider | Gemini API key |
Documentation
- Pydantic AI Guide - Complete guide with migration instructions, advanced usage, and examples
Examples
- Agno Support Agent - Multi-turn conversations with per-user cost tracking
- Pydantic AI Research Agent - Multi-step research workflow with structured outputs
License
MIT
Metadata
Release files for majordomo-frameworks 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| majordomo_frameworks-0.2.0.tar.gz | 343.6 kB | Without provenance | Details for majordomo_frameworks-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| majordomo_frameworks-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for majordomo_frameworks-0.2.0-py3-none-any.whl |
Total release size: 351.5 kB
Release files / majordomo_frameworks-0.2.0.tar.gz
| Download URL | majordomo_frameworks-0.2.0.tar.gz |
|---|---|
| Size | 343.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fb1b2f3442529deeab0afa85849277101df4eb1d3f44d99b6b5dce2a86b7f1b1
|
|
BLAKE2b-256 checksum How to use checksums |
655c95ce96f755414304083bbd117fbc039268e9575e18484555e80882499736
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.2
|
Release files / majordomo_frameworks-0.2.0-py3-none-any.whl
| Download URL | majordomo_frameworks-0.2.0-py3-none-any.whl |
|---|---|
| Size | 7.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
aed7baba1d50ede7c6f7ac95f1e6d4b804a0ecb06033a309e4dab6022b0a4e21
|
|
BLAKE2b-256 checksum How to use checksums |
42c746fa11e821c4483cc4afce4c0f4366c1f9475691c2bd5c364ea2dcc97951
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.2
|
Security for majordomo-frameworks 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.