A simple agentic framework with observability and evals baked in
Project description
A lightweight, provider-agnostic agentic framework.
Build AI agents that think, use tools, and delegate to sub-agents — with observability baked in.
Install
pip install minion-ai
Quick Start
import minions
from minions.demo_tools import read_file, list_files
def search_web(query: str) -> str:
"""Search the web and return results.
Args:
query: The search query.
"""
# your implementation
...
minions.init(api_key="your-api-key") # or set ANTHROPIC_API_KEY / OPENAI_API_KEY env var
agent = minions.Minion(
model="anthropic/claude-opus-4",
tools=[search_web, read_file],
)
result = agent("Summarise the contents of report.pdf")
print(result)
Supported Providers
Any provider supported by LiteLLM works out of the box — just change the model string:
minions.Minion(model="openai/gpt-4o", ...)
minions.Minion(model="anthropic/claude-opus-4", ...)
minions.Minion(model="gemini/gemini-2.5-pro", ...)
API keys are read from the standard env vars (OPENAI_API_KEY, ANTHROPIC_API_KEY, etc.) or passed via minions.init().
Sub-Agents
Minion can spawn sub-agents to parallelise large tasks:
agent = minions.Minion(
model="anthropic/claude-opus-4",
tools=[read_file, list_files],
allow_sub_agents=True,
secondary_model="anthropic/claude-haiku-4-5", # cheaper model for sub-tasks
)
result = agent("Summarise every file in the /reports directory")
The agent automatically delegates when it sees 3+ independent items to process.
Tracing & UI
Enable tracing to record every run, turn, and tool call to a local SQLite database, then inspect them in the built-in dashboard.
pip install "minion-ai[ui]"
minions.init(
api_key="...",
tracing=True,
project="my-project", # required when tracing=True
)
agent = minions.Minion(model="openai/gpt-4o", tools=[...])
agent("Do something interesting")
Launch the dashboard:
minion ui
The UI groups traces by project, lets you drill into every turn and tool call, and shows token usage and cost estimates in real time.
Remote tracing (team server)
To send traces to a shared minion-ui server instead of a local file, add trace_url
and a project-scoped token (create one in the dashboard under a project's
Settings → API Tokens):
minions.init(
tracing=True,
project="my-project",
trace_url="https://traces.mycompany.com",
tracing_secret_token="mni_xK9mP2...",
)
In this mode nothing is written locally — runs are pushed over HTTP to the server. Tracing never raises: if the server is unreachable the push is skipped and your agent keeps running.
Running the server
The dashboard server ships as a container:
docker compose up # SQLite (default), data in a named volume
For a team-scale deployment, point it at Postgres via DATABASE_URL (SQLite stays
the default when it's unset):
docker compose -f docker-compose.postgres.yml up # self-hosted Postgres
docker compose -f docker-compose.managed-postgres.yml up # RDS / Supabase / Neon
See docs/ for full hosting, remote-tracing, and image-publishing guides.
Building Tools
Any Python function with a docstring and typed args works as a tool:
def get_weather(city: str, unit: str = "celsius") -> str:
"""Get the current weather for a city.
Args:
city: Name of the city.
unit: Temperature unit, either 'celsius' or 'fahrenheit'.
"""
...
agent = minions.Minion(model="openai/gpt-4o", tools=[get_weather])
See minions/demo_tools.py for more examples.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file minion_ai-0.1.2.tar.gz.
File metadata
- Download URL: minion_ai-0.1.2.tar.gz
- Upload date:
- Size: 351.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b3921160fd9c1250ba3beecc36e4c0059e7eb31d9b1e4e85cc2fbd32164a12da
|
|
| MD5 |
5d3f15cc97c5638c5facf67081765183
|
|
| BLAKE2b-256 |
4dc8b2a5003aa32f19edf544c0d2afa443de88a32b3b200e73abd53090c33fca
|
Provenance
The following attestation bundles were made for minion_ai-0.1.2.tar.gz:
Publisher:
pypi-publish.yml on shriyansnaik/minion-ai
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
minion_ai-0.1.2.tar.gz -
Subject digest:
b3921160fd9c1250ba3beecc36e4c0059e7eb31d9b1e4e85cc2fbd32164a12da - Sigstore transparency entry: 1837898188
- Sigstore integration time:
-
Permalink:
shriyansnaik/minion-ai@6c4090613a65d6b80e5c74e44d3d01d9861e4c60 -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/shriyansnaik
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-publish.yml@6c4090613a65d6b80e5c74e44d3d01d9861e4c60 -
Trigger Event:
push
-
Statement type:
File details
Details for the file minion_ai-0.1.2-py3-none-any.whl.
File metadata
- Download URL: minion_ai-0.1.2-py3-none-any.whl
- Upload date:
- Size: 230.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
90a5451c52d976d25271083d60b4be5fdd4d1853c8ab4663babe5372da09a4ba
|
|
| MD5 |
12c5d658ee03c7edfc0ba672177b5b10
|
|
| BLAKE2b-256 |
37326bd0e0cbd43c987f71f64baa60f017099c64dd5ad9c46a94d913f1adcb2b
|
Provenance
The following attestation bundles were made for minion_ai-0.1.2-py3-none-any.whl:
Publisher:
pypi-publish.yml on shriyansnaik/minion-ai
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
minion_ai-0.1.2-py3-none-any.whl -
Subject digest:
90a5451c52d976d25271083d60b4be5fdd4d1853c8ab4663babe5372da09a4ba - Sigstore transparency entry: 1837898288
- Sigstore integration time:
-
Permalink:
shriyansnaik/minion-ai@6c4090613a65d6b80e5c74e44d3d01d9861e4c60 -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/shriyansnaik
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-publish.yml@6c4090613a65d6b80e5c74e44d3d01d9861e4c60 -
Trigger Event:
push
-
Statement type: