Build integrations for Autohive's AI agent platform. Define actions that Autohive agents can execute — call APIs, process data, and connect to third-party services.
pip install autohive-integrations-sdkfrom 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)- 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 —
ActionErrorfor expected application-level errors - Connected accounts — expose authorized user identity back to the platform
- Validation — JSON Schema input/output validation with detailed error reporting
| Guide | Description |
|---|---|
| Building Your First Integration | End-to-end tutorial covering config, actions, auth, testing |
| Integration Structure | Directory layout, config.json schema reference |
| Patterns & Best Practices | Pagination, API helpers, multi-field auth |
| Starter Template | Copy this to begin a new integration |
- GitHub Repository
- Release Notes
- Public Integrations — examples of production integrations built with this SDK