> For the complete documentation index, see [llms.txt](https://aphid-ai.gitbook.io/aphid-ai-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://aphid-ai.gitbook.io/aphid-ai-docs/aphid-api/integration-patterns.md).

# Integration Patterns

Aphid can integrate with third-party systems through several patterns. The right pattern depends on the partner system, the required level of autonomy, security controls, and the type of workflow.

| Pattern                         | Best For                                            | How It Works                                                                                                                              |
| ------------------------------- | --------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
| REST API connector              | Systems with mature APIs.                           | Aphid calls external endpoints using secured credentials and scoped permissions.                                                          |
| MCP server/tool                 | Agent-ready integrations and tool abstraction.      | A third-party system exposes functions as MCP tools. Aphid agents call those tools with structured inputs and receive structured outputs. |
| Webhook/event trigger           | Real-time workflow initiation.                      | A third-party event triggers Aphid to evaluate context and start a workflow.                                                              |
| Batch import/export             | Legacy systems or scheduled operations.             | Aphid exchanges CSV, JSON, XML, EDI, or files on a schedule.                                                                              |
| Database or warehouse connector | Reporting, analytics, and operational intelligence. | Aphid reads from approved tables or views and can write only where explicitly authorized.                                                 |
| Human-in-the-loop workflow      | Sensitive or high-impact actions.                   | Aphid prepares the action and requests approval before execution.                                                                         |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://aphid-ai.gitbook.io/aphid-ai-docs/aphid-api/integration-patterns.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
