This release is a pre-release and may not be stable for production use.
ByteBuddhi
ByteBuddhi is an AI coding and agent platform. The CLI and terminal interface talk to one gateway. The gateway is the existing FastAPI application. Application use cases stay authoritative.
Textual TUI / CLI
↓
GatewayClient
↓
FastAPI
↓
Run protocol
↓
AgentRuntime
PostgreSQL is the durable source of truth for runs and events. Redis fans live notifications out to gateway workers. A WebSocket delivers those events to the client. Disconnecting the socket does not cancel the run. POST /api/v1/runs/{run_id}/cancel does.
Phase 1 established the gateway transport. Phase 2 makes POST /api/v1/runs return 202 with queued and streams the run. It does not add a second agent runtime.
CLI / TUI / VS Code
↓
ByteBuddhi Gateway
↓
FastAPI
↓
Application use cases
↓
AgentRuntime
↓
Models / Tools / Memory / MCP / DB
bytebuddhi run --embedded still calls ExecuteTaskUseCase in-process. That mode is explicit. A gateway failure does not fall back to it.
The runtime does not change when you pick a different model. Provider credentials enable adapters; they do not redefine the architecture.
Architecture
CLI / VS Code
↓
GatewayClient or HTTP
↓
FastAPI
↓
ExecuteTaskUseCase
↓
ExecutionContext
↓
AgentRuntime / MultiAgentOrchestrator
↓
ModelGateway (catalog + routing)
↓
Provider adapters (OpenAI, Anthropic, OpenAI-compatible, …)
↓
ToolExecutor → Memory, Artifacts, Process, Web, MCP, Connectors
Capabilities
- Single-agent loop and bounded multi-agent delegation
- Workspace-scoped filesystem and command tools
- Memory (working SQLite + durable PostgreSQL) and artifacts
- Code intelligence (Tree-sitter)
- Connectors and MCP behind the same tool policy
- Web research with SSRF controls
- OpenTelemetry traces/metrics with redaction
- JWT API (password, Google, GitHub). The gateway is the authority for CLI identity.
--embeddedcan still use a local principal.
Installation
One-Command CLI Install
macOS / Linux (bash/zsh):
curl -fsSL https://github.com/Navin45/bytebuddhi/releases/latest/download/install.sh | bash
Windows (PowerShell):
irm https://github.com/Navin45/bytebuddhi/releases/latest/download/install.ps1 | iex
Desktop App
Download installers from GitHub Releases:
- Windows:
ByteBuddhi-Setup-<version>.exe - macOS:
ByteBuddhi-<version>-arm64.dmg/ByteBuddhi-<version>-x64.dmg - Linux:
ByteBuddhi-<version>-x64.AppImage/.deb
Run
bytebuddhi
Launch the terminal UI:
bytebuddhi tui
Check for updates:
bytebuddhi update --check
Developer Setup (From Source)
git clone https://github.com/Navin45/bytebuddhi.git
cd bytebuddhi
uv sync
cp .env.example .env
Requires Python 3.13+, PostgreSQL 16+ with pgvector, and Redis when distributed cancellation is enabled.
Configuration
.env is for local development only. Production injects the same variables from a secret manager. See .env.example.
Authoritative settings live in app/infrastructure/config/settings.py (Settings). API, CLI, and Docker read that model.
Model selection
DEFAULT_MODEL_PROVIDER=openai
DEFAULT_MODEL_NAME=gpt-4-turbo-preview
OPENAI_API_KEY=...
DEFAULT_MODEL_* is only the default. Users may select any enabled and available catalog model without restarting:
GET /api/v1/modelsPOST /api/v1/chat/conversations/{id}/messageswith{ "model": { "provider", "model" } }bytebuddhi run --provider openai --model …- VS Code: ByteBuddhi: Select Model
Credentials stay server-side. There is no user BYOK. Custom OpenAI-compatible URLs are operator-configured only. See Model gateway.
You do not need every provider key. Enable only the providers you run.
Running locally
docker compose up -d redis
uv run alembic upgrade head
uv run uvicorn app.interfaces.api.main:app --host 127.0.0.1 --port 8000 --reload
- API:
http://127.0.0.1:8000/api/v1 - OpenAPI (debug):
http://127.0.0.1:8000/api/docs - Liveness:
GET /api/v1/health/live - Readiness:
GET /api/v1/health/ready
Docker / production
docker build -t bytebuddhi:local .
POSTGRES_PASSWORD=... JWT_SECRET_KEY=... OPENAI_API_KEY=... \
docker compose -f docker-compose.prod.yml up --build
docker-compose.yml is development (--reload). docker-compose.prod.yml is the production-shaped API + PostgreSQL + Redis stack. Browser rendering stays off unless isolated. Full operator contract: Production.
CLI
uv run bytebuddhi --help
uv run bytebuddhi --version
uv run bytebuddhi gateway start
uv run bytebuddhi login --provider google
uv run bytebuddhi models
uv run bytebuddhi run "Explain this repository"
Normal CLI commands call the gateway with Authorization: Bearer. bytebuddhi run creates a run (202) and prints events as they arrive. --json prints one JSON object per line. The local gateway listens on 127.0.0.1:8765 unless you set BYTEBUDDHI_GATEWAY_HOST / BYTEBUDDHI_GATEWAY_PORT or pass --host / --port. bytebuddhi serve runs that same FastAPI app in the foreground. Production Gunicorn is unchanged.
bytebuddhi run --embedded is the in-process path. See CLI.
Terminal interface
uv run bytebuddhi tui
bytebuddhi tui is another gateway client. It uses the same URL resolution, local gateway startup, credentials, and GatewayClient as the CLI. It does not execute agents, and it does not read PostgreSQL or Redis.
A local URL starts the managed gateway when it is not already running. BYTEBUDDHI_GATEWAY_URL=https://... connects to that remote gateway and does not start a local process. There is no embedded TUI mode. A missing credential tells you to run bytebuddhi login.
Enter sends one run. Shift+Enter inserts a newline. Esc requests cancellation and the transcript waits for run_cancelled. Closing the TUI disconnects the client and leaves the run running on the gateway. A dropped WebSocket reconnects to the same run id, replays from the last sequence, and does not create a second run. run_interrupted is shown as INTERRUPTED.
Desktop
cd desktop
pnpm install
pnpm dev
The Electron app is a third client of the same gateway. It does not embed AgentRuntime. See Desktop.
VS Code
cd vscode-extension
npm install
npm run compile
npm test
npm run package
Sign in with JWT. Select models from the backend catalog. See VS Code.
Security
- Trusted identity is never taken from prompts, tool args, or web content
- Workspace containment, command policy, and HIGH-risk approval provenance
- SSRF controls for web fetch/render
- No secrets in catalog responses, events, or default logs
- Production fail-closed JWT, CORS, workspace mode, and Playwright isolation
Development and testing
uv run ruff check .
uv run ruff format --check .
uv run mypy app/
uv run pytest tests/ -v
cd vscode-extension && npm run compile && npm run lint && npm test
Live LLM smoke tests are opt-in (LIVE_LLM_PROVIDER + provider key) and are not required for the default suite. CI stores live credentials as GitHub environment secrets and does not run that job on fork pull requests.
Limitations
Documented in Production and CLI. Notably: process-local rate limits, local/PV artifacts (not object storage), Playwright off unless isolated, no silent model failover. Run admission is global when Redis is available. A dead worker's run becomes interrupted and is not replayed. The CLI gateway client does not honor ambient HTTP(S)_PROXY, so bearer tokens are not forwarded to an implicit proxy. Closing a client does not cancel a run.
Documentation
License
MIT. See LICENSE.
Metadata
Release files for bytebuddhi 0.1.4rc1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| bytebuddhi-0.1.4rc1.tar.gz | 333.8 kB | Without provenance | Details for bytebuddhi-0.1.4rc1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| bytebuddhi-0.1.4rc1-py3-none-any.whl | Python 3 | none | any | Details for bytebuddhi-0.1.4rc1-py3-none-any.whl |
Total release size: 785.4 kB
Release files / bytebuddhi-0.1.4rc1.tar.gz
| Download URL | bytebuddhi-0.1.4rc1.tar.gz |
|---|---|
| Size | 333.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7263fafcc86754a975f2d67dfdd5e99cc4708f876aef81a2a355f0e21bc9eae1
|
|
BLAKE2b-256 checksum How to use checksums |
26777a6b6824eba16ca5be1bd6e8d189373c202773953f67cf04d9b71fc7731f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / bytebuddhi-0.1.4rc1-py3-none-any.whl
| Download URL | bytebuddhi-0.1.4rc1-py3-none-any.whl |
|---|---|
| Size | 451.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f96079a79d73e0f8e151e605c0e59dc4da82db6d75a9469e7cb102cb03eeaf63
|
|
BLAKE2b-256 checksum How to use checksums |
5596f032aa8a65d822a15b9de0c40ca9cec434cabdc2b7a009c814cbbc881451
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Security for bytebuddhi 0.1.4rc1
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.