GraphBus is a multi-agent orchestration protocol where LLM-powered agents negotiate, refactor, and evolve your codebase — then run it statically at production speed.
from graphbus_core import GraphBusNode, schema_method, subscribe
class HelloService(GraphBusNode):
SYSTEM_PROMPT = "I generate friendly greeting messages."
@schema_method(
input_schema={},
output_schema={"message": str}
)
def generate_message(self):
return {"message": "Hello from GraphBus!"}
@subscribe("/Hello/MessageGenerated")
def on_message(self, event):
# Agents react to events on the bus
self.log(event.payload)
GraphBus separates the intelligence of building from the efficiency of running.
Your Python classes become LLM-powered agents. They analyze their own source code, negotiate with each other via the message bus, and collaboratively refactor the entire codebase — reaching consensus before committing any changes.
The built artifacts execute as pure, static Python. No LLM calls, no overhead — just fast deterministic execution. The message bus handles pub/sub routing; everything else is zero-cost.
Subclass GraphBusNode. Write your business logic. Add a system prompt. That's it — each class is now a first-class agent on the bus.
GraphBus scans your modules, builds a dependency graph with networkx, activates one LLM agent per class, and orchestrates a negotiation round. Agents propose improvements, vote, and commit changes to source.
The build emits clean JSON artifacts — graph, agents, topics, schemas. Runtime loads these and executes your (now-improved) code with zero AI overhead.
Your codebase improves with every build cycle. Agents negotiate schema contracts, refactor for coherence, and adapt to changing requirements — collaboratively.
Every agent is a node. Every dependency is an edge. The entire system is a live, traversable networkx DAG — built for topological reasoning.
Typed pub/sub messaging across agents. Topics, subscriptions, and event routing baked into the protocol — no external broker required.
Agents propose code changes, evaluate each other's proposals, and vote. An arbiter resolves conflicts. Consensus drives commits.
Method-level input/output schemas define the contract between agents. The build validates every edge in the graph before emitting artifacts.
16 production-grade CLI commands. An interactive TUI for build, runtime, deploy, and profiling — keyboard-driven, no mouse required.
Built-in Docker, Kubernetes, and CI/CD tooling. Generate Dockerfiles, K8s manifests, GitHub Actions — from the CLI in seconds.
Prometheus metrics, real-time dashboards, event timelines, and health monitoring. Know exactly what your agents are doing.
100% passing tests on Runtime Core, CLI, and deployment tooling. pytest-native. Coverage reporting built in. Ship with confidence.
Other frameworks run agents. GraphBus makes agents collaboratively write and evolve the code itself.
| Capability | GraphBus | LangGraph | CrewAI | AutoGen |
|---|---|---|---|---|
| Agents rewrite source code | ✓ Yes | ✗ No | ✗ No | ⚬ Limited |
| Zero LLM cost at runtime | ✓ Always | ✗ Every call | ✗ Every call | ✗ Every call |
| Agent negotiation / consensus | ✓ Built-in | ✗ No | ⚬ Partial | ⚬ Partial |
| Graph-native DAG orchestration | ✓ networkx | ✓ Yes | ✗ No | ✗ No |
| Typed schema contracts per edge | ✓ Yes | ⚬ Partial | ✗ No | ✗ No |
| Build / Runtime mode separation | ✓ Core design | ✗ No | ✗ No | ✗ No |
| Pure Python, no vendor lock-in | ✓ Yes | ✓ Yes | ✓ Yes | ✓ Yes |
| Built-in K8s / Docker deploy | ✓ CLI native | ✗ No | ✗ No | ✗ No |
GraphBus defines how intelligent agents communicate, negotiate, and evolve — a lingua franca for agent-driven code orchestration.
pip install graphbus-core
graphbus init my-project --template microservices
cd my-project
graphbus build agents/
graphbus run .graphbus
export ANTHROPIC_API_KEY=sk-...
graphbus build agents/ --enable-agents
GraphBus is in alpha. We're onboarding early adopters who want to shape the protocol. Drop your email — we'll reach out when we're ready for you.