Skip to main content

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

  1. Installation

    pip install automagik-agents
    
  2. 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
    
  3. 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
    
  4. Start the API Server

    automagik-agents api start --reload
    

💡 Usage Examples

API Endpoints

  1. Health Check

    curl http://localhost:8000/health
    
  2. 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"
      }'
    
  3. 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

  1. Create Agent Template

    automagik-agents create-agent -n custom -t simple_agent
    
  2. Customize Agent Files

    • Edit src/agents/custom_agent/prompts.py for system prompts
    • Modify src/agents/custom_agent/agent.py for behavior
    • Update src/agents/custom_agent/__init__.py for configuration
  3. 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

automagik_agents-0.1.3.tar.gz (9.5 kB view details)

Uploaded Source

Built Distribution

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

automagik_agents-0.1.3-py3-none-any.whl (10.8 kB view details)

Uploaded Python 3

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

Hashes for automagik_agents-0.1.3.tar.gz
Algorithm Hash digest
SHA256 8c107a42c7aef796d282484f12758f118456dfc60c35515a6e77a6fe4f1500a5
MD5 e10645e40e172dbd44a36a8e5f780d70
BLAKE2b-256 c2c1f0b7403ff696789a0f0947bc58aef237a7e312651f84dc46a14bda559f9e

See more details on using hashes here.

Provenance

The following attestation bundles were made for automagik_agents-0.1.3.tar.gz:

Publisher: publish.yml on namastexlabs/automagik-agents

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file automagik_agents-0.1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for automagik_agents-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 0d5e223addd7585f942b6b3295d77f5c6f753140d107bd16860035f748951db4
MD5 435d28a8fd2c6422578fda18d6ba7aa0
BLAKE2b-256 b78801a145f1a250af038f0f6c5beba0cc72a4d806f35cff9acbfa559a48edc0

See more details on using hashes here.

Provenance

The following attestation bundles were made for automagik_agents-0.1.3-py3-none-any.whl:

Publisher: publish.yml on namastexlabs/automagik-agents

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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