Skip to main content

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


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.0a2.tar.gz (91.7 kB view details)

Uploaded Source

Built Distribution

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

artificer_agents-0.1.0a2-py3-none-any.whl (13.5 kB view details)

Uploaded Python 3

File details

Details for the file artificer_agents-0.1.0a2.tar.gz.

File metadata

  • Download URL: artificer_agents-0.1.0a2.tar.gz
  • Upload date:
  • Size: 91.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.22

File hashes

Hashes for artificer_agents-0.1.0a2.tar.gz
Algorithm Hash digest
SHA256 ac0eb35d2ad830d5716d9318f074ec76d96079416d8d505eb9f47fad6c15dc18
MD5 3bbea1d79a46484971b34964eb4c582f
BLAKE2b-256 cc21b76445cb89f7c692351e102d163e88295fad30b1da78653ad58355b88835

See more details on using hashes here.

File details

Details for the file artificer_agents-0.1.0a2-py3-none-any.whl.

File metadata

File hashes

Hashes for artificer_agents-0.1.0a2-py3-none-any.whl
Algorithm Hash digest
SHA256 9ffcf2ce7e4e9d81256f96d78ca4bc2ab2d9c4a5db1e2bc10c20eed0a06caff0
MD5 06e5052d474509916d59a2848dff1a4f
BLAKE2b-256 4a9f89c3cb7e8a97d6fcb4b2c5c3fd86afa273d8547b80bfa4ad1923bfbb9ed5

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