> 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/example-agentic-workflow.md).

# Example Agentic Workflow

The following example shows how Aphid can autonomously complete a cross-system workflow while maintaining policy and audit controls.

| Step | Agent Action                                                                                                                  | System Interaction                                                                        |
| ---- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- |
| 1    | User asks: “Review today’s failed orders, identify causes, and open tickets for anything that requires operations follow-up.” | User request enters Aphid through chat, API, or workflow trigger.                         |
| 2    | Agent identifies required data and tools.                                                                                     | Aphid selects order API, CRM connector, ticketing MCP tool, and notification service.     |
| 3    | Agent retrieves failed orders and classifies root causes.                                                                     | Aphid calls third-party order API and internal knowledge base.                            |
| 4    | Agent determines which failures require action.                                                                               | Policy engine checks thresholds, customer priority, and allowed actions.                  |
| 5    | Agent creates tickets for approved cases.                                                                                     | Aphid calls ticketing MCP tool with structured ticket fields.                             |
| 6    | Agent sends summary to operations.                                                                                            | Aphid posts the result to email, Slack, Teams, CRM, or dashboard.                         |
| 7    | Audit record is created.                                                                                                      | Logs include user request, data sources, tool calls, outcomes, exceptions, and approvals. |


---

# 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/example-agentic-workflow.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.
