Skip to main content

Graph-native multi-agent fleet for Python. BYO-key. Local-first.

Project description

bottensor-fleet

Graph-native multi-agent orchestration for Python. BYO-key. Local-first. Ships with a UI.

PyPI Python License: MIT


Demo

bottensor-fleet demo


Install

pip install bottensor-fleet

30-second quickstart

from fleet import Graph, Agent

researcher = Agent(
    name="researcher",
    goal="Answer the user's question with citations.",
    model="anthropic/claude-sonnet-4-6",
    tools=["web_search", "web_fetch"],
)

g = (
    Graph("solo")
    .add_node("researcher", researcher.step)
    .set_entry("researcher")
    .set_exit("researcher")
    .compile()
)

import asyncio
from fleet.core.state import GraphState

state = GraphState(goal="What's new in AI safety research this week?")
final = asyncio.run(g.run(state))
print(final.messages[-1].content)
ANTHROPIC_API_KEY=sk-ant-… python examples/solo_agent.py

UI

fleet ui

Opens http://localhost:5173. Live graph visualization, agent log, and run controls — all wired to the local WebSocket server.

bottensor-fleet UI screenshot


Architecture

┌─────────────────────────────────────────────────────────┐
│  Graph (fluent builder)                                 │
│    .add_node()  .add_edge(cond=...)  .compile()         │
└──────────────────────┬──────────────────────────────────┘
                       │
                       ▼
┌─────────────────────────────────────────────────────────┐
│  Scheduler                                              │
│    BFS walk · asyncio.gather fan-out · state merge      │
│    EventBus pub/sub · per-step checkpoint               │
└──────┬───────────────────────────────┬──────────────────┘
       │                               │
       ▼                               ▼
┌────────────┐               ┌─────────────────────┐
│ Checkpoint │               │  FastAPI + WS       │
│ SQLite /   │               │  /api/runs CRUD     │
│ Redis      │               │  /ws/runs/{id}      │
└────────────┘               └──────────┬──────────┘
                                        │
                                        ▼
                             ┌─────────────────────┐
                             │  React UI           │
                             │  Zustand · ReactFlow│
                             │  Tailwind v4        │
                             └─────────────────────┘

Each node in the graph is a plain async def (GraphState) -> GraphState. Bring your own agents, or use the built-in Agent class for a full ReAct loop.


Provider support

Provider Model prefix Key env var
Anthropic anthropic/ ANTHROPIC_API_KEY
OpenAI openai/ OPENAI_API_KEY
Google Gemini google/ GEMINI_API_KEY
Groq groq/ GROQ_API_KEY
Mistral mistral/ MISTRAL_API_KEY
Ollama (local) ollama/ (none needed)

Backends are powered by polyrt. Mix providers freely — each Agent picks its own model.


Multi-agent patterns

Parallel fan-out

g = (
    Graph("team")
    .add_node("planner",  planner.step)
    .add_node("worker_a", worker_a.step)
    .add_node("worker_b", worker_b.step)
    .add_node("writer",   writer.step)
    .add_edge("planner",  "worker_a")
    .add_edge("planner",  "worker_b")   # fan-out
    .add_edge("worker_a", "writer")
    .add_edge("worker_b", "writer")     # merge
    .set_entry("planner")
    .set_exit("writer")
    .compile()
)

worker_a and worker_b execute concurrently via asyncio.gather.

Conditional cycles

def _needs_fix(s): return not s.scratchpad.get("approved")

g = (
    Graph("review")
    .add_node("reviewer", review_step)
    .add_node("fixer",    fix_step)
    .add_edge("reviewer", "fixer",    cond=_needs_fix)
    .add_edge("fixer",    "reviewer")  # loop
    .set_entry("reviewer")
    .set_exit("reviewer")
    .compile()
)

How it compares

Feature bottensor-fleet LangGraph CrewAI AutoGen
Graph-native ❌ role-based ❌ conversation-first
No framework lock-in ✅ plain Python ⚠️ LangChain ⚠️ CrewAI patterns ⚠️ AutoGen patterns
Multi-provider ✅ polyrt
Built-in UI ✅ React dashboard
Checkpointing ✅ SQLite / Redis
Parallel fan-out ✅ asyncio.gather ⚠️ partial
Conditional cycles ✅ edge cond=

Built-in tools

Tool Description
web_search DuckDuckGo text search
web_fetch Fetch a URL, return plain text
python_exec Execute Python in a subprocess
read_file Read from FLEET_WORKSPACE
write_file Write to FLEET_WORKSPACE
list_files List files under FLEET_WORKSPACE

Custom tools: decorate any async def with @tool.


CLI

fleet new <name>          scaffold a new graph project
fleet run <module> <goal> run a graph from the command line
fleet ui                  start the live dashboard
fleet add-agent <name>    scaffold an agent module
fleet ls                  list all recorded runs
fleet replay <run-id>     replay a finished run's events

⚠️ Security note

python_exec runs code in an unsandboxed subprocess in v0.1. Only use it with trusted agents and goals. A Docker sandbox is on the v0.2 roadmap.


Roadmap

Version Focus
v0.1 (now) Core runtime, ReAct agents, FastAPI server, React UI
v0.2 Docker sandbox for python_exec, streaming token output
v0.3 Distributed scheduler (Redis task queue), multi-process workers
v0.4 Persistent vector memory (ChromaDB / pgvector), skill marketplace

License

MIT © 2026 Bottensor. See LICENSE.

Built with polyrt · ReactFlow · Zustand · Tailwind CSS · FastAPI

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

bottensor_fleet-0.1.1.tar.gz (182.0 kB view details)

Uploaded Source

Built Distribution

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

bottensor_fleet-0.1.1-py3-none-any.whl (149.7 kB view details)

Uploaded Python 3

File details

Details for the file bottensor_fleet-0.1.1.tar.gz.

File metadata

  • Download URL: bottensor_fleet-0.1.1.tar.gz
  • Upload date:
  • Size: 182.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.9 {"installer":{"name":"uv","version":"0.11.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for bottensor_fleet-0.1.1.tar.gz
Algorithm Hash digest
SHA256 07ff1a399d0167aefc49b1e22286091935ee1944f7be358657ed4148519ce04c
MD5 9d0dd6b707b70350e022a5a7c1a8e60e
BLAKE2b-256 0dea19138f4a275d86d55d3eef9e4aab44d891d0647f8177825c7c4914827bd3

See more details on using hashes here.

File details

Details for the file bottensor_fleet-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: bottensor_fleet-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 149.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.9 {"installer":{"name":"uv","version":"0.11.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for bottensor_fleet-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 de5ce0ea63aba7bf1f28adec2f8269c3e69eb3fad18aaaab73d7e9e78a64b351
MD5 c78bd8cee9ad5c605e859af74f26a8bc
BLAKE2b-256 50d73da766af54a180c265c3cbdd209e79ea222a9d3add9159bb0f907b72aca7

See more details on using hashes here.

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