Skip to main content

Orchestrate distributed swarms of AI agents that collaboratively solve complex tasks.

This project has been archived.

The maintainers of this project have marked this project as archived. No new releases are expected.

Project description

Hivemind

Hivemind

Distributed AI Swarm Runtime

PyPI version License: GPL v3 Python 3.12+

Hivemind is a distributed AI swarm runtime for coordinating large numbers of AI agents across complex tasks. Orchestrate multi-agent systems with a swarm execution model: tasks are decomposed into subtasks, executed in parallel, and coordinated through a scheduler and dependency graph.

Install: PyPI package is hivemind-ai; CLI command is hivemind.


Features

  • PlannerSchedulerExecutorAgents — DAG-based task execution with configurable parallelism
  • 120+ tools — Research, coding, data science, documents, experiments, memory, filesystem
  • Memory & knowledge graph — Episodic, semantic, research, artifact memory; entity/relationship extraction
  • Provider routing — OpenAI, Anthropic, Azure, Gemini (model name → provider)
  • EventLog, replay, telemetry — Structured events for debugging and metrics
  • CLI & TUIhivemind run, hivemind research, hivemind analyze, hivemind tui with dashboard

Architecture

    Planner
       ↓
    Scheduler
       ↓
    Executor
       ↓
    Agents  →  Tools  →  Memory  →  Knowledge Graph

Quickstart

Install (Python 3.12+):

pip install hivemind-ai
# or: uv add hivemind-ai

Run a task:

hivemind run "Summarize swarm intelligence in one paragraph."

Use in code:

from hivemind.swarm.swarm import Swarm

swarm = Swarm(worker_count=4, worker_model="gpt-4o-mini", planner_model="gpt-4o-mini", use_tools=True)
results = swarm.run("Analyze diffusion models and write a one-page summary.")

Set API keys via environment or ~/.config/hivemind/config.toml (see Configuration below).


CLI usage

Command Description
hivemind run "task" Run swarm with the given task
hivemind tui Launch terminal UI (prompt + output + dashboard)
hivemind research papers/ Literature review on a directory of papers
hivemind analyze repo/ Analyze repository architecture
hivemind memory [--limit N] List memory entries

TUI usage

hivemind tui
  • Prompt — Type a task and press Enter or r to run.
  • Output — Response and step status (e.g. “Planning…”, “Step 2 of 5…”).
  • Dashboard (d) — Tasks, swarm graph, memory, logs.
  • Keys: r Run, d Dashboard, Esc Unfocus, o Output, q Quit.

Examples

Workflow Command
Literature review hivemind research papers/ or uv run python examples/research/literature_review.py [dir]
Repository analysis hivemind analyze . or uv run python examples/coding/analyze_repository.py [path]
Dataset analysis uv run python examples/data_science/dataset_analysis.py [path-to.csv]
Document intelligence uv run python examples/documents/analyze_documents.py [dir]
Parameter sweep uv run python examples/experiments/parameter_sweep.py --params '{"lr":[0.01,0.1]}'

Outputs go to examples/output/. Run from project root when using script paths.


Demo GIF

To create a demo GIF showing swarm execution and task progress:

  1. Start the TUI: hivemind tui
  2. Use a screen recorder (e.g. asciinema, LICEcap, or terminal GIF tools) to record:
    • Typing a task in the prompt (e.g. “Summarize swarm intelligence in one paragraph”)
    • Pressing Enter to run
    • The spinner and step status (Planning…, Executing step 1 of N…)
    • The final response appearing
    • Optionally pressing d to open the Dashboard (tasks, swarm graph, memory, logs)
  3. Export the recording as a GIF and add it to the README or docs (e.g. ![Demo](docs/demo.gif)).

Example asciinema:

asciinema rec demo.cast
# run: hivemind tui, then run a task and optionally open dashboard
# exit TUI (q), then Ctrl-D to stop rec
# convert: asciinema-agg demo.cast demo.gif  # or use asciinema’s playback + another tool for GIF

Configuration

Config order: env > project .hivemind/config.toml > user ~/.config/hivemind/config.toml > defaults.

Minimal TOML (keys in env):

[default]
worker_model = "gpt-4o-mini"
planner_model = "gpt-4o-mini"
events_dir = ".hivemind/events"
data_dir = ".hivemind"

Env overrides: HIVEMIND_WORKER_MODEL, HIVEMIND_PLANNER_MODEL, HIVEMIND_EVENTS_DIR, HIVEMIND_DATA_DIR, plus provider keys (OPENAI_API_KEY, AZURE_OPENAI_*, etc.). See docs/providers.md and docs/development.md.


Documentation

Doc Description
Introduction What Hivemind is, problem it solves, core concepts
Architecture Planner, Scheduler, Executor, Agents, Tools, Memory, events, telemetry, replay
Swarm runtime Task lifecycle, flow, code snippets
Tools Tool architecture, registry, runner, creating tools, categories
Memory Memory types, store, retrieval, embedding search, knowledge graph
Providers Provider routing, model spec, Azure
CLI All CLI commands and parameters
TUI Layout, panels, keyboard shortcuts
Examples Example workflows and commands
Development Project structure, adding tools/providers, setup
Contributing Setup, testing, code style, PR guidelines
FAQ Common questions

Contributing

Contributions are welcome. See CONTRIBUTING.md for setup, testing, and PR guidelines.


License

Hivemind is licensed under GPL-3.0-or-later. See LICENSE for the full text.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hivemind_ai-0.1.0.tar.gz (2.4 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

hivemind_ai-0.1.0-py3-none-any.whl (206.8 kB view details)

Uploaded Python 3

File details

Details for the file hivemind_ai-0.1.0.tar.gz.

File metadata

  • Download URL: hivemind_ai-0.1.0.tar.gz
  • Upload date:
  • Size: 2.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for hivemind_ai-0.1.0.tar.gz
Algorithm Hash digest
SHA256 e92031e847451e5f060e6020c0d004def3ee8cedbeaecfd9c8af20b40302ab58
MD5 b6eb5acbcdc64c89b890390c7a6f08e8
BLAKE2b-256 fa78a86e4e1b0571538648b17aac0826b18fa20122cc3c0b86dccaae18a5b4d7

See more details on using hashes here.

Provenance

The following attestation bundles were made for hivemind_ai-0.1.0.tar.gz:

Publisher: pypi-publish.yml on rithulkamesh/hivemind

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file hivemind_ai-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: hivemind_ai-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 206.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for hivemind_ai-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fc5a1d9df4b9dba00b4106e0f54e22b3a32189949f245cd709af2dc4d8f1afb0
MD5 8b13564080e316b6ca01e48e50cdf6a9
BLAKE2b-256 5adaafcf9ca2c5d7f1a0a2a2035a52cbe175ea375f51fe27a37b34861d3522d4

See more details on using hashes here.

Provenance

The following attestation bundles were made for hivemind_ai-0.1.0-py3-none-any.whl:

Publisher: pypi-publish.yml on rithulkamesh/hivemind

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page