Automagik agents templates
Project description
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.
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 automagik_agents-0.1.3.tar.gz.
File metadata
- Download URL: automagik_agents-0.1.3.tar.gz
- Upload date:
- Size: 9.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8c107a42c7aef796d282484f12758f118456dfc60c35515a6e77a6fe4f1500a5
|
|
| MD5 |
e10645e40e172dbd44a36a8e5f780d70
|
|
| BLAKE2b-256 |
c2c1f0b7403ff696789a0f0947bc58aef237a7e312651f84dc46a14bda559f9e
|
Provenance
The following attestation bundles were made for automagik_agents-0.1.3.tar.gz:
Publisher:
publish.yml on namastexlabs/automagik-agents
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
automagik_agents-0.1.3.tar.gz -
Subject digest:
8c107a42c7aef796d282484f12758f118456dfc60c35515a6e77a6fe4f1500a5 - Sigstore transparency entry: 173756508
- Sigstore integration time:
-
Permalink:
namastexlabs/automagik-agents@1d6db3548cf523cea1866fc1451d804c17a2a0be -
Branch / Tag:
refs/tags/v0.1.3 - Owner: https://github.com/namastexlabs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@1d6db3548cf523cea1866fc1451d804c17a2a0be -
Trigger Event:
release
-
Statement type:
File details
Details for the file automagik_agents-0.1.3-py3-none-any.whl.
File metadata
- Download URL: automagik_agents-0.1.3-py3-none-any.whl
- Upload date:
- Size: 10.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0d5e223addd7585f942b6b3295d77f5c6f753140d107bd16860035f748951db4
|
|
| MD5 |
435d28a8fd2c6422578fda18d6ba7aa0
|
|
| BLAKE2b-256 |
b78801a145f1a250af038f0f6c5beba0cc72a4d806f35cff9acbfa559a48edc0
|
Provenance
The following attestation bundles were made for automagik_agents-0.1.3-py3-none-any.whl:
Publisher:
publish.yml on namastexlabs/automagik-agents
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
automagik_agents-0.1.3-py3-none-any.whl -
Subject digest:
0d5e223addd7585f942b6b3295d77f5c6f753140d107bd16860035f748951db4 - Sigstore transparency entry: 173756509
- Sigstore integration time:
-
Permalink:
namastexlabs/automagik-agents@1d6db3548cf523cea1866fc1451d804c17a2a0be -
Branch / Tag:
refs/tags/v0.1.3 - Owner: https://github.com/namastexlabs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@1d6db3548cf523cea1866fc1451d804c17a2a0be -
Trigger Event:
release
-
Statement type: