Skip to main content

Lightweight multi-provider LLM SDK with streaming and tools

Project description

Dobby SDK

Lightweight multi-provider LLM SDK with streaming and tool support.

Installation

pip install dobby-sdk

# Or from GitHub
pip install git+https://github.com/TYNYBAY/dobby-sdk.git

# With uv
uv add dobby-sdk

Quick Start

from dobby import AgentExecutor, OpenAIProvider
from dobby.types import UserMessagePart, TextPart, TextDeltaEvent

provider = OpenAIProvider(model="gpt-4o", api_key="sk-...")
executor = AgentExecutor(provider="openai", llm=provider)

messages = [UserMessagePart(parts=[TextPart(text="Hello!")])]

async for event in executor.run_stream(messages):
    match event:
        case TextDeltaEvent(delta=delta):
            print(delta, end="")

Features

  • Multi-provider: OpenAI, Azure OpenAI, Anthropic
  • Streaming: Real-time token streaming with typed events
  • Tools: Dataclass-based tools with auto-generated schemas
  • Context injection: Pass runtime context to tools via Injected[T]
  • Structured output: Pydantic model validation for agent responses

Documentation

See docs/ for detailed documentation:

License

MIT

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_sdk-0.2.1.tar.gz (100.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_sdk-0.2.1-py3-none-any.whl (41.2 kB view details)

Uploaded Python 3

File details

Details for the file dobby_sdk-0.2.1.tar.gz.

File metadata

  • Download URL: dobby_sdk-0.2.1.tar.gz
  • Upload date:
  • Size: 100.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.19

File hashes

Hashes for dobby_sdk-0.2.1.tar.gz
Algorithm Hash digest
SHA256 90eb49ee1fe1efae7ecd13ed936efc3662366b33a72e59263609c799711facd4
MD5 ee41dc6ac6feec98c8a31f730cc98fc3
BLAKE2b-256 f09769bc0d30f95b3f0fd830bf14c204967d9e6b03972e89b20151526626f0a9

See more details on using hashes here.

File details

Details for the file dobby_sdk-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: dobby_sdk-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 41.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.19

File hashes

Hashes for dobby_sdk-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 73a16c4910d499f86613fe9d51337685cf2584c0a0741878d6c8f451759d36aa
MD5 215013089e8c92e04bcc47653689609b
BLAKE2b-256 fa5f34f7b014c994f8382064392d9e80dcc1e581e2c8fa156b2f563e6de37f26

See more details on using hashes here.

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