bbi-bucky
Pluggable AI chatbot framework for enterprise applications. Drop a YAML config and three lines of Python to add an AI assistant to any FastAPI app.
Automatic integration
Install the scanner extra, then run bbi-bucky init --project-dir . followed by
bbi-bucky scan --project-dir .. The scanner wires supported FastAPI routes and
installs a self-contained browser widget. For Next.js App Router it updates the
root layout; for frontends with a shared index.html it adds the embed there.
The embed uses the current origin by default, and the Next.js adapter detects
catch-all API proxies and required custom request headers. Re-running scan
refreshes an outdated widget asset without requiring --force.
The default widget follows the BBI client palette from the Migration Workbench:
navy #003d59, orange #fe6625, and white surfaces. Applications can pass a
custom theme when initializing the widget. Existing application chat panels
are left intact; the scanner provides a global floating widget when it cannot
safely connect to a panel's internal state.
The widget sends the current page title, path, headings, and selected navigation
with each question. The LLM generates every chat reply, including greetings and
"where am I?" answers.
An application can publish deployment steps, selected records, or other
application state with BbiBucky.publishPageContext() in the embed or a
contextExtractor in the React component; the
generic widget cannot infer that state from a page title. It does not capture a
full screenshot or form values.
Retrieval is selective: greetings and current-page questions with page context skip ChromaDB; knowledge questions retrieve up to three short passages. The generated FastAPI route caches repeated retrievals and streams a context progress event before retrieval starts. Bucky's core pipeline is custom Python and does not require LangChain or LangGraph.
Install
# Core only (config, contracts, agent pipeline)
pip install bbi-bucky
# With AWS Bedrock (Claude)
pip install bbi-bucky[bedrock]
# With Snowflake Cortex
pip install bbi-bucky[cortex]
# With FastAPI router factory
pip install bbi-bucky[api]
# With RAG (ChromaDB)
pip install bbi-bucky[chromadb]
# YAML config loading
pip install bbi-bucky[yaml] # PyYAML
pip install bbi-bucky[ruamel] # ruamel.yaml
# Everything
pip install bbi-bucky[all]
Quick start
1. Create a config file (bucky.yaml):
app_name: "My App Assistant"
llm:
provider: "bedrock"
model: "us.anthropic.claude-sonnet-4-5-20250929-v1:0"
temperature: 0.7
max_tokens: 4096
aws_region: "us-east-1"
agent:
max_history: 10
system_prompt_override: |
You are a helpful assistant for My App.
2. Wire it up (3 lines):
from bbi_bucky import create_chat_router, load_config
config = load_config(yaml_path="bucky.yaml")
app.include_router(create_chat_router(config=config))
This gives you /api/bucky/chat, /api/bucky/chat/stream (SSE), and /api/bucky/health out of the box.
3. Or use the LLM service directly:
from bbi_bucky import load_config
from bbi_bucky.llm.unified import UnifiedLLMService
config = load_config(yaml_path="bucky.yaml")
llm = UnifiedLLMService(config.llm)
# Non-streaming
response = await llm.invoke("What is Kubernetes?", system_prompt="Be concise.")
# Streaming
async for chunk in llm.stream("Explain microservices"):
print(chunk, end="")
Configuration
All config is loaded from YAML, with environment variable overrides and code overrides layered on top.
config = load_config(
yaml_path="bucky.yaml", # YAML file (optional)
env_prefix="BBI_BUCKY_", # Env var prefix (e.g. BBI_BUCKY_LLM_PROVIDER=cortex)
overrides={"llm": {"model": "llama3.1-70b"}}, # Code overrides (highest priority)
)
Priority: YAML < environment variables < code overrides.
LLM Providers
AWS Bedrock (Claude)
pip install bbi-bucky[bedrock]
Uses the Bedrock Converse API. Supports streaming. Credentials from environment or explicit config.
Snowflake Cortex
pip install bbi-bucky[cortex]
REST API with SSE streaming. SPCS-compatible (auto-detects /snowflake/session/token).
Custom providers
from bbi_bucky.llm.factory import LLMFactory
LLMFactory.register("my_provider", MyCustomProvider)
Your provider just needs generate() and stream() methods matching the LLMProvider protocol.
Features
- Zero-config defaults: Only
pydanticis required. Everything else is optional. - YAML + env var config: Single source of truth, overridable per-environment.
- Multiple LLM providers: Bedrock and Cortex built-in, custom providers via
register(). - SSE streaming: Named events (
response.text.delta,activity.started, etc.). - Agent pipeline: Intent classification, context gathering, RAG retrieval, response generation.
- RAG support: ChromaDB backend included, or bring your own via
IRAGService. - Conversation memory: In-memory by default, extensible via
IConversationMemory. - API contracts:
ApiResponseEnvelopeon all endpoints (RFC 9457 errors). - Router factory:
create_chat_router()gives you a full FastAPI router in one call.
Requirements
- Python 3.11+
pydantic >= 2.0(only hard dependency)
License
MIT
Metadata
Release files for bbi-bucky 1.2.2
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 |
|---|---|---|---|---|
| bbi_bucky-1.2.2.tar.gz | 133.2 kB | Without provenance | Details for bbi_bucky-1.2.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| bbi_bucky-1.2.2-py3-none-any.whl | Python 3 | none | any | Details for bbi_bucky-1.2.2-py3-none-any.whl |
Total release size: 276.9 kB
Release files / bbi_bucky-1.2.2.tar.gz
| Download URL | bbi_bucky-1.2.2.tar.gz |
|---|---|
| Size | 133.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7eef8288ed54d6183ac3e8eb5cd505960c8be4b8250b20782484a5326ee8f78a
|
|
BLAKE2b-256 checksum How to use checksums |
8a490fec670374ef7366459f679237a6b41bbc066c41f5fa9045d48cc814ce76
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.5
|
Release files / bbi_bucky-1.2.2-py3-none-any.whl
| Download URL | bbi_bucky-1.2.2-py3-none-any.whl |
|---|---|
| Size | 143.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
000bccff36a27ad95e550310b6b8d4a0ffddc87157803a75108d94343ce38683
|
|
BLAKE2b-256 checksum How to use checksums |
25ab3b91762dbc7ac5b9bbae0c59276175ef551ab9cdf20f4a326e046107b792
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.5
|
Security for bbi-bucky 1.2.2
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.