No description
  • Python 74.5%
  • Vue 19.8%
  • TypeScript 4.3%
  • Shell 0.8%
  • CSS 0.5%
  • Other 0.1%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
hive deebf323a9 Serve the UI on the LAN: bind 0.0.0.0, drop the CORS wildcard
run.sh already had a HIVE_HOST knob defaulting to 127.0.0.1, so LAN access
came down to the default. The built UI is same-origin and the Vite dev server
proxies /api and /ws, so no frontend change was needed: useSocket.ts builds the
socket from location.host and the API paths are relative.

Also closed a hole that LAN exposure would have widened: CORS was
allow_origins=["*"], which on a LAN-reachable port lets any page in a visitor's
browser drive the swarm. It is now opt-in via HIVE_CORS_ORIGINS, empty by
default. Nothing needs it in either normal mode.

README documents the new default and that the API has no authentication: any
host that can reach the port can read and write any file the server's user can.

Verified: bound 0.0.0.0, index and /api/agents serve 200 over 192.168.1.145,
and an Origin: http://evil.example request returns no Access-Control-Allow-
Origin header. The websocket handshake and /api/system/status were not
verified (the latter probes provider endpoints and was still pending).
2026-09-26 21:10:48 -04:00
hive Serve the UI on the LAN: bind 0.0.0.0, drop the CORS wildcard 2026-09-26 21:10:48 -04:00
tests Remove ask_human; notify busy agents of DMs; unrestricted file access 2026-09-26 21:06:49 -04:00
web Remove ask_human; notify busy agents of DMs; unrestricted file access 2026-09-26 21:06:49 -04:00
.env.example Group chats, DB-backed API setup, per-agent models, faster status 2026-09-26 06:19:34 -04:00
.gitignore hive kernel: persistent agents, memory+skills, chat UI, tool loop 2026-09-26 04:29:25 -04:00
PLAN.md hive kernel: persistent agents, memory+skills, chat UI, tool loop 2026-09-26 04:29:25 -04:00
README.md Serve the UI on the LAN: bind 0.0.0.0, drop the CORS wildcard 2026-09-26 21:10:48 -04:00
requirements.txt hive kernel: persistent agents, memory+skills, chat UI, tool loop 2026-09-26 04:29:25 -04:00
run.sh Serve the UI on the LAN: bind 0.0.0.0, drop the CORS wildcard 2026-09-26 21:10:48 -04:00

HIVE

A persistent, self-improving agent swarm that runs against your own OpenAI-compatible endpoint. No cloud dependency, no framework lock-in.

Agents are permanent. They own a directory of files — memory.md, skills/, tools/, system.md — and they edit those files themselves. You chat with them in the browser and watch every turn, tool call, and thought stream live.

Quick start

cp .env.example .env        # set OPENAI_BASE_URL, OPENAI_API_KEY, DEFAULT_MODEL
./run.sh --boot             # builds the UI, starts the swarm on :8710

Open http://127.0.0.1:8710, or <http://<your-lan-ip>:8710> from another machine — run.sh binds 0.0.0.0 by default.

No authentication. Anything that can reach the port has full control of the swarm: it can read and write any file the server's user can, start agents, and message them. Bind 0.0.0.0 only on a network you trust, or put a reverse proxy with auth in front. Set HIVE_HOST=127.0.0.1 to go back to loopback.

What an agent can do

bash, python, read and write any file on the machine (their own, another agent's, or anywhere else — there's no file sandbox), edit their own memory.md, write and read their own skills, post to a shared board, spawn new agents, and message you without blocking on a reply.

Everything an agent does is written to SQLite as it happens, so a crash costs the current token, never the conversation.

Layout

hive/       the kernel: config, db, registry, tools, llm, agent loop, server
web/        Vue 3 + Vite chat UI
agents/     one directory per agent — memory.md, skills/, tools/, work/
state/      SQLite (WAL)
tests/      kernel tests (offline, stubbed LLM) + live API + true E2E
run.sh      supervisor: relaunches the server, catches failed boots

Tests

PYTHONPATH=$PWD python tests/test_kernel.py      # offline, stubbed LLM
PYTHONPATH=$PWD python tests/test_api_live.py    # needs ./run.sh running
PYTHONPATH=$PWD python tests/test_e2e_llm.py     # real HTTP endpoint end-to-end

Configuration

Variable Default Meaning
OPENAI_BASE_URL http://127.0.0.1:8000/v1 your OpenAI-compatible endpoint
OPENAI_API_KEY sk-local key for that endpoint
DEFAULT_MODEL default model id used unless an agent overrides it
HIVE_MAX_CONCURRENCY 8 agents allowed to think at once
HIVE_HOST 0.0.0.0 bind address; 127.0.0.1 for loopback only
HIVE_PORT 8710 listen port
HIVE_CORS_ORIGINS (empty) extra browser origins allowed cross-origin; usually not needed
HIVE_MAX_TURNS 40 tool-loop cap per user message
PRICE_IN_PER_MTOK / PRICE_OUT_PER_MTOK 0 per-1M-token prices; 0 = tokens only