Skip to main content

Official Python SDK and MCP server for the Assistable AI v3 API (generated from OpenAPI).

Project description

assistableai (Python)

Official Python SDK and MCP server for the Assistable AI v3 API, generated from spec/openapi.json — the same source of truth as the TypeScript SDK, CLI, and MCP server.

  • SDK — typed operation functions + models (openapi-python-client: attrs + httpx) with a thin auth wrapper.
  • MCP server — every v3 operation as an MCP tool, via FastMCP's from_openapi (optional [mcp] extra).

Install

pip install assistableai            # SDK only
pip install 'assistableai[mcp]'     # SDK + MCP server

SDK usage

import assistableai
from assistableai.api.assistants import list_assistants, get_assistant
from assistableai.api.contacts import create_contact
from assistableai.models import ContactCreate  # example model

client = assistableai.configure(
    api_key="ask_live_…",
    subaccount_id="<subaccount-id>",   # sent as X-Subaccount-Id (optional)
)

# Every op exposes sync / sync_detailed / asyncio / asyncio_detailed.
# Responses are the full {data, error, request_id} envelope (a typed model).
envelope = list_assistants.sync(client=client.raw, limit=2)

# Need status codes / headers? Use *_detailed:
resp = get_assistant.sync_detailed("<assistant-id>", client=client.raw)
print(resp.status_code, resp.parsed)

# Per-call subaccount override:
list_assistants.sync(client=client.raw, x_subaccount_id="<other-subaccount>")

Credentials resolve from explicit args, then the environment (ASSISTABLE_API_KEY, ASSISTABLE_SUBACCOUNT_ID, ASSISTABLE_BASE_URL). Default base URL is https://api.assistable.ai.

configure() stores a process-global client (assistableai.get_client()); for multiple credentials, construct assistableai.AssistableAI(...) instances directly and pass .raw.

MCP server

ASSISTABLE_API_KEY=ask_live_… ASSISTABLE_SUBACCOUNT_ID=<id> assistableai-mcp
# or: python -m assistableai.mcp

Add to an MCP client (e.g. Claude Desktop):

{
  "mcpServers": {
    "assistableai": {
      "command": "assistableai-mcp",
      "env": {
        "ASSISTABLE_API_KEY": "ask_live_…",
        "ASSISTABLE_SUBACCOUNT_ID": "<subaccount-id>"
      }
    }
  }
}

Develop

uv sync --all-extras          # create the dev venv
uv run python scripts/generate.py   # regenerate assistableai._client from the spec
uv build                      # build wheel + sdist

The generated client (src/assistableai/_client) and the bundled spec (src/assistableai/spec/openapi.json) are committed; regenerate them whenever spec/openapi.json changes.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

assistableai-0.1.0.tar.gz (88.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

assistableai-0.1.0-py3-none-any.whl (369.3 kB view details)

Uploaded Python 3

File details

Details for the file assistableai-0.1.0.tar.gz.

File metadata

  • Download URL: assistableai-0.1.0.tar.gz
  • Upload date:
  • Size: 88.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for assistableai-0.1.0.tar.gz
Algorithm Hash digest
SHA256 bc49ecad80689de4799358d79ae51a1c0e0fdb9b80efa11649adda5c810a7b85
MD5 780e2745564a6a02c410c7aaad5a97ee
BLAKE2b-256 01517e42b5273dad15cfe72469870a968020c4bfb671954bfce51bb7b209426c

See more details on using hashes here.

Provenance

The following attestation bundles were made for assistableai-0.1.0.tar.gz:

Publisher: release.yml on assistableai/assistableai-sdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file assistableai-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: assistableai-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 369.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for assistableai-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b83144158db98837d02bf52817c7bd3b4f55d49a4d15d93ba95d383e1d1c2cd2
MD5 96d301f2d0f83c0ad12c38c03fc7cc88
BLAKE2b-256 9b42fe4dfeeb24ad37e480b364fc0e9624a8365976a565d4a3261d55ec71e7d4

See more details on using hashes here.

Provenance

The following attestation bundles were made for assistableai-0.1.0-py3-none-any.whl:

Publisher: release.yml on assistableai/assistableai-sdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page