stablebaseline
Python SDK for the Stable Baseline REST API — the simplest, most complete, end-to-end agent-managed company brain. Living docs, 40+ visual diagrams, plans, and a self-learning Knowledge Graph. 196 tools across 18 categories.
Install
pip install stablebaseline
Quick start
from stablebaseline import StableBaseline
# Mint a key at app.stablebaseline.io/settings/mcp-keys
with StableBaseline(api_key="sta_xxx") as sb:
orgs = sb.tools.listOrganisations()
print(orgs)
doc = sb.tools.createDocument(
folderId="folder-uuid",
title="Q4 architecture",
cdmd="# Architecture\n\nThis document covers...",
)
print(f"Created {doc['friendlyId']} ({doc['id']})")
search = sb.tools.kg_search(query="compliance posture", mode="global")
print(search["entities"])
Or asynchronously:
import asyncio
from stablebaseline import AsyncStableBaseline
async def main() -> None:
async with AsyncStableBaseline(api_key="sta_xxx") as sb:
orgs = await sb.tools.listOrganisations()
print(orgs)
asyncio.run(main())
Auth
StableBaseline(api_key="sta_...") # API key (mint at app.stablebaseline.io/settings/mcp-keys)
StableBaseline(access_token="...") # OAuth 2.1 access token
StableBaseline() # picks up SB_API_KEY / SB_ACCESS_TOKEN from env
Tool dispatch
Each method on client.tools corresponds to one of the 196 MCP tools:
sb.tools.listOrganisations()
sb.tools.getProjectHierarchy(projectId="...")
sb.tools.createDocument(folderId="...", title="X", cdmd="# ...")
sb.tools.editDocument(documentId="...", versionTimestamp=..., patches=[...])
sb.tools.kg_search(query="...", mode="global")
sb.tools.previewSubscriptionChange(...)
sb.tools.applySubscriptionChange(...)
For dynamic / discovered names, use the callable form:
sb.tools("createDocument", {"folderId": "...", "title": "X", "cdmd": "# Hi"})
Or the lower-level call_tool:
sb.call_tool("createDocument", {"folderId": "...", "title": "X", "cdmd": "# Hi"})
Discover tools at runtime
catalogue = sb.list_tools()
print(f"{catalogue['count']} tools across categories:")
cats = {t['category'] for t in catalogue['tools']}
print(sorted(cats))
Errors
All non-2xx responses raise StableBaselineToolError with status, code, message, and optional details:
from stablebaseline import StableBaseline, StableBaselineToolError
with StableBaseline(api_key="sta_xxx") as sb:
try:
sb.tools.deleteDocument(documentId="missing")
except StableBaselineToolError as e:
if e.status == 404:
print("not found")
elif e.code == "permission_denied":
print("RBAC said no")
else:
raise
Companion packages
| Surface | Package | Use case |
|---|---|---|
| Python SDK (this) | stablebaseline |
Python apps, data work |
| TypeScript SDK | @stablebaseline/sdk |
Node, browsers, Deno, Bun |
| CLI | @stablebaseline/cli (binary sb) |
Shells, scripts, CI/CD |
| MCP server | https://api.stablebaseline.io/functions/v1/cloud-serve/mcp |
AI agents (Claude Code, Cursor, Windsurf, ChatGPT, Gemini, …) |
All four share the same auth, same handlers, same data — see github.com/stablebaseline/mcp.
License
MIT — see LICENSE at the repo root. The Stable Baseline product itself is proprietary SaaS at stablebaseline.io.
Metadata
Release files for stablebaseline 0.7.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| stablebaseline-0.7.0.tar.gz | 6.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| stablebaseline-0.7.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 12.9 kB
Release files / stablebaseline-0.7.0.tar.gz
| Download URL | stablebaseline-0.7.0.tar.gz |
|---|---|
| Size | 6.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d400a5dc0a17ee8a88e9d2ce5d299176c25622b72c2d950a65f41a845183ad54
|
|
BLAKE2b-256 checksum How to use checksums |
5c2e34a7cccecdf184ba60444f49019f30a3fe9152e8bc3c328b5c08af25b2f1
|
| 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 29, 2026.
Transparency logRelease files / stablebaseline-0.7.0-py3-none-any.whl
| Download URL | stablebaseline-0.7.0-py3-none-any.whl |
|---|---|
| Size | 6.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9773aa22c9d841bc8948b7062e502dccc29d887a1f1ffaca5adaecad4b8cf7a6
|
|
BLAKE2b-256 checksum How to use checksums |
5866e869c481db4273b0c3567506c6a4c5eb53c007479c0784ead7fb6e4df59a
|
| 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 29, 2026.
Transparency log