Automagik Agents
A toolkit for quickly building and deploying AI agents using the Pydantic AI framework. Create custom agents from templates, expose them through a RESTful API, and manage conversations with built-in memory and tool support. Perfect for teams looking to rapidly prototype and deploy AI agents with standardized patterns and best practices.
🌟 Features
-
Extensible Agent System
- Template-based agent creation
- Built-in templates: Simple Agent and Notion Agent
- Easy-to-use CLI for creating new agents
- Automatic tool registration and management
-
Powerful API Integration
- FastAPI-based RESTful endpoints
- Session management with conversation history
- Structured request/response models
- Built-in authentication and CORS support
- Health monitoring and version tracking
-
Advanced Memory System
- Persistent conversation history
- Session-based memory management
- Tool call and output tracking
- Structured message storage
-
Built-in Templates
- Simple Agent: Basic chat functionality with datetime tools
- Notion Agent: Full Notion integration with database management
🚀 Quick Start
-
Installation
pip install automagik-agents
-
Environment Setup
# Copy example environment file cp .env-example .env # Configure required variables AM_API_KEY=your_api_key_here AM_HOST=0.0.0.0 AM_PORT=8000 OPENAI_API_KEY=your_openai_key_here OPENAI_MODEL=openai:gpt-4o-mini # or your preferred model # For Notion agent (optional) NOTION_TOKEN=your_notion_token
-
Create a Custom Agent
# Create from simple template automagik-agents create-agent -n my_agent -t simple_agent # Create from Notion template automagik-agents create-agent -n my_notion_agent -t notion_agent
-
Start the API Server
automagik-agents api start --reload
💡 Usage Examples
API Endpoints
-
Health Check
curl http://localhost:8000/health -
Run an Agent
# Simple agent curl -X POST http://localhost:8000/agent/simple_agent/run \ -H "X-API-Key: your_api_key" \ -H "Content-Type: application/json" \ -d '{ "message_input": "What time is it?", "session_id": "optional_session_id" }' # Notion agent curl -X POST http://localhost:8000/agent/notion_agent/run \ -H "X-API-Key: your_api_key" \ -H "Content-Type: application/json" \ -d '{ "message_input": "List my databases", "session_id": "optional_session_id" }'
-
Session Management
# Get session history curl http://localhost:8000/session/your_session_id \ -H "X-API-Key: your_api_key" # Delete session curl -X DELETE http://localhost:8000/session/your_session_id \ -H "X-API-Key: your_api_key"
Creating Custom Agents
-
Create Agent Template
automagik-agents create-agent -n custom -t simple_agent
-
Customize Agent Files
- Edit
src/agents/custom_agent/prompts.pyfor system prompts - Modify
src/agents/custom_agent/agent.pyfor behavior - Update
src/agents/custom_agent/__init__.pyfor configuration
- Edit
-
Register Tools
def register_tools(self): """Register custom tools with the agent.""" self.agent.tool(your_custom_tool)
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
Metadata
Release files for automagik-agents 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| automagik_agents-0.1.3.tar.gz | 9.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| automagik_agents-0.1.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 20.3 kB
Release files / automagik_agents-0.1.3.tar.gz
| Download URL | automagik_agents-0.1.3.tar.gz |
|---|---|
| Size | 9.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8c107a42c7aef796d282484f12758f118456dfc60c35515a6e77a6fe4f1500a5
|
|
BLAKE2b-256 checksum How to use checksums |
c2c1f0b7403ff696789a0f0947bc58aef237a7e312651f84dc46a14bda559f9e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Feb 24, 2025.
Transparency logRelease files / automagik_agents-0.1.3-py3-none-any.whl
| Download URL | automagik_agents-0.1.3-py3-none-any.whl |
|---|---|
| Size | 10.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0d5e223addd7585f942b6b3295d77f5c6f753140d107bd16860035f748951db4
|
|
BLAKE2b-256 checksum How to use checksums |
b78801a145f1a250af038f0f6c5beba0cc72a4d806f35cff9acbfa559a48edc0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Feb 24, 2025.
Transparency log