Metadata-Version: 2.4
Name: aindex-diy
Version: 0.1.0
Summary: AI Agent Index - Route queries to the right AI agent. DIY framework for building your own agent registry.
Project-URL: Homepage, https://humotica.com
Project-URL: Repository, https://github.com/humoticaos/aindex-diy
Author-email: HumoticaOS <info@humotica.com>
License-Expression: MIT
License-File: LICENSE
Keywords: agents,ai,index,llm,multi-agent,routing
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.9
Description-Content-Type: text/markdown

# AIndex-DIY

**AI Agent Index** - Route queries to the right AI agent.

A lightweight, DIY framework for building your own multi-agent routing system.

## Installation

```bash
pip install aindex-diy
```

## Quick Start

```python
from aindex_diy import AIndex

# Create an index from a JSON file
aindex = AIndex("my_agents.json")

# Or create programmatically
aindex = AIndex()
aindex.add_agent({
    "agent_id": "vision_bot",
    "name": "Vision Bot",
    "capabilities": ["vision", "image-analysis"],
    "keywords": ["image", "photo", "diagram"],
    "status": "approved",
    "state": {"health": "ok"}
})

# Route a query to the best agent
best = aindex.route("analyze this screenshot")
# Returns: "vision_bot"

# Find agents by capability
vision_agents = aindex.find_by_capability("vision")
# Returns: ["vision_bot"]

# Get agent details
agent = aindex.get_agent("vision_bot")
```

## Index Format

```json
{
    "agents": [
        {
            "agent_id": "my_agent",
            "name": "My Agent",
            "capabilities": ["code", "analysis"],
            "keywords": ["python", "debug"],
            "aliases": ["coder"],
            "status": "approved",
            "state": {"health": "ok"}
        }
    ],
    "indices": {
        "by_capability": {"code": ["my_agent"]},
        "by_keyword": {"python": ["my_agent"]},
        "by_alias": {"coder": "my_agent"}
    }
}
```

## Features

- **Simple routing** - Match queries to agents by keywords
- **Capability-based lookup** - Find agents by what they can do
- **Flexible indexing** - Auto-rebuilds indices when agents change
- **Health tracking** - Know which agents are online
- **Zero dependencies** - Pure Python, no external packages

## Custom Routing Rules

```python
aindex = AIndex()

# Override default routing keywords
aindex.routing_rules = {
    "vision": ["image", "photo", "screenshot"],
    "code": ["python", "javascript", "debug"],
    "research": ["analyze", "compare", "study"],
}

# Route with custom capability mapping
best = aindex.route(
    "debug this python code",
    capability_map={"code": "my_python_expert"}
)
```

## License

MIT - Build your own agent index!

---

Made with care by [HumoticaOS](https://humotica.com)
