Skip to main content

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

Project description

bottensor-fleet

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

PyPI Python License

Why

Most multi-agent frameworks are heavy and locked to one ecosystem. LangGraph is tied to LangChain. CrewAI is opinionated about roles. AutoGen is conversation-first. bottensor-fleet is a small, graph-native runtime that runs anywhere Python runs, lets you bring your own provider key, and ships with a real UI in the wheel.

Install

pip install 'bottensor-fleet[search]'
export ANTHROPIC_API_KEY=sk-ant-...

Extras: [search] adds web tools, [redis] adds Redis checkpointing, [memory] adds ReasoningBank + MaTTS (SQLite-vec store + MiniLM embedder), [all] gets everything.

30-second example

import asyncio
from fleet import Agent, Graph
from fleet.core.state import GraphState
from fleet.providers.client import FleetLLM

llm = FleetLLM("anthropic", "claude-sonnet-4-6")
researcher = Agent(name="researcher", llm=llm, tools=["web_search", "web_fetch"])

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

state = asyncio.run(graph.run(GraphState(goal="What is ReasoningBank?")))
print(state.messages[-1].content)

UI

Export your provider key(s) in the same shell, then launch:

export ANTHROPIC_API_KEY=sk-ant-...   # and/or OPENAI_API_KEY
fleet ui

Opens a local dashboard at http://localhost:8765 with a node activity view, per-agent logs, and the Memory tab (browse / search / edit / export / import).

The UI never accepts API keys through forms — credentials are read from the environment of the fleet ui process. Restart fleet ui after changing an exported key.

CLI

Command What it does
fleet new <name> Scaffold a new graph
fleet run <graph.py> Run a graph from a file
fleet replay <run_id> Re-run a past graph from its saved source path
fleet examples [name] List bundled examples or extract one to the current directory
fleet ui Launch the local dashboard
fleet add-agent Append an agent to an existing graph
fleet ls List past runs
fleet --version Print version

Design

  • Graph-native: DAGs with conditional edges and bounded cycles, executed async with asyncio.gather for parallel fan-out.
  • BYO-key: Provider abstraction via polyrt. Anthropic and OpenAI in the default install; MLX, Ollama, and others via polyrt extras.
  • Checkpointed: Every run persists to SQLite (default) or Redis (opt-in via [redis] extra).
  • Tools and skills: @tool decorator auto-derives JSON schemas from type hints. @skill for higher-level capabilities. Web search and fetch built in via the [search] extra.
  • UI in the wheel: No separate Node install for users. The React + Vite frontend is bundled into the published wheel.

Memory & self-improving agents

Opt-in ReasoningBank (Ouyang et al., ICLR 2026) gives any agent a persistent, embedding-indexed memory of past trajectories. Retrieval prepends the top-k relevant memories before each run; an async writeback judges the trajectory and distills 1–3 generalizable lessons that integrate into the bank via merge / link / insert.

MaTTS (Memory-Aware Test-Time Scaling) runs the same task k times in parallel and contrast-distills higher-quality memories than any single rollout can produce — useful for bootstrapping a new scope or one-shot high-stakes tasks.

pip install 'bottensor-fleet[memory]'
from fleet import Agent, ReasoningBank
from fleet.providers.client import FleetLLM

llm  = FleetLLM("anthropic", "claude-sonnet-4-6")
bank = ReasoningBank(judge_llm=llm, induction_llm=llm, scope="research")

researcher = Agent(name="researcher", model="anthropic/claude-sonnet-4-6",
                   tools=["web_search"], memory_bank=bank, memory_k=5)

Two ready-to-run examples:

fleet examples learning_research_team    # planner + 2 researchers + writer, shared bank
fleet examples matts_solo                # single agent with MaTTS k=3

The dashboard's Memory tab (browse / search / edit / export / import) is wired to /api/memory*. See docs/memory.md for the full guide.

Comparison

bottensor-fleet LangGraph CrewAI AutoGen
Graph topology ✅ DAG + cycles ❌ role-based ❌ conversation
Provider-agnostic ✅ via polyrt ⚠️ via LangChain ⚠️ ⚠️
Ships with UI ⚠️ Studio (separate)
Pip-install size ~150 KB wheel heavy medium heavy
LangChain dependency ✅ required

Roadmap

  • v0.2 ✅ — ReasoningBank + parallel MaTTS shipped. See docs/memory.md.
  • v0.3 — Docker sandbox for python_exec, MLX embedder, polyrt-hosted embedder, sequential MaTTS, distributed scheduler.
  • v0.4 — Alternate vector backends (Redis / Postgres), cloud deploy templates.

Security

The python_exec tool is unsandboxed. Do not run untrusted graphs. A Docker sandbox is planned for v0.3.

License

Apache-2.0. © 2026 Rama Krishna Bachu.

Acknowledgements

Built on polyrt. ReasoningBank design (v0.2) follows Ouyang et al., ReasoningBank: Scaling Agent Self-Evolving with Reasoning Memory, ICLR 2026.

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.2.0.tar.gz (343.9 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.2.0-py3-none-any.whl (188.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: bottensor_fleet-0.2.0.tar.gz
  • Upload date:
  • Size: 343.9 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.2.0.tar.gz
Algorithm Hash digest
SHA256 0e4b86048aff372474af80b9e6edcbe887fba2be6e61b23f70f543083a021390
MD5 5cabb9f4b15e4c310796e4ff81e060a0
BLAKE2b-256 4cb10338c3438a69dda472a3976e6c35ff55add166f3de3084f7ddf47fdf5853

See more details on using hashes here.

File details

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

File metadata

  • Download URL: bottensor_fleet-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 188.1 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.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5fd8c3fc722f732c0eb4aeb05251c94acbcd0fc9f1b93dd267fb3f38f9f6e7f6
MD5 10c7861c939d451822142d7434bc1d48
BLAKE2b-256 702e90fb96aba79e34f4598405742f058f0001a53a749530ec552142065af751

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