Skip to content

Getting Started

Follow these steps to set up Magetools and start building your own autonomous agentic toolsets.


Installation

Install the full suite with all recommended providers:

uv add magetools[full]

[!TIP] Use magetools[full] to automatically include Google GenAI for summaries and ChromaDB for vector indexing.


Your First Collection

  1. Create a folder for your tools:

    mkdir .magetools
    

  2. Add a Spell (Tool): Create .magetools/math.py:

    from magetools import spell
    
    @spell
    def add(x: int, y: int) -> int:
        """Adds two integers for the agent."""
        return x + y
    

  3. Initialize Security:

    uv run -m magetools init .magetools
    


Sync & Discover

Run the scanner to build your semantic index and technical summaries:

uv run -m magetools scan

Run the Agent

import asyncio
from magetools import Grimorium

async def main():
    # .env files are automatically loaded by the CLI
    grim = Grimorium()
    await grim.initialize()

    print(f"🧙‍♂️ Magetools loaded {len(grim.registry)} spells.")

asyncio.run(main())