Skip to content

airbytehq/airbyte-agent-connectors

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Python Publish Connectors License Airbyte Stars Slack Twitter Follow

Airbyte Agent Connectors are packages that let AI agents call third‑party APIs through strongly typed, well‑documented tools. Each connector is a standalone Python package that you can use directly in your app, plug into an agent framework, or expose through MCP and APIs (coming soon).

What this repo contains

  • Python SDKs for specific SaaS APIs (for example Gong, Stripe, GitHub).
  • A consistent connector layout so you can understand and extend any connector quickly.
  • Ready‑to-use clients that validate auth, handle schemas, and expose typed methods for each operation.

Connector Structure

Each connector is a standalone Python package:

connectors/ β”œβ”€β”€ gong/ β”‚ β”œβ”€β”€ airbyte_agent_gong/ β”‚ β”œβ”€β”€ pyproject.toml β”‚ β”œβ”€β”€ CHANGELOG.md β”‚ β”œβ”€β”€ README.md β”‚ └── REFERENCE.md β”œβ”€β”€ github/ β”‚ └── ... └── ... 

Inside each connector folder, you’ll find:

  • Generated Python client
  • Connector-specific README with supported operations
  • Typed methods generated from Airbyte’s connector definitions
  • Validation + error handling

When to use these connectors

Use Airbyte Agent Connectors when you want:

  • Agent‑friendly data access: Let AI agents call real SaaS APIs (e.g., CRM, billing, analytics) with guardrails and typed responses.
  • Consistent auth and schemas: Reuse a uniform configuration and error‑handling pattern across many APIs. Use connectors inside frameworks like PydanticAI, LangChain, or any custom agent loop.
  • Composable building blocks: Combine multiple connectors in a single agent to orchestrate multi‑system workflows. Compared to building ad‑hoc API wrappers, these connectors give you a shared structure, generated clients, and alignment with the rest of the Airbyte ecosystem.

Roadmap

We are actively expanding AI Connectors. Coming soon:

  • Writes!
  • MCP support (Model Context Protocol)
  • Hosted execution, authentication, and search
  • Demo apps + starter templates
  • More connectors added weekly

Contributing / Feedback

We actively welcome feedback, ideas, and bug reports. If you're building AI agents with Airbyte Agent Connectors and want to share ideas or get help, join our community on slack. We’d love to hear what you're building and what connectors or capabilities you’d like to see next.

Tutorial using the Python SDK

In this tutorial, you'll create a new Python project with uv, add a Pydantic AI agent, equip it to use one of Airbyte's agent connectors, and use natural language to explore your data. This tutorial uses GitHub, but if you don't have a GitHub account, you can use one of Airbyte's other agent connectors and perform different operations.

Overview

This tutorial is for AI engineers and other technical users who work with data and AI tools. You can complete it in about 15 minutes.

The tutorial assumes you have basic knowledge of the following tools, but most software engineers shouldn't struggle with anything that follows.

  • Python and package management with uv
  • Pydantic AI
  • GitHub, or a different third-party service you want to connect to

Before you start

Before you begin this tutorial, ensure you have the following.

Part 1: Create a new Python project

In this tutorial you initialize a basic Python project to work in. However, if you have an existing project you want to work with, feel free to use that instead.

  1. Create a new project using uv:

    uv init my-ai-agent --app cd my-ai-agent

    This creates a project with the following structure:

    my-ai-agent/ β”œβ”€β”€ .gitignore β”œβ”€β”€ .python-version β”œβ”€β”€ README.md β”œβ”€β”€ main.py └── pyproject.toml 
  2. Create an agent.py file for your agent definition:

    touch agent.py

You create .env and uv.lock files in later steps, so don't worry about them yet.

Part 2: Install dependencies

Install the GitHub connector and Pydantic AI. This tutorial uses OpenAI as the LLM provider, but Pydantic AI supports many other providers.

uv add airbyte-agent-github pydantic-ai

This command installs:

  • airbyte-agent-github: The Airbyte agent connector for GitHub, which provides type-safe access to GitHub's API.
  • pydantic-ai: The AI agent framework, which includes support for multiple LLM providers including OpenAI, Anthropic, and Google.

The GitHub connector also includes python-dotenv, which you can use to load environment variables from a .env file.

Part 3: Import Pydantic AI and the GitHub agent connector

Add the following imports to agent.py:

import os from dotenv import load_dotenv from pydantic_ai import Agent from airbyte_agent_github import GithubConnector from airbyte_agent_github.models import GithubAuthConfig

These imports provide:

  • os: Access environment variables for your GitHub token and LLM API key.
  • load_dotenv: Load environment variables from your .env file.
  • Agent: The Pydantic AI agent class that orchestrates LLM interactions and tool calls.
  • GithubConnector: The Airbyte agent connector that provides type-safe access to GitHub's API.
  • GithubAuthConfig: The authentication configuration for the GitHub connector.

Part 4: Add a .env file with your secrets

  1. Create a .env file in your project root and add your secrets to it. Replace the placeholder values with your actual credentials.

    GITHUB_ACCESS_TOKEN=your-github-personal-access-token OPENAI_API_KEY=your-openai-api-key 
  2. Add the following line to agent.py after your imports to load the environment variables:

    load_dotenv()

    This makes your secrets available via os.environ. Pydantic AI automatically reads OPENAI_API_KEY from the environment, and you'll use os.environ["GITHUB_ACCESS_TOKEN"] to configure the connector in the next section.

Part 5: Configure your connector and agent

Now that your environment is set up, add the following code to agent.py to create the GitHub connector and Pydantic AI agent.

Define the connector

Define the agent connector for GitHub. It authenticates using your personal access token.

connector = GithubConnector( auth_config=GithubAuthConfig( access_token=os.environ["GITHUB_ACCESS_TOKEN"] ) )

Create the agent

Create a Pydantic AI agent with a system prompt that describes its purpose:

agent = Agent( "openai:gpt-4o", system_prompt=( "You are a helpful assistant that can access GitHub repositories, issues, " "and pull requests. Use the available tools to answer questions about " "GitHub data. Be concise and accurate in your responses." ), )
  • The "openai:gpt-4o" string specifies the model to use. You can use a different model by changing the model string. For example, use "openai:gpt-4o-mini" to lower costs, or see the Pydantic AI models documentation for other providers like Anthropic or Google.
  • The system_prompt parameter tells the LLM what role it should play and how to behave.

Part 6: Add tools to your agent

Tools let your agent fetch real data from GitHub using Airbyte's agent connector. Without tools, the agent can only respond based on its training data. By registering connector operations as tools, the agent can decide when to call them based on natural language questions.

Add the following code to agent.py.

# Tool to list issues in a repository @agent.tool_plain async def list_issues(owner: str, repo: str, limit: int = 10) -> str: """List open issues in a GitHub repository.""" result = await connector.issues.list(owner=owner, repo=repo, states=["OPEN"], per_page=limit) return str(result.data) # Tool to list pull requests in a repository @agent.tool_plain async def list_pull_requests(owner: str, repo: str, limit: int = 10) -> str: """List open pull requests in a GitHub repository.""" result = await connector.pull_requests.list(owner=owner, repo=repo, states=["OPEN"], per_page=limit) return str(result.data)

The @agent.tool_plain decorator registers each function as a tool the agent can call. The docstring becomes the tool's description, which helps the LLM understand when to use it. The function parameters become the tool's input schema, so the LLM knows what arguments to provide.

With these two tools, your agent can answer questions about issues, pull requests, or both. For example, it can compare open issues against pending PRs to identify which issues might be resolved soon.

Part 7: Run your project

Now that your agent is configured with tools, update main.py and run your project.

  1. Update main.py. This code creates a simple chat interface in your command line tool and allows your agent to remember your conversation history between prompts.

    import asyncio from agent import agent async def main(): print("GitHub Agent Ready! Ask questions about GitHub repositories.") print("Type 'quit' to exit.\n") history = None while True: prompt = input("You: ") if prompt.lower() in ('quit', 'exit', 'q'): break result = await agent.run(prompt, message_history=history) history = result.all_messages() # Call the method print(f"\nAgent: {result.output}\n") if __name__ == "__main__": asyncio.run(main())
  2. Run the project.

    uv run main.py

Chat with your agent

The agent waits for your input. Once you prompt it, the agent decides which tools to call based on your question, fetches the data from GitHub, and returns a natural language response. Try prompts like:

  • "List the 10 most recent open issues in airbytehq/airbyte"
  • "What are the 10 most recent pull requests that are still open in airbytehq/airbyte?"
  • "Are there any open issues that might be fixed by a pending PR?"

The agent has basic message history within each session, and you can ask followup questions based on its responses.

Troubleshooting

If your agent fails to retrieve GitHub data, check the following:

  • HTTP 401 errors: Your GITHUB_ACCESS_TOKEN is invalid or expired. Generate a new token and update your .env file.
  • HTTP 403 errors: Your token doesn't have the required scopes. Ensure your token has repo scope for accessing repository data.
  • OpenAI errors: Verify your OPENAI_API_KEY is valid, has available credits, and won't exceed rate limits.

Summary

In this tutorial, you learned how to:

  • Set up a new Python project with uv
  • Add Pydantic AI and Airbyte's GitHub agent connector to your project
  • Configure environment variables and authentication
  • Add tools to your agent using the GitHub connector
  • Run your project and use natural language to interact with GitHub data

Next steps

  • Add more tools and agent connectors to your project. For GitHub, you can wrap additional operations (like search, comments, or commits) as tools. Explore other agent connectors in the repository to give your agent access to more services.
  • Consider how you might like to expand your agent's capabilities. For example, you might want to trigger effects like sending a Slack message or an email based on the agent's findings. You aren't limited to the capabilities of Airbyte's agent connectors. You can use other libraries and integrations to build an increasingly robust agent ecosystem.
Brought to you with love by Airbyte πŸ’œ