Skip to main content
paradime.admin.dinoai manages a workspace’s DinoAI agent definitions, which agents may delegate to which, and the workspace’s DinoAI settings. To run agents, use paradime.dinoai_agents. For the GraphQL operations, see DinoAI.
Prerequisites
  • These operations are available on every plan.
  • Your API key needs the DinoAI admin capability group. To read an agent’s environment, the key also needs Environment admin.
  • The admin client of the paradime-io package. See Admin client.
The examples on this page use this client:
Agents defined in YAML under .dinoai/agents/ live in the repository. update_agent refuses them with AdminConflictException, and create_agent refuses a slug that one of them holds. Change them in the repository and run sync_agents_from_code.

List agents

Iterates over the workspace’s DinoAI agent definitions, from YAML and from the UI.
Optional[str]
default:"None"
The workspace to read, for a company API key.
int
default:"100"
How many agents to read per request, at most 500.
Iterator[DinoAiAgentDefinition]
The agents, read one page at a time.

Get an agent

Reads one DinoAI agent definition.
str
required
The agent’s slug.
Optional[str]
default:"None"
The workspace to read, for a company API key.
Optional[DinoAiAgentDefinition]
The agent, or None when no agent has this slug.

Create an agent

Creates a DinoAI agent definition. With a slug, sending the same input again returns the stored agent and changes nothing. A slug that an agent with other settings holds raises AdminConflictException. Without a slug, every call creates another agent.
str
required
The agent’s display name.
DinoAiAgentSpecInput
required
What the agent is and may do. A field you leave out is unset on the agent. See Types.
Optional[str]
default:"None"
The agent’s slug: lowercase letters, digits and single hyphens. Generated from the name when left out.
Optional[str]
default:"None"
The name that the agent’s Slack messages show.
Optional[str]
default:"None"
The https URL of the icon that the agent’s Slack messages show.
Optional[str]
default:"None"
The workspace to change, for a company API key.
DinoAiAgentDefinition
The agent, as now stored.

Update an agent

Replaces an agent definition’s name, spec and Slack bot fields, and keeps its delegates. A spec field or Slack bot field that you leave out is cleared. Sending the same input again changes nothing. A slug that no agent holds raises AdminNotFoundException.
str
required
The slug of the agent to change.
str
required
The agent’s display name.
DinoAiAgentSpecInput
required
What the agent is and may do.
Optional[str]
default:"None"
The name that the agent’s Slack messages show.
Optional[str]
default:"None"
The icon that the agent’s Slack messages show.
Optional[str]
default:"None"
The workspace to change, for a company API key.
DinoAiAgentDefinition
The agent, as now stored.

Delete an agent

Deletes a DinoAI agent definition. An agent that another agent delegates to can’t be deleted.
str
required
The agent’s slug.
Optional[str]
default:"None"
The workspace to change, for a company API key.
str
The slug of the deleted agent.

Set the agent graph

Replaces every delegation between the workspace’s agents. The API refuses a cycle.
Sequence[Tuple[str, str]]
required
(from_slug, to_slug) pairs: the first agent may delegate to the second.
Optional[str]
default:"None"
The workspace to change, for a company API key.
None
This method returns nothing.

Get DinoAI settings

Reads the workspace’s DinoAI settings.
Optional[str]
default:"None"
The workspace to read, for a company API key.
Optional[DinoAiWorkspaceSettings]
The settings: sql_query_tool_enabled, whether DinoAI may run SQL queries against the warehouse.

Set DinoAI settings

Changes the workspace’s DinoAI settings. A setting you leave out keeps its value.
Optional[bool]
default:"None"
Whether DinoAI may run SQL queries against the warehouse.
Optional[str]
default:"None"
The workspace to change, for a company API key.
Optional[DinoAiWorkspaceSettings]
The settings now.

Sync agents from code

Starts a job that imports the agent definitions committed under .dinoai/agents/, by slug. It creates agents and replaces the agents with the same slug, even agents created in Paradime or through the API. It never deletes an agent.
Optional[str]
default:"None"
The branch to read. The repository’s default branch when left out.
Optional[str]
default:"None"
The workspace to sync, for a company API key.
AdminJob
The job. Wait for it with admin.jobs.wait. Its result is a DinoAiAgentSyncResult, which counts the agents the sync added, updated and skipped.

Types

Import the models and enums from paradime.apis.admin.dinoai.types.
input
model