Metadata-Version: 2.4
Name: autohive_integrations_sdk
Version: 2.0.0
Summary: Integrations SDK for Autohive
Project-URL: Homepage, https://github.com/Autohive-AI/integrations-sdk
Project-URL: Issues, https://github.com/Autohive-AI/integrations-sdk/issues
Author-email: Reilly Oldham <reilly@autohive.com>, Kai Koenig <kai@autohive.com>, Ninos Awas <ninos@raygun.com>
License-Expression: MIT
License-File: LICENSE
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: System Administrators
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.13
Requires-Dist: aiohttp
Requires-Dist: jsonschema==4.17.3
Provides-Extra: test
Requires-Dist: aioresponses>=0.7; extra == 'test'
Requires-Dist: pytest-asyncio>=0.24; extra == 'test'
Requires-Dist: pytest-cov>=6.0; extra == 'test'
Requires-Dist: pytest>=8.0; extra == 'test'
Description-Content-Type: text/markdown

# Integrations SDK for Autohive

[![Tests](https://github.com/Autohive-AI/integrations-sdk/actions/workflows/tests.yml/badge.svg)](https://github.com/Autohive-AI/integrations-sdk/actions/workflows/tests.yml)
[![Coverage](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/TheRealAgentK/e8adf35c8508876ab8ba09422ddc2535/raw/coverage-badge.json)](https://github.com/Autohive-AI/integrations-sdk/actions/workflows/tests.yml)
[![PyPI version](https://img.shields.io/pypi/v/autohive-integrations-sdk)](https://pypi.org/project/autohive-integrations-sdk/)
[![Python](https://img.shields.io/pypi/pyversions/autohive-integrations-sdk)](https://pypi.org/project/autohive-integrations-sdk/)
[![License: MIT](https://img.shields.io/pypi/l/autohive-integrations-sdk)](https://github.com/Autohive-AI/integrations-sdk/blob/master/LICENSE)

Build integrations for [Autohive](https://autohive.ai)'s AI agent platform. Define actions that Autohive agents can execute — call APIs, process data, and connect to third-party services.

## Installation

```bash
pip install autohive-integrations-sdk
```

## Quick Example

```python
from autohive_integrations_sdk import (
    Integration, ExecutionContext, ActionHandler, ActionResult
)
from typing import Dict, Any

integration = Integration.load()

@integration.action("fetch_data")
class FetchData(ActionHandler):
    async def execute(self, inputs: Dict[str, Any], context: ExecutionContext) -> ActionResult:
        response = await context.fetch(
            "https://api.example.com/data",
            headers={"Authorization": f"Bearer {context.auth['api_key']}"}
        )
        return ActionResult(data=response.data)
```

## Key Features

- **Action handlers** — async handlers with typed inputs/outputs and built-in HTTP client
- **Authentication** — flexible auth config (API keys, OAuth, custom fields)
- **Billing support** — report per-action costs via `ActionResult.cost_usd`
- **Error handling** — `ActionError` for expected application-level errors
- **Connected accounts** — expose authorized user identity back to the platform
- **Validation** — JSON Schema input/output validation with detailed error reporting

## Documentation

| Guide | Description |
|-------|-------------|
| [Building Your First Integration](https://github.com/Autohive-AI/integrations-sdk/blob/master/docs/manual/building_your_first_integration.md) | End-to-end tutorial covering config, actions, auth, testing |
| [Integration Structure](https://github.com/Autohive-AI/integrations-sdk/blob/master/docs/manual/integration_structure.md) | Directory layout, `config.json` schema reference |
| [Patterns & Best Practices](https://github.com/Autohive-AI/integrations-sdk/blob/master/docs/manual/patterns.md) | Pagination, API helpers, multi-field auth |
| [Starter Template](https://github.com/Autohive-AI/integrations-sdk/tree/master/samples/template) | Copy this to begin a new integration |

## Links

- [GitHub Repository](https://github.com/Autohive-AI/integrations-sdk)
- [Release Notes](https://github.com/Autohive-AI/integrations-sdk/blob/master/RELEASENOTES.md)
- [Public Integrations](https://github.com/Autohive-AI/autohive-integrations) — examples of production integrations built with this SDK
