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.0.tar.gz (230.1 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.0-py3-none-any.whl (31.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: bottensor_fleet-0.1.0.tar.gz
  • Upload date:
  • Size: 230.1 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.0.tar.gz
Algorithm Hash digest
SHA256 8099f58451765686422492a38039218f1412656951b85721280d2dbcaa42eae9
MD5 77ebbb3e44c982e2f933e2076b47e1c4
BLAKE2b-256 601cf357497005bdc7aa79d72f3b6e3bac4628253634240b378a7d4ec8f76ad5

See more details on using hashes here.

File details

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

File metadata

  • Download URL: bottensor_fleet-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 31.3 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 64ebb7ed8c024260cc4ae8367370e1fd7aca71ba7f3bff783d08510b29ea902f
MD5 fb6c5bb5923af6d6155c7a406c1c9729
BLAKE2b-256 14eb3f5e139b944191696f59e6edaeb1d7c5f98a85dc5003ad58237527d490e3

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