Introduction
Hive is the core framework developed by Aden for building autonomous, self-improving, and goal-driven AI agents. Unlike traditional agent frameworks that rely on hardcoded, brittle Directed Acyclic Graphs (DAGs), Hive enables agents to dynamically generate their own execution logic, observe failures, and evolve their code to overcome obstacles.
The framework is designed for production environments where reliability and adaptability are paramount. It integrates human-in-the-loop (HITL) workflows with high-performance execution runtimes and a sophisticated Model Context Protocol (MCP) tool ecosystem.
Core Philosophy
Hive operates on the principle of Goal-Driven Development. Instead of mapping every possible edge case in a workflow, developers define a high-level goal and a set of available tools. The framework handles:
- Dynamic Graph Generation: Translating natural language goals into executable node structures.
- Autonomous Evolution: Capturing execution failures and using an internal "coding agent" to patch or optimize the agent's logic.
- Managed Reliability: Providing a structured runtime with built-in credential management, multi-level logging, and observability.
Key Features
- Self-Improving Loops: When an agent encounters a failure, Hive captures the execution context and allows the agent to propose a code modification to its own node graph, which can then be redeployed.
- Human-in-the-Loop (HITL): Native support for approval stages. Agents can pause execution to request user confirmation for sensitive actions or to review generated test cases.
- MCP Integration: Built-in support for the Model Context Protocol (MCP), allowing agents to easily consume 100+ standardized tools for file system access, web searching, and more.
- Multi-LLM Support: Native providers for OpenAI, Anthropic, and Google Gemini, unified under a single execution interface.
- Real-time Observability: A specialized TUI (Terminal User Interface) provides a live view of the agent's graph, current node execution, and a chat interface for intervention.
Framework Components
The Agent Runtime
The AgentRuntime is the heartbeat of Hive. It manages the lifecycle of an agent, including its state, tool execution, and event bus.
from framework.runtime.agent_runtime import create_agent_runtime
from framework.runtime.execution_stream import EntryPointSpec
runtime = create_agent_runtime(
graph=my_generated_graph,
goal="Research the impact of Llama-3 on the open-source community.",
storage_path="./agent_data",
entry_points=[
EntryPointSpec(
id="start",
name="Research Start",
entry_node="intake",
trigger_type="manual"
)
],
llm=my_llm_provider,
tools=tool_list
)
await runtime.start()
Three-Level Logging
Hive implements a granular observability schema designed for both debugging and production monitoring:
- Level 1 (Summary): High-level run results, token usage, and overall success/failure.
- Level 2 (Details): Per-node completion data, including latency, attempts, and "attention flags" for manual review.
- Level 3 (Tool Logs): Trace-level data for every tool call and LLM interaction, aligned with OpenTelemetry standards.
Credential Vault
Manage sensitive API keys and OAuth tokens securely. Hive handles expiration, auto-refreshing of tokens, and scoped access for agents without exposing secrets to the LLM context directly.
Interactive TUI
For developers, Hive includes a sophisticated TUI dashboard. This allows you to:
- Visualize the topological order of the agent's graph.
- Monitor "Active Nodes" as they process data.
- Interact with the agent via a REPL to provide feedback or clarify goals during execution.
# Launch the dashboard for a specific agent
hive tui --agent deep_research_agent
Next Steps
To begin building with Hive, explore the Quickstart Guide to set up your first agent, or dive into the Architecture Overview to understand how the dynamic node graph system functions under the hood.