DinoAI Programmable Agents

Overview

  • This feature is available on workspaces with DinoAI programmable agents enabled.

  • Your API keys must have access to the DinoAI Agents API.

The DinoAI Agents module lets you drive DinoAI programmable agents from Python.

This module offers a comprehensive set of tools to trigger agent runs from YAML-defined agents, send ad-hoc prompts, follow up on a live session with new messages, poll for run state, and block until a run completes.

Trigger an agent run

Triggers a DinoAI programmable agent run. At least one of agent or message must be provided.

agent (Optional[str]): Name of the YAML-defined agent to load (matches the file name under .dinoai/agents/ without the .yml extension).

message (Optional[str]): Custom prompt appended to the agent's context. When only agent is provided, the run starts with the agent's role/goal/backstory.

slack_channel (Optional[str]): Slack channel ID the run should post into (e.g. "C0123456789"). Must be provided together with slack_thread.

slack_thread (Optional[str]): Slack thread timestamp the run should reply in (e.g. "1714142436.001200"). Must be provided together with slack_channel.

# First party modules
from paradime import Paradime

# Create a Paradime client with your API credentials
paradime = Paradime(api_endpoint="API_ENDPOINT", api_key="API_KEY", api_secret="API_SECRET")

# Trigger a named agent with an opening message
result = paradime.dinoai_agents.trigger_run(
    agent="data-quality-checker",
    message="Check stg_orders for missing not_null tests.",
)

print(result.agent_session_id)

Trigger an agent run and wait for completion

Triggers a DinoAI agent run and blocks until it reaches COMPLETED or FAILED.

agent (Optional[str]): Name of the YAML-defined agent to load.

message (Optional[str]): Custom prompt appended to the agent's context.

slack_channel (Optional[str]): Slack channel ID. Must be provided together with slack_thread.

slack_thread (Optional[str]): Slack thread timestamp. Must be provided together with slack_channel.

timeout (int): Maximum seconds to wait before raising TimeoutError. Defaults to 3600.

poll_interval (int): Seconds between status polls. Defaults to 10.

Send a follow-up message

Sends a follow-up message to an active DinoAI agent session. The agent pod stays alive for up to 24 hours since the last message; follow-ups resume the same conversation with full context.

agent_session_id (str): The session ID of the running agent.

message (str): The follow-up message to send.

Get an agent run

Fetches the current state of a DinoAI agent run.

agent_session_id (str): The session ID returned by trigger_run or send_message.

Last updated

Was this helpful?