A library for creating agents
Project description
artificer-agents
A lightweight Python library for running deterministic agent loops with MCP tools.
Installation
pip install artificer-agents
# With OpenAI support
pip install artificer-agents[openai]
Requires Python 3.13+.
Usage
import asyncio
from pydantic import BaseModel
from artificer.agents import Agent, run_agent
from artificer.mcp import MCPClient
from artificer.models import OpenAIModel
class Input(BaseModel):
query: str
class Output(BaseModel):
result: str
agent = Agent(
name="my-agent",
system_prompt="You are a helpful assistant.",
input_schema=Input,
output_schema=Output,
)
async def main():
model = OpenAIModel(model="gpt-4o-mini")
async with MCPClient(["path/to/mcp-server.py"]) as mcp:
result = await run_agent(agent, Input(query="Hello"), model=model, mcp_client=mcp)
print(result.output)
asyncio.run(main())
Development
uv sync # Install dependencies
./scripts/check.sh # Run all checks (lint, format, typecheck, tests)
./scripts/test.sh # Run tests only
./scripts/format.sh # Format code
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
artificer_agents-0.1.0a3.tar.gz
(91.6 kB
view details)
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 artificer_agents-0.1.0a3.tar.gz.
File metadata
- Download URL: artificer_agents-0.1.0a3.tar.gz
- Upload date:
- Size: 91.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.22
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4971abc2ea3b5d2ef572326d7e531c6e6b2e686b2d4afea5b49da2b92c16b6b3
|
|
| MD5 |
16b260e48bd8c94ca5e9210e48bb843a
|
|
| BLAKE2b-256 |
d86a75350c83d2be1f494ccc42ef9d60b79ade4c8411e2e71a7a0bec09f0afd2
|
File details
Details for the file artificer_agents-0.1.0a3-py3-none-any.whl.
File metadata
- Download URL: artificer_agents-0.1.0a3-py3-none-any.whl
- Upload date:
- Size: 13.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.22
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6039bd82c35e99ccb5b738ab2246ac8f6c648f79bff5bc2d0425d47986e184b4
|
|
| MD5 |
0cc26860d58da0c9ffe5ae6e19bfaf7d
|
|
| BLAKE2b-256 |
8434e7848e663e06778655679594eed0f47492ad794ab1f3445d0228e7fb6cbd
|