Airbyte Agent SDK
Typed connector tools for working with third-party APIs, with full IDE autocomplete.
Overview
The Airbyte Agent SDK provides 50+ connectors with typed tools for third-party APIs. Run connectors locally with your own credentials in connector-specific auth configs; the SDK makes direct calls to each third-party API.
How to install
uv pip install airbyte-agent-sdk
Tool integration
The SDK ships a tool builder and two connector-tool decorators for turning connector calls into LLM tools with retry-aware exception translation, output-size guards, and framework-specific error signalling, plus translate_exceptions for callables that are not connector tools. Pick from these in this order:
build_connector_tools(connector, framework="...") — the simplest, preferred default on supported frameworks (PydanticAI, LangChain, OpenAI Agents, FastMCP) when you do not need custom tool bodies. Returns inspect_connector, read_skill_docs, and execute callables bound to one connector; the tool names are fixed, so register one connector's tool set per agent. With a local connector, inspect_connector returns a mode: "local" payload with a warning, and read_skill_docs returns the full generated connector docs; a section request returns a notice followed by the same docs. Pass use_progressive_docs=False to make tools.as_list() expose only execute with the legacy rich description.
@<Connector>.agent_tool(...) — use when you need custom tool bodies, a framework the SDK does not natively support, or a multi-connector agent. Decorate three functions (execute, inspect, docs) and the execute docstring steers the agent through the inspect → docs → execute flow instead of embedding the full entity/action reference. On supported frameworks pass framework="pydantic_ai", "langchain", "openai_agents", or "mcp" to target that framework's failure signal; on unsupported frameworks omit it and failures raise AirbyteToolError (framework="none"; no auto-detection).
@<Connector>.tool_utils — deprecated; retained only for backwards compatibility with existing integrations that use one broad, generated-description tool. Do not use it for new tools. It auto-detects supported frameworks and remains available so existing integrations can migrate independently.
@translate_exceptions — same translation behaviour for any callable that is not a generated Connector (custom helpers, eval harnesses, ad-hoc tools).
The builder and decorators preserve async callables, __name__, and __doc__. Transient runtime failures (429/5xx, network, timeout) can be retried silently via internal_retries=N. Output exceeding max_output_chars (default 100 KB) is converted to the framework's retry signal so the LLM can narrow the query.
Pick one SDK decorator per tool. agent_tool and legacy tool_utils already include exception translation. Stacking @translate_exceptions with either decorator is detected and short-circuited.
Prebuilt connector tools (default)
import os
from pydantic_ai import Agent
from airbyte_agent_sdk import build_connector_tools
from airbyte_agent_sdk.connectors.stripe import StripeConnector, StripeAuthConfig
stripe = StripeConnector(
auth_config=StripeAuthConfig(api_key=os.environ["STRIPE_API_KEY"])
)
tools = build_connector_tools(stripe, framework="pydantic_ai")
agent = Agent("openai:gpt-4o", tools=tools.as_list())
The model-facing docs flow is inspect_connector() -> read_skill_docs() -> read_skill_docs(section="...") -> execute(...). Locally, inspect_connector() returns a mode: "local" payload with a warning, and read_skill_docs() returns the full generated connector docs; a section request adds a notice that section-specific docs are unavailable, then returns the same full docs.
The builder covers one connector per agent — the tool names are fixed (inspect_connector, read_skill_docs, execute), so the tool sets for multiple connectors collide when registered on the same agent. Renaming the callables at registration avoids the collision, but the generated execute guidance still tells the model to call inspect_connector and read_skill_docs, so it points at the wrong tools. Multi-connector agents use agent_tool with connector-specific function names, which weaves those names into the guidance via inspect_tool= and docs_tool=.
Locally, the inspect/docs round trip returns the full generated docs that the execute description would carry. To opt out of that flow:
tools = build_connector_tools(stripe, framework="pydantic_ai", use_progressive_docs=False)
agent = Agent("openai:gpt-4o", tools=tools.as_list()) # exposes execute only
Custom tool bodies and unsupported frameworks — agent_tool