This release is a pre-release and may not be stable for production use.
Banyan 🌳
A trellis for your agents — the frame grows nothing, everything grows on it.
Like a banyan whose aerial roots become new trunks, one agent recursively grows its own support structure: a conversational main agent decomposes goals into a task tree, executor agents do the work, and every completed task feeds a knowledge loop for the next run.
pip install banyan-ai # PyPI (alpha)
Architecture: brain / brainstem
All LLM activity lives at the two ends — planning (main agent, heavy tier) and execution (executor agents, fast tier). Everything between is a deterministic zero-LLM kernel:
| Layer | What it is | Intelligence |
|---|---|---|
| L3 | Conversational main agent — decompose, write contracts, replan | GLM heavy |
| L2 | Kernel — dispatch rule table, leases with fencing tokens, budgets, depth caps, capability envelopes, failure classification, pre-dispatch reconciliation, machine verification | zero LLM |
| L1 | Executor agents — five-segment assembled context, tools = permissions | GLM fast |
| L0 | SQLite (tasks / events / leases / cards) + knowledge card store | — |
Design principles (full write-up in the design doc):
- DB is the only authority — everything rendered is a projection.
- The context window is a cache, not a home — cold-start assembly per unit.
- Every boundary is lossy — contracts + summaries + pointers cross edges, never raw transcripts.
- Determinism never touches an LLM — dispatch, leases, budgets, recovery are pure rules.
Quickstart
pip install "banyan-ai[dev]"
export BANYAN_LLM_API_KEY=<your-zhipu-api-key>
python -m banyan.cli chat "build a python package X with tests" # 1. main agent builds the tree
python -m banyan.cli status # 2. review the skeleton
python -m banyan.cli approve root # 3. pass the approval gate
python -m banyan.cli run --workers 2 # 4. kernel dispatches, agents execute
python -m banyan.cli consolidate transcript.txt # 5. nightly knowledge extraction
python -m banyan.cli status # inspect results
Progressive refinement is built in: only the first slice gets a full contract; deeper slices are stored as sketches and expanded just before execution against the then-current world state.
The knowledge loop
consolidate runs a fast-tier extraction over the day's transcripts and
completed tasks: candidate cards → schema gate → dedupe → contradiction
detection (CONTRADICTS edges, human adjudication) → publish. Retrieval
middleware injects a critical set + task-relevant cards into every executor
window. Cards earn their keep: consumers rate them used | stale | wrong at
commit time — wrong cards are quarantined immediately; repeatedly verified
cards enter the critical set.
Completed trees are mined into plan templates; the next similar goal matches them and the planner starts from experience instead of scratch.
Commands
| Command | Purpose |
|---|---|
chat <goal> |
Main agent builds the milestone tree (first milestone contracted, rest sketched) |
status |
Tree snapshot with per-node status and token burn |
approve <id> |
Pass a human approval gate |
run [--workers N] [--max-units M] |
Kernel dispatch loop (reconcile → rule table → lease → budget → execute) |
consolidate <transcripts.txt> |
Nightly-style knowledge extraction and publication |
Configuration
| Env var | Default | Purpose |
|---|---|---|
BANYAN_LLM_API_KEY |
— | Zhipu GLM API key (required) |
BANYAN_LLM_BASE_URL |
https://open.bigmodel.cn/api/coding/paas/v4 |
GLM Coding-plan endpoint (covers glm-5.3*) |
BANYAN_HEAVY_MODEL |
glm-5.3 |
Planning / main agent tier |
BANYAN_FAST_MODEL |
glm-5.3-flash |
Execution / extraction tier |
BANYAN_DB |
.banyan/banyan.db |
Kernel state database |
BANYAN_WORKSPACE |
. |
Executor working directory — point this at your target project, never the repo itself |
The default endpoint is the GLM Coding-plan endpoint. The general
api/paas/v4endpoint only servesglm-4.5-flashwithout a general balance (error 1113).
Status
0.1.0a1 — all mechanisms implemented and machine-verified: kernel tests,
parallel workers, background-task adjudication, knowledge extraction →
publication → retrieval, template mining. Known gaps: git-worktree workspace
isolation, escalation inbox CLI, multi-host coordination.
License
MIT
Release files for banyan-ai 0.1.0a1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| banyan_ai-0.1.0a1.tar.gz | 45.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| banyan_ai-0.1.0a1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 98.9 kB
Release files / banyan_ai-0.1.0a1.tar.gz
| Download URL | banyan_ai-0.1.0a1.tar.gz |
|---|---|
| Size | 45.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
32ad869af001a648c329f4499c89e31d7a7e3883ca52947c82b6a885e734f86a
|
|
BLAKE2b-256 checksum How to use checksums |
2e775e7a16d10eceefa8ca61b4ea07b29238e9f7487fdf8cd6d1ae0b9bdaf3d1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 25, 2026.
Transparency logRelease files / banyan_ai-0.1.0a1-py3-none-any.whl
| Download URL | banyan_ai-0.1.0a1-py3-none-any.whl |
|---|---|
| Size | 53.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c00e274a925f2a2f08f63910be13c7e9d1add2c09d7dfa61a5a7e0b58fefb21e
|
|
BLAKE2b-256 checksum How to use checksums |
94cf72a245b4915050c52513710baa7e87cf618d577baee06b46261e15b0f8bc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 25, 2026.
Transparency log