neuron-explorer
Qwen3.5‑4B 전용 조향형 뉴런 탐색기, 모든 MLP 뉴런을 밀어 결과를 보관·탐색
Python 우선 다중 에이전트 시스템용 런타임 레이어, 지속 상태·스트리밍 이벤트·플러그인형 오케스트레이션 제공
A Python-first runtime layer for multi-agent systems, with persistent run state, streaming execution events, and a pluggable orchestration interface.
개발 도구Python · JavaGitHub @Emiyaaaaa직접 설치운영자 미확인
써 보셨어요? 한 번만 눌러 주세요. 로그인은 필요 없어요.
아직 감지된 업데이트가 없습니다. GitHub 릴리스가 나오면 여기에 보입니다.
개인 계정의 공개 저장소 소유자는 GitHub로 로그인해 운영자를 확인하고 소개를 직접 관리할 수 있습니다. 관리자 승인은 필요하지 않습니다.
로그인한 뒤 확인 파일을 만들어 이 저장소의 기본 브랜치에 30분 안에 커밋해 주세요. 다른 브랜치나 포크의 파일은 인정하지 않습니다. 파일을 올린 뒤 아래에서 확인하면 관리자 승인 없이 관리할 수 있습니다. 자격을 유지하려면 파일을 남겨 두세요.
로그인이 필요하면 로그인 화면으로 이동합니다. 로그인 후 이곳으로 돌아와 원하는 확인 버튼을 다시 눌러 주세요.
설치형 프로젝트는 배포 도메인 없이도 확인할 수 있습니다. 개인 저장소는 GitHub 로그인으로, 조직 저장소는 위의 저장소 확인 파일로 직접 확인해 주세요.
README 전체를 불러오는 중입니다. 아래는 저장된 발췌입니다.
A Python-first runtime layer for multi-agent systems, with persistent run
state, streaming execution events, and a pluggable orchestration interface.
License
Python
Hivemind provides the runtime infrastructure for multi-agent applications.
It does not replace frameworks such as LangGraph, AutoGen or CrewAI. Instead,
it gives them a consistent execution model: agents are invoked as runs, runs
produce ordered steps and messages, tool calls are recorded, and every state
change can be streamed to a client.README 전문 보기 ↗A Python-first runtime layer for multi-agent systems, with persistent run state, streaming execution events, and a pluggable orchestration interface.
中文 · Architecture · Data model · Plan
Hivemind provides the runtime infrastructure for multi-agent applications. It does not replace frameworks such as LangGraph, AutoGen or CrewAI. Instead, it gives them a consistent execution model: agents are invoked as runs, runs produce ordered steps and messages, tool calls are recorded, and every state change can be streamed to a client.
The project is designed for teams that want to move from an agent prototype to an inspectable service without committing to a single orchestration framework or rebuilding persistence, event streaming, and operational tooling for each new agent.
Agent frameworks are usually optimized for local composition: prompts, tools, graphs, roles and model calls. Production systems need additional runtime concerns that sit outside the framework itself:
Hivemind focuses on that runtime boundary. The stack pairs a Java/Spring Boot API for HTTP and SSE with Python workers for adapter execution, SQLAlchemy and Alembic for persistence, and Redis for job queues and live events.
Run, Step, Message, ToolCall and
Checkpoint are first-class database entities. They provide a common
observability surface across different orchestration engines.run.completed, run.failed,
run.cancelled, run.waiting_human) are pushed to configured URLs with
retries, HMAC-signed when a secret is configured, for integrations that
cannot hold an SSE stream.uv, Next.js and TypeScript.The HTTP layer that the frontend talks to is a Java/Spring Boot service in
backend-java/. Agent orchestration runs in Python worker
processes in backend/ that consume a Redis-backed job queue and
drive adapters (LangGraph, Echo, ...) to completion.
The API supports tenant-scoped RBAC through API keys and OIDC Bearer tokens.
For identity-provider setup, tenant claim requirements, and group-to-role
mapping, see docs/oidc.md.
┌───────────────────┐ REST ┌──────────────────────┐
│ Next.js console │ ──────▶ │ Java/Spring Boot API│
│ (app/runs/...) │ ◀─SSE── │ /v1/* + SSE bridge │
└───────────────────┘ └──────────┬───────────┘
│ jobs / cancel / events (Redis)
▼
┌──────────────────────┐
│ Python worker (uv) │
│ app.worker.runner │
└──────────┬───────────┘
▼
┌──────────────────────┐
│ Orchestrator adapter │
│ (LangGraph, Echo...)│
└──────────┬───────────┘
▼
┌──────────────────────┐
│ Postgres (state) │
└──────────────────────┘
See:
/v1 HTTP contract
and the API↔worker Redis protocol.Requirements: Docker, uv, Node.js 20+,
JDK 21 and Maven 3.9+.
# Infrastructure
docker compose up -d postgres redis
# Database schema
cd backend && uv sync && uv run alembic upgrade head
# Worker (separate shell)
AGENTFLOW_WORKER_MODE=queue uv run python -m app.worker
# Java API (separate shell)
cd ../backend-java && mvn spring-boot:run
# Frontend (separate shell)
cd ../frontend && npm install && npm run dev
Or via Docker Compose:
cd backend && uv sync && uv run alembic upgrade head
docker compose --profile app up --build
Open http://localhost:3000. The default echo adapter runs locally and does
not require a model provider key.
Create an agent:
curl -X POST http://localhost:8000/v1/agents \
-H "content-type: application/json" \
-d '{
"name": "writer",
"adapter": "langgraph",
"config": {
"model": "openai/gpt-4o-mini",
"system_prompt": "You are a concise technical writer."
}
}'
Start a run:
curl -X POST http://localhost:8000/v1/runs \
-H "content-type: application/json" \
-d '{"agent_id": "<id from previous response>", "input": {"prompt": "Explain SSE in two sentences."}}'
Subscribe to the run event stream:
curl -N http://localhost:8000/v1/events/<run_id>
agentflow/
├── backend/ Python runtime: adapters, worker, Alembic schema
│ ├── app/
│ │ ├── adapters/ orchestrator adapters
│ │ ├── core/ configuration and logging
│ │ ├── db/ SQLAlchemy session and base
│ │ ├── events/ in-memory and Redis event bus
│ │ ├── models/ ORM models
│ │ ├── schemas/ Pydantic schemas (shared shapes)
│ │ ├── services/ run lifecycle helpers
│ │ └── worker/ queue, cancel registry, worker loop
│ ├── alembic/ database schema (source of truth)
│ └── tests/
├── backend-java/ Spring Boot API server (frontend-facing)
│ └── src/main/java/io/agentflow/api/
│ ├── controller/ /v1 REST + SSE controllers
│ ├── dto/ wire-format DTOs (snake_case)
│ ├── entity/ JPA entities
│ ├── jobs/ Redis job producer + cancel signal
│ ├── repository/ Spring Data JPA repositories
│ └── service/ agent / run / event services
├── frontend/ Next.js admin console
├── docs/ architecture, deployment, API contract
└── docker-compose.yml profiles: default (infra), `app` (API + worker)
Adapters implement a single async method. The runtime passes an
AdapterContext; the adapter emits lifecycle events through the context and
returns an AdapterResult when execution reaches a terminal state.
from app.adapters.base import AdapterContext, AdapterResult, OrchestratorAdapter
from app.models.run import RunStatus
class MyAdapter(OrchestratorAdapter):
async def run(self, ctx: AdapterContext) -> AdapterResult:
await ctx.emit_step_started(index=0, node="think")
await ctx.emit_message(role="assistant", content="hello")
await ctx.emit_step_completed(index=0, node="think")
return AdapterResult(status=RunStatus.SUCCEEDED, output={"ok": True})
Register the adapter in app/adapters/__init__.py. Workers pick it up
automatically; the API, persistence model, event stream and console stay on
the shared runtime contract.
Official adapters can also ship as entry-point plugins. The PydanticAI package
in integrations/pydantic-ai loads an existing
PydanticAI Agent through a trusted factory and maps its streamed text, output,
model usage, and native tool/MCP events onto the same contract without adding
PydanticAI to the core backend dependency set.
Hivemind is a split runtime: a Java API tier, a Python execution tier, and shared infrastructure.
| Layer | Stack | Responsibility |
|---|---|---|
| Console | Next.js 15, React Query, SSE | Run/agent management, live event stream |
| API | Java 21, Spring Boot 3, JPA | REST /v1/*, SSE bridge, job enqueue, cancel |
| Worker | Python asyncio, RunExecutor | Consume Redis jobs, run adapters, write Postgres |
| Adapters | LangGraph, Echo, MCP (+ registry) | Framework-specific orchestration behind one interface |
| State | Postgres 16, Alembic | Durable runs, steps, messages, tool calls, checkpoints |
| Messaging | Redis Streams + pub/sub | At-least-once job queue, cancel keys, live events |
Data flow: POST /v1/runs → API writes pending row → Redis job → worker
runs adapter → rows + events → SSE to console. Postgres is the source of truth;
Redis is ephemeral coordination only.
See docs/architecture.md, docs/deployment.md and docs/api-contract.md for the full contract and API↔worker protocol.
Apache 2.0.