Skip to main content

Official Python SDK for the Dobby AI Platform — Home for your AI agents

Project description

Dobby SDK for Python

Official Python SDK for the Dobby AI Platform — Home for your AI agents.

Installation

pip install dobby-ai-sdk

Quick Start

from dobby_sdk import DobbyClient

client = DobbyClient(api_key="gk_user_...")

# LLM calls (OpenAI-compatible)
response = client.chat.completions.create(
    model="claude-sonnet-4-20250514",
    messages=[{"role": "user", "content": "Hello from Dobby!"}],
)
print(response.choices[0].message.content)

# Streaming
stream = client.chat.completions.create(
    model="gpt-4o-mini",
    messages=[{"role": "user", "content": "Explain AI agents"}],
    stream=True,
)
for chunk in stream:
    print(chunk.choices[0].delta.content or "", end="")

Task Management

# Create a task
task = client.tasks.create(
    title="Review PR #42",
    priority="high",
    agent_name="dobby-code-reviewer-agent",
)

# List pending tasks
tasks = client.tasks.list(status="pending")

# Approve a task (HITL)
client.approvals.approve(task["id"], comment="Looks good!")

Agent Fleet

# List all agents
agents = client.agents.list()

# Register an external agent
agent = client.agents.register(
    display_name="Research Agent",
    framework="crewai",
    protocol="a2a",
    endpoint_url="https://my-agent.example.com",
)

# Pause/resume
client.agents.pause("agent_abc123")

Cost Tracking

# Organization cost summary
costs = client.costs.summary(period="30d")

# Per-agent breakdown
agent_costs = client.costs.by_agent(period="7d")

Async Support

from dobby_sdk import AsyncDobbyClient

async with AsyncDobbyClient(api_key="gk_user_...") as client:
    response = await client.chat.completions.create(
        model="claude-sonnet-4-20250514",
        messages=[{"role": "user", "content": "Hello async!"}],
    )

Configuration

client = DobbyClient(
    api_key="gk_user_...",         # or DOBBY_API_KEY env var
    base_url="https://dobby-ai.com",  # or DOBBY_BASE_URL
    org_id="org_...",              # or DOBBY_ORG_ID
    tenant_id="tenant_...",        # or DOBBY_TENANT_ID
    timeout=120.0,
    max_retries=2,
)

Error Handling

from dobby_sdk import DobbyAuthError, DobbyRateLimitError, DobbyBudgetExceededError

try:
    response = client.chat.completions.create(...)
except DobbyAuthError:
    print("Invalid or expired API key")
except DobbyRateLimitError as e:
    print(f"Rate limited. Retry after: {e.retry_after}s")
except DobbyBudgetExceededError:
    print("Organization budget limit reached")

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

dobby_ai_sdk-0.2.0.tar.gz (17.0 kB view details)

Uploaded Source

Built Distribution

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

dobby_ai_sdk-0.2.0-py3-none-any.whl (18.1 kB view details)

Uploaded Python 3

File details

Details for the file dobby_ai_sdk-0.2.0.tar.gz.

File metadata

  • Download URL: dobby_ai_sdk-0.2.0.tar.gz
  • Upload date:
  • Size: 17.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for dobby_ai_sdk-0.2.0.tar.gz
Algorithm Hash digest
SHA256 2d8064709b8e68513431336d3e33fe739d4f1047798c98de6454d19cefecbe61
MD5 ea6df3c081d0a67ca79bd82d53d7fda4
BLAKE2b-256 010946ef109c2df8dfd5c71c6a08290cd909dfb984781e001226019f1133727b

See more details on using hashes here.

Provenance

The following attestation bundles were made for dobby_ai_sdk-0.2.0.tar.gz:

Publisher: sdk-publish.yml on gil-dobby/repo-dobby

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

File details

Details for the file dobby_ai_sdk-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: dobby_ai_sdk-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 18.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for dobby_ai_sdk-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 76cfc4f026dc52522253cd429125c952a870c740f9cae6e2c201b0005808e288
MD5 6c3b45d02e8e796e2bc229109e57dc8d
BLAKE2b-256 b98761da4ba6a7011d13a98ad8a81676cd560b9e302c485f522a103d781aeb68

See more details on using hashes here.

Provenance

The following attestation bundles were made for dobby_ai_sdk-0.2.0-py3-none-any.whl:

Publisher: sdk-publish.yml on gil-dobby/repo-dobby

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