Skip to main content
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 — full reference and cURL examples in Developers → GraphQL API → DinoAI Programmable Agents API.
  • Python SDK — full reference and Python examples in Developers → Python SDK → DinoAI Programmable Agents.
Prerequisites:
  • An agent defined under .dinoai/agents/.yml in your repository — see YAML Configuration.
  • An API key with DinoAI Agent capabilities.

GraphQL — quick example

Authenticate with an Account API Key (recommended): pass Authorization: Bearer <token> and X-Paradime-Workspace: <workspace_uid>. Legacy Workspace API Keys still work with X-API-KEY / X-API-SECRET headers instead. See Authentication.
Save the returned agentSessionId and poll with dinoaiAgentRun(agentSessionId: $id) until status reaches a terminal state: COMPLETED, FAILED, or EXPIRED (the agent pod never started). The poll response also returns messages, childSessionIds, and workspaceUid. Select steps to follow each tool call while the agent works, and startupSteps for the start-up checklist while its environment boots. Two other arguments are worth knowing:
  • baseBranch starts the run from a specific git branch or commit.
  • modelFamily pins the run to a model family, overriding the agent’s own choice. An unrecognized slug still starts the run on the workspace’s default family and returns a warning field saying so.
See the full GraphQL reference for the trigger, poll, and follow-up operations.

Python SDK — quick example

See the full Python SDK reference for trigger_run, trigger_run_and_wait, send_message, and get_run.
The Python SDK does not wrap modelFamily yet, so use GraphQL directly to pin a run to a model family.
Use the SDK methods rather than posting raw GraphQL yourself. trigger_run accepts optional slack_channel / slack_thread (both required together) and base_branch, and raises ValueError if neither agent nor message is set. trigger_run_and_wait takes timeout (default 3600) and poll_interval (default 10) and raises DinoaiAgentRunFailedException on a failed run.