Metadata-Version: 2.4
Name: secondbrain-os
Version: 0.5.1
Summary: Local-first agent runtime and SDK for grounded retrieval, durable memory, governed tools, and auditable agent workflows.
Author: ContextOS
License-Expression: MIT
Project-URL: Homepage, https://sb.chat/
Project-URL: Documentation, https://sb.chat/
Project-URL: Quickstart, https://sb.chat/tutorials/quickstart/
Project-URL: Memory API, https://sb.chat/reference/memory-api/
Keywords: agents,agent-sdk,memory,rag,retrieval,llm,mcp,knowledge-management,local-first,grounded-ai
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
Classifier: Typing :: Typed
Requires-Python: <3.14,>=3.12
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: typer>=0.25.1
Requires-Dist: rich>=15.0.0
Requires-Dist: pydantic>=2.13.4
Requires-Dist: pydantic-settings>=2.14.1
Requires-Dist: python-dotenv>=1.2.2
Requires-Dist: pyyaml>=6.0.3
Requires-Dist: jinja2>=3.1.6
Requires-Dist: fastapi>=0.136.1
Requires-Dist: uvicorn>=0.46.0
Requires-Dist: apscheduler>=3.11.2
Requires-Dist: pypdf>=6.11.0
Requires-Dist: python-frontmatter>=1.1.0
Requires-Dist: beautifulsoup4>=4.14.3
Requires-Dist: lxml>=6.1.0
Requires-Dist: networkx>=3.4.2
Requires-Dist: numpy>=2.4.4
Requires-Dist: prompt-toolkit>=3.0.52
Requires-Dist: openai>=2.36.0
Requires-Dist: opentelemetry-sdk<1.43.0,>=1.38.0
Requires-Dist: opentelemetry-exporter-otlp-proto-http<1.43.0,>=1.38.0
Requires-Dist: openinference-semantic-conventions>=0.1.29
Requires-Dist: keyring>=25.7.0
Requires-Dist: mcp>=1.27.1
Requires-Dist: claude-agent-sdk>=0.1.80
Requires-Dist: prometheus-client>=0.25.0
Requires-Dist: prometheus-fastapi-instrumentator>=7.1.0
Requires-Dist: python-json-logger>=4.1.0
Provides-Extra: local
Requires-Dist: lancedb>=0.30.2; extra == "local"
Requires-Dist: pyarrow>=24.0.0; extra == "local"
Requires-Dist: sentence-transformers>=5.4.1; extra == "local"
Provides-Extra: chroma
Requires-Dist: chromadb>=1.5.9; extra == "chroma"
Provides-Extra: vec-lite
Requires-Dist: sqlite-vec>=0.1.9; extra == "vec-lite"
Provides-Extra: vec-qdrant
Requires-Dist: qdrant-client>=1.17.1; extra == "vec-qdrant"
Provides-Extra: documents
Requires-Dist: python-pptx>=1.0.2; extra == "documents"
Requires-Dist: python-docx>=1.2.0; extra == "documents"
Requires-Dist: ebooklib>=0.20; extra == "documents"
Requires-Dist: openpyxl>=3.1.5; extra == "documents"
Provides-Extra: adk
Requires-Dist: google-adk>=1.33.0; extra == "adk"
Requires-Dist: google-genai>=1.75.0; extra == "adk"
Provides-Extra: ollama
Requires-Dist: ollama>=0.6.2; extra == "ollama"
Provides-Extra: telegram
Requires-Dist: python-telegram-bot>=22.7; extra == "telegram"
Provides-Extra: voice
Requires-Dist: sounddevice>=0.5.5; extra == "voice"
Provides-Extra: voice-plus
Requires-Dist: webrtcvad-wheels>=2.0.14; extra == "voice-plus"
Requires-Dist: simpleaudio>=1.0.4; extra == "voice-plus"
Requires-Dist: elevenlabs>=2.46.0; extra == "voice-plus"
Provides-Extra: capture
Requires-Dist: sounddevice>=0.5.5; extra == "capture"
Requires-Dist: mlx-whisper>=0.4.3; extra == "capture"
Requires-Dist: numpy>=2.4.4; extra == "capture"
Provides-Extra: reranker
Requires-Dist: sentence-transformers>=5.4.1; extra == "reranker"
Provides-Extra: sandbox
Requires-Dist: docker>=7.1.0; extra == "sandbox"
Provides-Extra: sandbox-e2b
Requires-Dist: e2b-code-interpreter>=2.6.2; extra == "sandbox-e2b"
Provides-Extra: connectors
Requires-Dist: notion-client>=3.0.0; extra == "connectors"
Requires-Dist: httpx>=0.28.1; extra == "connectors"
Provides-Extra: google
Requires-Dist: google-auth>=2.52.0; extra == "google"
Requires-Dist: google-auth-oauthlib>=1.4.0; extra == "google"
Requires-Dist: google-auth-httplib2>=0.4.0; extra == "google"
Requires-Dist: google-api-python-client>=2.196.0; extra == "google"
Provides-Extra: slack
Requires-Dist: slack-sdk>=3.41.0; extra == "slack"
Provides-Extra: all
Requires-Dist: secondbrain-os[adk,capture,chroma,connectors,documents,google,local,ollama,reranker,sandbox,sandbox_e2b,slack,telegram,vec_lite,vec_qdrant,voice,voice_plus]; extra == "all"
Provides-Extra: dev
Requires-Dist: pytest>=9.0.3; extra == "dev"
Requires-Dist: pytest-asyncio>=1.3.0; extra == "dev"
Requires-Dist: pytest-cov>=7.1.0; extra == "dev"
Requires-Dist: pytest-xdist>=3.8.0; extra == "dev"
Requires-Dist: pytest-timeout>=2.4.0; extra == "dev"
Requires-Dist: ruff>=0.15.12; extra == "dev"
Requires-Dist: setuptools>=82.0.1; extra == "dev"
Dynamic: license-file

# SecondBrain

SecondBrain is a local-first agent runtime and SDK for grounded retrieval,
durable memory, governed tools, and auditable agent workflows.

It is designed for builders who want a local runtime that can ingest private
material, retrieve it with citations, run governed tools, keep durable session
state, and expose the same memory surface through CLI, SDK, HTTP, and MCP.

## Install

SecondBrain supports Python 3.12 and 3.13.

```bash
pip install secondbrain-os
```

For the full local retrieval stack, including the default LanceDB backend and
bundled embedding/reranking dependencies:

```bash
pip install "secondbrain-os[local]"
```

For all optional providers, vector backends, parsers, integrations, and sandbox
extras:

```bash
pip install "secondbrain-os[all]"
```

## First Commands

```bash
sb --help
sb onboard --vault "$PWD/vault" --approval-mode safe --skip-knowledge --skip-index
sb ingest vault/
sb context index
sb ask "What changed this week?" --no-synthesize
```

Provider-backed synthesis is optional. The local retrieval path can return
citation-first answers before you configure external model credentials.

## Core Surfaces

- `sb`: local CLI for setup, ingest, retrieval, chat, workflows, governance,
  quality checks, and operator workflows.
- `brain.sdk`: Python facade for local and HTTP-backed integrations.
- Memory API v1: HTTP routes and MCP tools for recall, context packs, grounded
  answers, decisions, open loops, and audit-friendly citations.
- Runtime assets: packaged prompts, contracts, migrations, and static serve UI
  files needed after installation.

## Documentation

- [Documentation](https://sb.chat/)
- [Quickstart](https://sb.chat/tutorials/quickstart/)
- [Memory API](https://sb.chat/reference/memory-api/)
- [PyPI](https://pypi.org/project/secondbrain-os/)
