> For the complete documentation index, see [llms.txt](https://docs.paradime.io/app-help/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.paradime.io/app-help/products/dino-ai/programmable-agents/api-reference.md).

# Triggering from the API

Programmable Agents can be triggered from your own code over GraphQL or with the Paradime Python SDK. The endpoints are the same — pick whichever fits your stack.

* [**GraphQL**](/app-help/developers/graphql-api/examples/dinoai-programmable-agents-api.md) — full reference and cURL examples in Developers → GraphQL API → DinoAI Programmable Agents API.
* [**Python SDK**](/app-help/developers/python-sdk/modules/dinoai-programmable-agents.md) — full reference and Python examples in Developers → Python SDK → DinoAI Programmable Agents.

{% hint style="info" %}

## Prerequisites

* An agent defined under .dinoai/agents/.yml in your repository — see YAML Configuration.
* An API key with DinoAI Agent capabilities.
  {% endhint %}

#### GraphQL — quick example

```bash
curl -X POST $PARADIME_API_ENDPOINT \
  -H "X-API-KEY: $PARADIME_API_KEY" \
  -H "X-API-SECRET: $PARADIME_API_SECRET" \
  -H "Content-Type: application/json" \
  -d '{
    "query": "mutation Trigger($agent: String, $message: String) { triggerDinoaiAgentRun(agent: $agent, message: $message) { ok agentSessionId status } }",
    "variables": {"agent": "data-quality-checker", "message": "Focus on stg_orders"}
  }'
```

Save the returned `agentSessionId` and poll with `dinoaiAgentRun(agentSessionId: $id)` until `status` reaches `COMPLETED` or `FAILED`. See the full GraphQL reference for the trigger, poll, and follow-up operations.

***

#### Python SDK — quick example

```python
from paradime import Paradime

paradime = Paradime(api_endpoint="API_ENDPOINT", api_key="API_KEY", api_secret="API_SECRET")

# Trigger a named agent and block until it completes
run = paradime.dinoai_agents.trigger_and_wait(
    agent="data-quality-checker",
    message="Focus on stg_orders",
)

for msg in run.messages:
    print(f"[{msg.role}] {msg.content}")
```

See the full Python SDK reference for `trigger_run`, `trigger_and_wait`, `send_message`, and `get_run`.

#### Related

* [Quick Start](/app-help/products/dino-ai/programmable-agents.md) — End-to-end first-run walkthrough
* [Triggering from Bolt](/app-help/products/dino-ai/programmable-agents/triggering-from-bolt.md) — Alternative invocation path via a Bolt schedule
* [Agent-to-Agent Delegation](/app-help/products/dino-ai/programmable-agents/agent-to-agent-delegation.md) — Multi-agent workflows


---

# 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://docs.paradime.io/app-help/products/dino-ai/programmable-agents/api-reference.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.
