Skip to main content

stablebaseline

PyPI Tools

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, databases with live dashboards, the organisation's agents, and a self-learning Knowledge Graph. 233 tools across 22 categories.

Install

pip install stablebaseline

Quick start

from stablebaseline import StableBaseline

# Create a key at app.stablebaseline.io/settings/developers
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"])

    deals = sb.tools.queryDatabaseRows(
        databaseId="DB-12",
        table="Deals",
        summaries=[{"fn": "count"}],
        groupBy=["Stage"],
    )
    print(deals)

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 (create one at app.stablebaseline.io/settings/developers)
StableBaseline(access_token="...")             # OAuth 2.1 access token
StableBaseline()                               # picks up SB_API_KEY / SB_ACCESS_TOKEN from env

Databases start unticked on a new API key: tick them if the key should reach databases.

Tool dispatch

Each method on client.tools corresponds to one of the 233 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.queryDatabaseRows(databaseId="...", table="...", summaries=[{"fn": "count"}])
sb.tools.delegateToAgent(agentId="...", brief="...", idempotencyKey="...")
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.10.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for stablebaseline 0.10.3
File Size Uploaded Provenance Actions
stablebaseline-0.10.3.tar.gz 6.4 kB With provenance Details for stablebaseline-0.10.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for stablebaseline 0.10.3
File Interpreter ABI Platform Actions
stablebaseline-0.10.3-py3-none-any.whl Python 3 none any Details for stablebaseline-0.10.3-py3-none-any.whl

Total release size: 13.3 kB

Release files / stablebaseline-0.10.3.tar.gz

Download URL stablebaseline-0.10.3.tar.gz
Size 6.4 kB
Tags Source
SHA-256 checksum
How to use checksums
87cb135bcdf7ed6a4d1e4105603d2a3446a3de484b9de9c7cc2410b1df3cec02
BLAKE2b-256 checksum
How to use checksums
1dc1b1d72d573879d49277a2b0cbe464aa755c598bcd13b624203d0dc3b845ea
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 Nov 6, 2026.

Transparency log

Release files / stablebaseline-0.10.3-py3-none-any.whl

Download URL stablebaseline-0.10.3-py3-none-any.whl
Size 6.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
28b950246d668f3da3c82fafc7ddf901579c980d955fd219dd4769d3903d7d2f
BLAKE2b-256 checksum
How to use checksums
0515772cbcac88b7de78f6390e226ad5b96100f35c3223ccc46f4e08f969cd7d
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 Nov 6, 2026.

Transparency log

Security for stablebaseline 0.10.3

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for stablebaseline-0.10.3.tar.gz

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 Nov 6, 2026.

Transparency log

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.

Release history Release notifications | RSS feed

This release

0.10.3 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page