hive README

项目的 README,来自 github.com/aden-hive/hive。合并为一个 markdown 文件:README.md。

OpenHive. Describe the outcome; a queen agent grows the colony that gets it done.

English | 简体中文 | Español | हिन्दी | Português | 日本語 | Русский | 한국어

Apache 2.0 License Y Combinator Discord Follow on X LinkedIn

An open-source runtime for colonies of AI agents that do real business work.

Tell a queen agent what you need. She does the first piece herself to learn what the job takes, then hands the rest to as many parallel workers as it needs. Every result lands in a shared tracker you can query, audit and resume from.

Demo: a growth queen researches five products' Hacker News launches with a colony of parallel workers
A real run. Only the typing and the waiting are sped up, and the badge says by how much. Watch the full run (MP4).

What you just watched

A growth team preparing a Show HN wants to know how five developer tools' own launches did on Hacker News. Here's what Hive did with that one message:

  1. You hand it to a queen. Queens are long-lived agents with a role (here, Head of Growth) and their own memory and tools.
  2. She asks the one question that changes the answer: every launch post, or only each product's original launch? You pick every launch, and she carries on.
  3. She proposes a colony, and you approve it. Five products means five parallel jobs, so the chat becomes a colony: the queen plus as many worker agents as the work needs.
  4. She does one herself. She takes PostHog first, works out what counts as a genuine launch post rather than a passing mention, checks the numbers against the Hacker News API, and saves the method as a reusable skill.
  5. She fans out. A playbook starts one worker per product. Each follows her skill and writes its result to the colony's tracker, a shared SQLite table.
  6. She checks every row before she answers, and fixes one. Cal.com's worker counted a post from its old name, Calendso, but that post wasn't a Show HN, Launch HN or YC launch. She clears the row, and the chart shows Cal.com as not found rather than zero.

None of this was wired up in advance. There's no workflow graph to draw: the queen shapes the colony as the work unfolds, and a tracker on disk, not a context window, keeps count of what's done and what's left.

Quick start

You'll need Python 3.11+, Node.js 20+ and git. The quickstart installs uv and ripgrep if they're missing, and offers to install Node.

And a model. The quickstart sets up any of these:

git clone https://github.com/aden-hive/hive.git
cd hive
./quickstart.sh          # macOS / Linux
.\quickstart.ps1         # Windows (PowerShell 5.1+)

The quickstart creates a single Python environment for the workspace, stores your API key encrypted under ~/.hive, asks which model to use, builds the dashboard and opens it at http://127.0.0.1:8787. Next time, run hive open from the repository.

[!NOTE] This repository is a uv workspace: pip install -e . at its root installs a placeholder that won't run, so use the quickstart. Without the repository, pip install "aden-hive[tools]" installs Hive from PyPI; then run hive open. To add an optional package (a chat-app channel, for example), see Optional packages. To build your own project on Hive's agent loop and models, depend on aden-hive: see Building on Hive.

Then type a task on the home screen and choose the queen to give it to, or open the Prompt Library and send a ready-made prompt straight to the queen it was written for.

How it works

flowchart LR
    You(["You"]) -->|"describe the outcome"| Queen["Queen<br/>(persistent agent)"]
    Queen -->|"proposes a colony,<br/>you approve"| Pilot["Pilot<br/>(one unit, done by the queen)"]
    Pilot -->|"saves the method"| Skill["Skill + playbook"]
    Skill -->|"run_worker / run_playbook"| W["Worker clones<br/>in parallel"]
    W -->|"tracker_upsert"| T[("Tracker<br/>shared SQLite")]
    T -->|"SQL: what's done,<br/>what's left"| Queen
    Queen -->|"checked answer"| You

    style Queen fill:#ffb100,stroke:#cc5d00,color:#333
    style T fill:#fff3d6,stroke:#cc5d00,color:#333
    style W fill:#ff9800,stroke:#cc5d00,color:#fff

Hive has one execution primitive: the agent loop. The queen is one, and every worker is a clone of it with its own task, a narrower set of tools and a strict budget. Orchestration is a tool call, not a compiled graph:

The architecture overview goes deeper: the loop, the tool surface, memory, human oversight, and how state survives a crash.

Home: the hive map of queens and colonies
Home. Your queens and their colonies on one map. Describe a task and choose who takes it.
A colony's workers running in parallel
Workers. One per unit of work, each with its own task and budget, all reporting to the queen.
The colony tracker filling with results
Tracker. Results land in a shared table as workers finish, ready to query, export or resume from.
The queen's final answer with a sourced table and chart
Result. A checked answer with sources and a chart, right in the chat.

What's inside

Queens with a job and a memory. Hive ships thirteen persona queens. Six are active out of the box (Growth, RevOps, Content, Lead Generation, Outbound, and Brand & Design); hire the rest from the Org Chart, or create your own. Each one keeps notes in markdown memory as she works, and relevant past conversations are recalled into her context automatically.

A memory you can measure. A queen remembers you across sessions. She writes notes about you as she works, related past conversations are placed in front of her before each message, and she checks her memory before asking you for something you've already told her. We benchmark it on LongMemEval, run end to end through Hive and graded by the official judge, with gpt-6.1-sol answering:

LongMemEval-S LongMemEval-M
History per question ~115k tokens ~1.1M tokens
Hive 88.4% 82.0%
The same model reading the whole history 96.8% doesn't fit

When a whole history fits in the model's context, reading all of it is still more accurate than Hive's memory. When it doesn't, as on LongMemEval-M, memory is the only option. These scores measure recall of past conversations. Her notes come on top: since 1.0.15 they reach her before she answers, and on LongMemEval-S they raised the score from 91.0% to 93.4%, and preference answers from 70% to 87%, graded by our development judge. The benchmark page has the methodology, per-type results, the notes experiment, a comparison with other memory systems, and the limitations.

Built-in tools that run in-process. Shell commands and background jobs, file editing, fast code search, PDFs, attachments and images, web scraping, charts (ECharts and Mermaid), CSV files, and image generation through Hive LLM. They run inside Hive itself, with no tool servers to start.

Your browser, driven by your agents. The Hive Browser Bridge extension lets agents work in your own Chrome, where you're already logged in. Each worker gets its own tab group.

Skills. Reusable instructions in the open Agent Skills format. Hive ships with a set, queens write new ones once a method proves out, and you manage them all in the Skills Library.

Any MCP server. Add one with hive mcp add, and its tools join the same allowlists as the built-ins. The full integration catalog in tools/ (GitHub, Gmail, HubSpot, Slack, Notion and many more) runs as one; see docs/tools.md.

Runs while you're away. Colonies can wake themselves on cron, interval or webhook triggers. Sentinel, opt-in per colony, watches a queen whenever she stops: it nudges her on, or escalates to you through the Hive inbox, Telegram or Slack, and she picks up as soon as you reply.

Built to survive. Every agent saves its state to disk and resumes exactly where it stopped after a crash or restart. Large tool results spill to files instead of flooding the context, long sessions compact themselves, stuck or looping turns get caught, and every worker runs under a hard tool-call budget.

Any model. Anything LiteLLM supports, including OpenAI, Anthropic, Gemini, OpenRouter, Hive LLM, any OpenAI-compatible endpoint and local models through Ollama. Workers can run on a different model than their queen, and text-only models still see images through a vision fallback.

Is Hive for you?

Hive earns its keep once the model is no longer the hard part, and everything around it is:

For a single prompt or a one-off script, a plain agent is simpler.

Documentation

FAQ

Which models does Hive support? Any provider LiteLLM supports, plus any OpenAI-compatible endpoint. The quickstart sets up the common ones, including coding subscriptions such as Claude Code and OpenAI Codex; docs/configuration.md covers the rest.

Can I run it with local models? Yes. Choose Ollama in the quickstart, or set a model such as ollama/llama3 with Ollama running locally.

How is this different from other agent frameworks? Most frameworks ask you to design a graph of agents and wire up their inputs and outputs. Hive has one kind of agent: the queen is an agent loop, and every worker is a clone of it. Orchestration happens at runtime through tool calls, and agents coordinate through a shared SQL tracker instead of passing messages along edges. Persistence, resume, budgets, compaction and oversight live in that one loop, so every agent gets them.

Where does my data live? On your machine. Sessions, colonies, trackers and memory are plain files under ~/.hive (or wherever HIVE_HOME points), and API keys are stored there encrypted.

How do I keep costs under control? Every worker runs under hard limits on turns and tool calls, so a stuck worker stops by itself, and the number of workers running at once is capped. Every model call is metered. There are no spending limits in dollars yet.

Can agents use my own tools and APIs? Yes: through the built-in shell and browser, through any MCP server you add, and through skills that teach them your procedures.

Is Hive open source? Yes, under the Apache License 2.0.

Contributing

Contributions are welcome, especially tools, integrations and skills (#2805). Read CONTRIBUTING.md first, and get assigned to an issue before you open a pull request: comment on the issue and a maintainer will assign you. Issues with reproduction steps or a concrete proposal get priority.

Community

We're hiring in engineering, research and go-to-market. See open positions.

Security

To report a vulnerability, see SECURITY.md.

License

Apache License 2.0. See LICENSE.

Star history

Star history chart

Made with 🔥 passion in San Francisco

hive (aden-hive/hive)

正在搜索数据库…

11.2K ·GitHub
这是什么?OpenHive 是一个开源的多智能体运行框架,面向生产环境的 AI:它提供了状态管理、故障恢复、可观测性、成本控制和人工监督,让成群的智能体能够稳定地跑真正的业务流程,而不是停留在演示阶段。
所谓的智能体集群到底是什么?一个集群由一只『蜂后』(Queen)加上她按需派生的工蜂智能体组成。蜂后是常驻的、直接面向用户的负责人。每个工蜂都是她那个智能体循环的克隆(用同样的工具、同样的模型,只是各干各的任务),它们通过共享的追踪账本和持久化的计划来协作,不需要去搭建任何流程图。
怎么安装、怎么跑起来?不要用 pip install —— Hive 是一个 uv 工作区,那样装会把它弄坏。在仓库里运行快速启动脚本(原生 Windows 上的 quickstart.ps1 / hive.ps1,需要 PowerShell 5.1+,WSL 可选):它会配置好运行时、MCP 工具、加密的凭据存储和模型配置,然后在浏览器里打开控制面板。以后想再打开,运行 hive open 即可。
开始之前,我的电脑上需要准备什么?需要 Python 3.11+,以及一个用来驱动智能体的大模型服务商(也就是它的 API 密钥)。ripgrep 是可选的,但它能明显加快 Windows 上的文件搜索——没有它也有 Python 版的兜底方案;其余所有东西都由快速启动脚本通过 uv 自动安装。
如果一个跑得很久的任务中途崩了会怎样?运行是防崩溃的:park/resume(挂起/恢复)机制会把智能体的状态保存到磁盘,所以崩溃或暂停的任务会从上次中断的地方原样继续,而不是从头再来。
Hive 适合谁用——谁应该跳过它?适合那些要把 AI 智能体从原型推向生产环境的团队:需要状态管理、故障恢复、并行执行、成本限制和可审计性的真实业务流程。README 自己也说了,对于简单的智能体链或者一次性脚本,它并不合适。
可以用哪些大模型来驱动智能体?它对模型不挑食:通过 LiteLLM 支持 100 多家服务商——OpenAI GPT-4/4o、Anthropic Claude、Google Gemini、DeepSeek、Mistral、Groq、OpenRouter,还有 Hive LLM。本地模型也能用,比如在 Ollama 运行的情况下用 ollama/llama3;你只要设置好 API 密钥的环境变量和模型名就行。
当智能体需要人来拍板时,我怎么介入?通过 Sentinel:智能体会向一个绑定你账号的 Slack 或 Telegram 频道上报请求人工处理,然后挂起并把状态保存到磁盘;你一回复,它就从上次中断的地方原样继续。集群里任何智能体都可以这样暂停,超时时间和上报策略都可以配置。
我能把智能体的花费控制住吗?可以——预算功能带有消费上限、限流和自动降级到更便宜模型的策略,可以按团队、按智能体或按工作流来设置,还有实时的成本跟踪和告警。
智能体能接入我公司的工具和数据吗?可以——每个智能体都自带工具调用能力,Hive 通过 MCP(100 多个集成工具)能连接 CRM、客服、即时通讯、数据、文件和内部 API,还可以通过一个原生扩展实现通用计算(General Compute Use)和浏览器操作(Browser Use)。你添加的任何一个工具,整个集群都能用。
作者
aden-hive
大小
63.2 MB
星标
11.2K
时长
10个月
提交 · 90 天