Skip to main content
Hive Banner

Build agents that improve themselves

Hive is a goal-driven agent framework that generates node graphs dynamically from natural language. When things break, the framework captures failure data, evolves the agent through a coding agent, and redeploys. Built-in human-in-the-loop nodes, credential management, and real-time monitoring give you control without sacrificing adaptability.

Quickstart

Get up and running with your first agent in under 5 minutes

Installation

Detailed setup instructions for Python 3.11+, dependencies, and verification

Key concepts

Understand graphs, nodes, edges, and the self-correction loop

GitHub

Star the repo and contribute to the open-source framework

Why Hive?

Traditional agent frameworks require you to hardcode workflows, manually wire nodes, and reactively handle failures. Hive flips this paradigm: you describe outcomes, and the system builds itself.
Hive uses a coding agent (“Queen”) to generate agent graphs from your goals. The framework then walks the graph, manages retries, and captures failures for continuous improvement.

Built for production

Hive is designed for developers and teams who need production-grade AI agents that execute real business processes:
  • Fast execution over open workflow
  • Self-healing agents that improve over time
  • Human-in-the-loop control and observability
  • Cost limits and budget management
  • Real-time monitoring via WebSocket streaming

How it works

1

Define your goal

Describe what you want to achieve in natural language. The coding agent generates an agent graph with nodes, edges, and connection code.
goal = Goal(
    id="sales-outreach",
    name="Sales Outreach Agent",
    description="Research prospects and draft personalized messages",
    success_criteria=[{
        "id": "message_sent",
        "description": "Message approved and sent to prospect",
        "metric": "custom",
        "target": "any"
    }]
)
2

Workers execute

SDK-wrapped nodes run with full observability and tool access. Each node is an event loop where the LLM reasons, calls tools, and self-corrects until outputs meet criteria.
node = NodeSpec(
    id="researcher",
    name="Prospect Researcher",
    description="Research prospect background and pain points",
    node_type="event_loop",
    input_keys=["prospect_name", "company"],
    output_keys=["research_summary", "pain_points"]
)
3

Framework monitors

Real-time metrics, cost tracking, and policy enforcement happen automatically. Human-in-the-loop nodes pause for approval at critical decision points.
4

Agents adapt

On failure, the framework captures telemetry, evolves the graph code, and redeploys. Agents improve across sessions without manual rewrites.

Features at a glance

Goal-driven generation

Define objectives in natural language. The coding agent generates the agent graph and connection code to achieve them.

Dynamic node connections

No predefined edges. Connection code is generated by LLMs based on your goals and evolves when patterns fail.

Self-correction

Nodes use the reflexion pattern: try, evaluate, learn from the result, retry. Agents adapt in real time.

Human-in-the-loop

Pause execution for human input with configurable timeouts. Place approval gates at critical decision points.

Parallel execution

Execute graph branches in parallel. Multiple agents can complete jobs simultaneously for faster results.

Browser automation

Control browsers on your computer to navigate websites, fill forms, and scrape dynamic content.

Production-ready

Self-hostable with real-time observability, encrypted credential storage, and cost controls.

100+ integrations

Connect to business systems via MCP tools: CRM, support, messaging, databases, and internal APIs.

Hive vs. traditional frameworks

Traditional frameworksHive
Hardcode agent workflowsDescribe goals in natural language
Manual graph definitionAuto-generated agent graphs
Reactive error handlingOutcome-evaluation and adaptiveness
Static tool configurationsDynamic SDK-wrapped nodes
Separate monitoring setupBuilt-in real-time observability
DIY budget managementIntegrated cost controls and degradation

Supported LLM providers

Hive supports 100+ LLM providers through LiteLLM integration:
  • Anthropic (Claude Opus, Sonnet, Haiku) - Recommended
  • OpenAI (GPT-4, GPT-4o, GPT-5)
  • Google Gemini (Flash, Pro)
  • DeepSeek, Mistral, Groq, Cerebras
  • Local models via Ollama
We recommend using Claude, GLM, and Gemini for best performance. Claude Opus 4.6 delivers the most reliable results for complex agent workflows.

Quick example

Here’s a minimal agent that greets users and converts messages to uppercase:
import asyncio
from framework.graph import Goal, GraphSpec, NodeSpec, EdgeSpec, EdgeCondition
from framework.graph.executor import GraphExecutor
from framework.runtime.core import Runtime

# Define the goal
goal = Goal(
    id="greet-user",
    name="Greet User",
    description="Generate a friendly uppercase greeting",
    success_criteria=[{
        "id": "greeting_generated",
        "description": "Greeting produced",
        "metric": "custom",
        "target": "any"
    }]
)

# Define nodes
greeter = NodeSpec(
    id="greeter",
    name="Greeter",
    description="Generates a simple greeting",
    node_type="event_loop",
    input_keys=["name"],
    output_keys=["greeting"]
)

uppercaser = NodeSpec(
    id="uppercaser",
    name="Uppercaser",
    description="Converts greeting to uppercase",
    node_type="event_loop",
    input_keys=["greeting"],
    output_keys=["final_greeting"]
)

# Connect nodes with an edge
edge = EdgeSpec(
    id="greet-to-upper",
    source="greeter",
    target="uppercaser",
    condition=EdgeCondition.ON_SUCCESS
)

# Create the graph
graph = GraphSpec(
    id="greeting-agent",
    goal_id="greet-user",
    entry_node="greeter",
    terminal_nodes=["uppercaser"],
    nodes=[greeter, uppercaser],
    edges=[edge]
)

# Execute the agent
async def main():
    runtime = Runtime(storage_path=Path("./agent_logs"))
    executor = GraphExecutor(runtime=runtime)
    
    result = await executor.execute(
        graph=graph,
        goal=goal,
        input_data={"name": "Alice"}
    )
    
    print(f"Result: {result.output.get('final_greeting')}")

asyncio.run(main())

Community and support

Join thousands of developers building production AI agents:
Windows users should use WSL (Windows Subsystem for Linux) or Git Bash. Some automation scripts may not execute correctly in Command Prompt or PowerShell.

Next steps

Run the quickstart

Install Hive and build your first agent in 5 minutes

Learn the concepts

Understand how graphs, nodes, and self-correction work

Build docs developers (and LLMs) love