Hive Agents - AI-powered scaffolding for Agno agents - YAML-first DevX layer
Project description
Scaffolding and Smart RAG for Agno
AI-powered agent generation with intelligent CSV knowledge bases
Quick Start โข Features โข Examples โข ๐บ๏ธ Roadmap โข Contributing
What is Automagik Hive?
Hive doesn't compete with Agno - it makes it easier to use.
Think of Hive as "Create React App" for Agno agents. Instead of weeks setting up project structure, writing boilerplate, and researching optimal configurations, Hive gives you:
- ๐ค AI-Powered Generation - Describe what you want; Hive's meta-agent generates optimal configs
- ๐ Smart CSV RAG - Hash-based incremental loading (450x faster, 99% cost savings)
- ๐ฏ YAML-First Config - No Python boilerplate, just declarative configs
- ๐ฆ Project Scaffolding - Zero to agent in 30 seconds
Built by practitioners who got tired of manually setting up the same patterns. Powered entirely by Agno.
Key Features
๐ค AI That Generates AI
Use an Agno agent to generate Agno agent configurations. Natural language requirements โ optimal YAML configs.
$ hive ai support-bot --interactive
๐ค AI-Powered Agent Generator
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
๐ญ What should your agent do?
> Customer support bot with CSV knowledge base
๐ง Analyzing requirements...
โ
Generated successfully!
๐ก AI Recommendations:
โข Model: gpt-4o-mini (cost-effective for support)
โข Tools: CSVTools, WebSearch
โข Complexity: 4/10
โข Estimated cost: $0.002/query
๐ Generated: ai/agents/support-bot/config.yaml
How it works:
- Meta-agent analyzes natural language requirements
- Selects optimal model from 7+ providers (OpenAI, Anthropic, Google, etc.)
- Recommends tools from Agno's builtin catalog
- Generates context-aware system instructions
- Creates production-ready YAML configuration
Not keyword matching - real LLM intelligence.
๐ Smart CSV RAG System
The one feature from V1 worth keeping - hash-based incremental CSV loading:
from hive.knowledge import create_knowledge_base
# Smart loading with hot reload
kb = create_knowledge_base(
csv_path="data/faqs.csv",
embedder="text-embedding-3-small",
num_documents=5,
hot_reload=True # Watches for changes
)
# Only re-embeds changed rows
# MD5 hash tracking prevents redundant processing
Performance Numbers:
- โ 450x faster - Hot reload for unchanged CSVs
- โ 10x faster - Small updates (only changed rows)
- โ 99% cost savings - No redundant embeddings
- โ 18/18 tests passing - Production-ready
Real-world impact: $700+/year savings at scale.
๐ฏ YAML-First Agent Design
No Python boilerplate. Just declarative configurations:
agent:
name: "Customer Support Bot"
agent_id: "support-bot"
version: "1.0.0"
model:
provider: "openai"
id: "gpt-4o-mini"
temperature: 0.7
instructions: |
You are a friendly customer support agent.
Answer questions using the knowledge base.
When unsure, escalate to human support.
tools:
- name: CSVTools
csv_path: "./data/faqs.csv"
- name: WebSearch
storage:
table_name: "support_bot_sessions"
auto_upgrade_schema: true
Want to extend with Python? Just create agent.py:
from agno.agent import Agent
from hive.discovery import discover_config
def get_support_bot(**kwargs):
config = discover_config() # Loads config.yaml
return Agent(
name=config['agent']['name'],
# ... custom logic here
**kwargs
)
๐ฆ Project Scaffolding
Opinionated structure that scales:
my-project/
โโโ ai/ # All AI components
โ โโโ agents/ # Agent definitions
โ โ โโโ examples/ # Built-in examples (learning)
โ โ โ โโโ support-bot/
โ โ โ โโโ code-reviewer/
โ โ โ โโโ researcher/
โ โ โโโ [your-agents]/ # Your custom agents
โ โโโ teams/ # Multi-agent teams
โ โโโ workflows/ # Step-based workflows
โ โโโ tools/ # Custom tools
โ
โโโ data/ # Knowledge bases
โ โโโ csv/ # CSV files
โ โโโ documents/ # Document stores
โ
โโโ .env # Environment config
โโโ hive.yaml # Project settings
โโโ pyproject.toml # Dependencies
๐ Built on Agno's Power
Hive is a thin layer over Agno. You get all of Agno's features:
- Performance: 3ฮผs agent instantiation, 6.5KB memory per agent
- Native tools: 20+ production-ready tools (web search, code execution, file ops, etc.)
- Storage: PostgreSQL, SQLite with auto-schema migration
- Playground: Auto-generated API with OpenAPI docs
- Workflows: Sequential, parallel, conditional, looping
- Teams: Automatic routing, collaboration, coordination
๐ ๏ธ Builtin Tools Catalog
Easy access to Agno's tools with metadata and recommendations:
| Category | Tools |
|---|---|
| Execution | PythonTools, ShellTools |
| Web | DuckDuckGoTools, TavilyTools, WebpageTools |
| Files | FileTools, CSVTools |
| Data | PandasTools, PostgresTools |
| APIs | SlackTools, EmailTools, GitHubTools |
from hive.config.builtin_tools import BUILTIN_TOOLS
# Browse tools
for tool_name, info in BUILTIN_TOOLS.items():
print(f"{tool_name}: {info['description']}")
๐ฅ Hot Reload
Change configs, see results instantly:
$ hive dev # Starts dev server
# Edit ai/agents/my-bot/config.yaml
# Server automatically reloads
# Test at http://localhost:8886/docs
๐ข Enterprise-Ready
When you're ready for production:
- โ PostgreSQL with PgVector (hybrid search, HNSW indexing)
- โ Environment-based configuration (dev/staging/prod)
- โ API authentication with cryptographic keys
- โ Structured logging with Loguru
- โ Type safety with Pydantic validation
- โ Test coverage (87% pass rate, 147 tests)
Quick Start
Prerequisites
- Python 3.11+ (3.12 recommended)
- At least one AI provider API key:
- OpenAI (
OPENAI_API_KEY) - Anthropic (
ANTHROPIC_API_KEY) - Google (
GEMINI_API_KEY)
- OpenAI (
Installation
# Install via uvx (recommended - no pollution)
uvx automagik-hive --help
# Or install globally with uv
uv pip install automagik-hive
# Or install with pip
pip install automagik-hive
Create Your First Agent (30 seconds)
YAML-Only Pattern (Recommended for Beginners):
# 1. Initialize project
uvx automagik-hive init my-project
cd my-project
# 2. Create API keys file
cp .env.example .env
# Edit .env and add your API keys
# 3. Create agent with just YAML config
hive create agent my-bot
# 4. Edit config (optional)
cat ai/agents/my-bot/config.yaml
# 5. Start development server
hive dev
# 6. Access API docs
open http://localhost:8886/docs
Advanced Pattern (Python Factories):
# Create agent with Python customization
hive create agent my-bot --with-python
# Now you can customize ai/agents/my-bot/agent.py
# for advanced tool loading, dynamic instructions, etc.
AI-Powered Creation (Optimal Configuration):
# AI generates optimal YAML config based on description
hive ai my-bot --description "Customer support bot with FAQ knowledge"
Your First Conversation
# Via CLI
curl -X POST http://localhost:8886/agents/my-bot/runs \
-H "Content-Type: application/json" \
-d '{"message": "How do I reset my password?"}'
# Via Python
from agno.agent import Agent
agent = Agent.load("ai/agents/my-bot")
response = agent.run("How do I reset my password?")
print(response.content)
Real-World Examples
Customer Support Router
Problem: Route support queries to specialized agents (billing, technical, general)
# ai/teams/support-router/config.yaml
team:
name: "Support Router"
team_id: "support-router"
mode: "route" # Agno handles routing automatically
members:
- "billing-agent"
- "technical-agent"
- "general-agent"
instructions: |
You are a support routing system.
Route queries based on topic:
- Billing: payments, invoices, refunds
- Technical: bugs, errors, integrations
- General: questions, information, other
Result: Automatic routing, no manual orchestration code needed.
Knowledge-Powered Agent
Problem: Answer customer questions from FAQ database
agent:
name: "FAQ Bot"
agent_id: "faq-bot"
model:
provider: "openai"
id: "gpt-4o-mini"
tools:
- name: CSVTools
csv_path: "./data/faqs.csv"
instructions: |
Search the FAQ database for answers.
Provide concise, helpful responses.
If no match found, offer to escalate.
Setup CSV:
question,answer,category
How do I reset password?,Go to Settings > Security > Reset Password,account
What are your hours?,We're available 24/7 via chat and email,general
How do refunds work?,Refunds process in 5-7 business days,billing
Smart loading: Only re-embeds changed rows, saves 99% on embedding costs.
Code Review Workflow
Problem: Automated code review with security checks
# ai/workflows/code-review/config.yaml
workflow:
name: "Security Code Review"
workflow_id: "code-review"
steps:
- name: "static_analysis"
agent: "security-scanner"
- name: "review"
agent: "code-reviewer"
tools:
- PythonTools
- FileTools
- name: "report"
function: "generate_report"
Result: Comprehensive reviews covering OWASP Top 10, best practices, and fix suggestions.
Architecture That Scales
Project Structure
my-project/
โโโ ai/ # AI components (auto-discovered)
โ โโโ agents/ # Agents (YAML + optional Python)
โ โโโ teams/ # Multi-agent teams
โ โโโ workflows/ # Step-based workflows
โ โโโ tools/ # Custom tools
โ
โโโ data/ # Knowledge bases
โ โโโ csv/ # CSV files (with hot reload)
โ โโโ documents/ # Other documents
โ
โโโ .env # Environment variables
โโโ hive.yaml # Project configuration
โโโ pyproject.toml # Python dependencies
Auto-Generated API
$ hive dev
# Agno Playground generates:
GET / # API info
GET /health # Health check
GET /agents # List agents
POST /agents/{id}/runs # Run agent
GET /agents/{id}/sessions # Get sessions
POST /teams/{id}/runs # Run team
POST /workflows/{id}/runs # Run workflow
Full OpenAPI docs at /docs.
CLI Commands
# Project Management
hive init <project-name> # Initialize new project
hive version # Show version
# Component Creation - Templates
hive create agent <name> # Create agent from template
hive create team <name> # Create team
hive create workflow <name> # Create workflow
hive create tool <name> # Create custom tool
# Component Creation - AI-Powered โญ
hive ai <agent-name> --interactive # Interactive AI generation
hive ai <agent-name> --description "..." # Generate from description
# Development
hive dev # Start dev server (hot reload)
hive dev --port 8000 # Custom port
hive dev --examples # Run with built-in examples
# Production
hive serve # Start production server
hive serve --port 8000 # Custom port
Database Backend Selection
Hive supports multiple database backends for different use cases:
| Backend | Best For | Setup | Performance | Features |
|---|---|---|---|---|
| PostgreSQL | Production | Docker | โญโญโญโญโญ | Full text search, PgVector, HNSW |
| SQLite | Development | None | โญโญโญ | File-based, good for testing |
PostgreSQL (Recommended for Production)
# Start PostgreSQL with Docker
docker run -d \
--name hive-postgres \
-e POSTGRES_PASSWORD=your_password \
-e POSTGRES_DB=hive \
-p 5432:5432 \
pgvector/pgvector:latest
# Update .env
HIVE_DATABASE_URL=postgresql://postgres:your_password@localhost:5432/hive
Features:
- PgVector for hybrid search
- HNSW indexing (fast vector similarity)
- Full-text search
- Auto-schema migration
- Production-ready
SQLite (Development Only)
# Update .env
HIVE_DATABASE_URL=sqlite:///./data/hive.db
Limitations:
- No concurrent writes
- No vector similarity search
- File locking issues under load
- Not recommended for production
Environment Configuration
Minimal .env (20 vars, not 145!):
# Core (Required)
HIVE_ENVIRONMENT=development # development|staging|production
HIVE_API_PORT=8886 # API server port
HIVE_DATABASE_URL=postgresql://... # Database connection
HIVE_API_KEY=hive_your_32_char_key # API authentication
# AI Providers (At least one required)
OPENAI_API_KEY=sk-... # OpenAI models
ANTHROPIC_API_KEY=sk-ant-... # Claude models
GEMINI_API_KEY=... # Google models
# Optional
HIVE_LOG_LEVEL=INFO # DEBUG|INFO|WARNING|ERROR
HIVE_VERBOSE_LOGS=false # Detailed logging
HIVE_ENABLE_METRICS=true # Performance tracking
HIVE_CORS_ORIGINS=http://localhost:3000 # Comma-separated origins
Development
# Clone repository
git clone https://github.com/namastexlabs/automagik-hive
cd automagik-hive
# Install dependencies
uv sync
# Run tests
uv run pytest # All tests
uv run pytest tests/hive/knowledge/ # Knowledge tests
uv run pytest -v --cov=hive # With coverage
# Lint & format
uv run ruff check --fix
uv run ruff format
# Type check
uv run mypy hive/
# Start examples
uv run python hive/examples/agents/demo_all_agents.py
Why Hive vs Pure Agno?
| Feature | Pure Agno | Hive + Agno |
|---|---|---|
| Agent Creation | Write Python factories | YAML or AI generation |
| Getting Started | Read docs, write boilerplate | hive init โ instant project |
| Knowledge Base | Setup PgVector, write loaders | create_knowledge_base() with hot reload |
| Model Selection | Research 7+ providers | AI recommends optimal choice |
| Tool Selection | Browse Agno tools | Catalog + AI recommendations |
| CSV RAG | Write custom incremental loader | Built-in hash-based incremental |
| Project Structure | DIY | Opinionated ai/ structure |
Hive = Scaffolding for Agno
Like Create React App for React, Hive removes setup friction without replacing the framework.
What Hive Does NOT Do
โ Compete with Agno - We extend it, don't replace it โ Reinvent orchestration - Use Agno's native teams/workflows โ Lock you in - Generated code is pure Agno, you own it โ Replace your code - We scaffold, you customize
Roadmap
V2.0 (Current) โ
- AI-powered agent generation with meta-agent
- Smart CSV RAG with hash-based incremental loading
- YAML-first configuration
- Project scaffolding with examples
- Builtin tools catalog
- Hot reload for dev server
V2.1 - Enhanced DevX ๐
- Interactive TUI for agent creation
- Live agent testing in terminal
- Knowledge base quality scoring
- Tool compatibility checker
- Agent performance profiling
V2.2 - Production Features ๐
- Multi-environment configs (dev/staging/prod)
- Cost tracking and optimization
- Deployment helpers (Docker, AWS, Fly.io)
- Agent monitoring dashboard
- Workflow visualization
Enterprise Features
Security & Authentication
- โ
Cryptographic API key generation (
secrets.token_urlsafe) - โ Constant-time validation (prevents timing attacks)
- โ Environment-based security (auto-enabled in production)
- โ Input validation (size limits, sanitization)
Database & Storage
- โ PostgreSQL with PgVector (hybrid search)
- โ SQLite for development
- โ Auto-schema migration
- โ Session persistence
Monitoring & Observability
- โ Structured logging (Loguru)
- โ Automatic emoji mapping
- โ Performance metrics
- โ Error tracking
Deployment
- โ Docker-ready
- โ Environment scaling (dev/staging/prod)
- โ Health checks
- โ Graceful shutdown
Contributing
We welcome contributions! See CONTRIBUTING.md for guidelines.
Areas for contribution:
- Additional builtin tool integrations
- Example agents for common use cases
- Documentation improvements
- Bug fixes and performance optimizations
Acknowledgments
Powered by:
- Agno - The AI agent framework powering everything
- UV - Modern Python packaging and project management
- Typer - Beautiful CLI framework
- Rich - Terminal output that doesn't suck
- Pydantic - Data validation with type hints
- FastAPI - Modern web framework (via Agno)
License
MIT License - see LICENSE for details.
Links
- Documentation: docs/
- Examples: hive/examples/
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Agno Framework: github.com/agno-agi/agno
Built with โค๏ธ by practitioners who got tired of boilerplate.
Remember: Hive doesn't compete with Agno. We make it easier to use. ๐
Project details
Release history Release notifications | RSS feed
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_hive-1.0.0rc7.tar.gz.
File metadata
- Download URL: automagik_hive-1.0.0rc7.tar.gz
- Upload date:
- Size: 920.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
212d9b22eff853fd58ad1481bcc2b4a73fc56cc2dd14be910eee7f34afa59a2e
|
|
| MD5 |
e460d90d3c6373bd4d640019e582c7f1
|
|
| BLAKE2b-256 |
67f36a5b4afa7b86e4123b8026b82caf0e73d50b361eb1f1735b331fc4ddf694
|
Provenance
The following attestation bundles were made for automagik_hive-1.0.0rc7.tar.gz:
Publisher:
publish-pypi.yml on namastexlabs/automagik-hive
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
automagik_hive-1.0.0rc7.tar.gz -
Subject digest:
212d9b22eff853fd58ad1481bcc2b4a73fc56cc2dd14be910eee7f34afa59a2e - Sigstore transparency entry: 714005650
- Sigstore integration time:
-
Permalink:
namastexlabs/automagik-hive@8f85ea3dc7f1b4b7238d9999e46a53cb062e122b -
Branch / Tag:
refs/tags/v1.0.0rc7 - Owner: https://github.com/namastexlabs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@8f85ea3dc7f1b4b7238d9999e46a53cb062e122b -
Trigger Event:
push
-
Statement type:
File details
Details for the file automagik_hive-1.0.0rc7-py3-none-any.whl.
File metadata
- Download URL: automagik_hive-1.0.0rc7-py3-none-any.whl
- Upload date:
- Size: 181.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a7d50ae02461b6da1ad08cfb884c4a1c8c5daac86f2cbd55739941b5297f7b8e
|
|
| MD5 |
88610563e19400739866e59b3e755c75
|
|
| BLAKE2b-256 |
44f3c7427abb229afaeb894e3f4b9aa676415cf72a77c85b0a9c74cd878f2f26
|
Provenance
The following attestation bundles were made for automagik_hive-1.0.0rc7-py3-none-any.whl:
Publisher:
publish-pypi.yml on namastexlabs/automagik-hive
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
automagik_hive-1.0.0rc7-py3-none-any.whl -
Subject digest:
a7d50ae02461b6da1ad08cfb884c4a1c8c5daac86f2cbd55739941b5297f7b8e - Sigstore transparency entry: 714005658
- Sigstore integration time:
-
Permalink:
namastexlabs/automagik-hive@8f85ea3dc7f1b4b7238d9999e46a53cb062e122b -
Branch / Tag:
refs/tags/v1.0.0rc7 - Owner: https://github.com/namastexlabs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@8f85ea3dc7f1b4b7238d9999e46a53cb062e122b -
Trigger Event:
push
-
Statement type: