Prerequisites:
- These operations are available on every plan.
- An account API key with the
X-Paradime-Workspaceheader, or a workspace API key. TheplatformandworkspaceUidbudget targets need an account key. - The DinoAI admin capability group. To read an agent’s
environment, the key also needs Environment admin. To read a budget’suser, it also needs User access admin or User access viewer.
Operations
These operations manage agents. To run an agent and read its output, use the DinoAI Programmable Agents API, with the DinoAI agent API group.
Create an agent definition
createDinoAiAgentDefinition creates an agent in the targeted workspace, as creating an agent in the app does. spec holds what the agent is and may do: role, goal, and backstory are required.
Send your own slug to make the call safe to retry:
- With a
slug, sending the same input again returns the agent unchanged. Aslugthat an agent with other settings holds is aCONFLICT. - Without a
slug, Paradime mints one from the name on every call, so a retried call creates another agent. - A slug is lowercase letters, digits, and single hyphens, at most 80 characters. Slugs reserved for Paradime’s own agents are refused.
Example response
Example response
spec is unset on the agent:
modelpicks a model tier (HAIKU,SONNET, orOPUS), andmodelFamilya model family. Left out, the agent runs on the defaults.modelFamilymust be a family your account offers: see Supported models.fallback: NONEkeeps the agent on its model family’s own models: no fallback model answers when one fails. Left out, fallbacks are on.environmentis the slug of the agent environment the agent runs in. Left out, it runs in the default agent environment.toolsandmcpToolslimit the Paradime tools and MCP server tools the agent may call:ALLOWLISTmakes only the named tools available, andDENYLISTevery tool except them. See the tools reference.slackandmsTeamsset where the agent posts,jira.defaultWatcherswho watches the issues it files, andgitWriteswhat it may do to pull requests. EachgitWritespermission isfalseby default.- Outside
spec,slackBotNameandslackBotIconUrlset the name and icon of the agent’s Slack messages. The icon URL must usehttps://.
spec: set them with setDinoAiAgentGraph.
Read agent definitions
Workspace.dinoAiAgentDefinitions lists the workspace’s agents, ordered by slug, and Workspace.dinoAiAgentDefinition reads one by slug. source is YAML for an agent imported from .dinoai/agents/, and UI for one authored in Paradime or through the API. A YAML agent also has gitPath, gitCommitSha, and syncedAt.
Change or delete an agent definition
updateDinoAiAgentDefinition replaces an agent’s name, spec, and Slack bot fields by slug, and keeps its delegates. Fields you leave out are cleared, including slackBotName and slackBotIconUrl, so send the full definition every time. Sending the same input again changes nothing. A slug that no agent holds is NOT_FOUND.
deleteDinoAiAgentDefinition deletes an agent by slug. Deleting it again is not an error, and the slug is free to reuse. An agent that another agent delegates to can’t be deleted: remove it from the graph first.
Create, update, and delete refuse an agent imported from
.dinoai/agents/ with CONFLICT, because the next sync from code would undo the change. Change its YAML file instead. See YAML configuration.Set the agent graph
setDinoAiAgentGraph replaces every delegation between the workspace’s agents. Each edge lets the agent fromSlug invoke the agent toSlug, as in agent-to-agent delegation. An agent that is in no edge delegates to nobody. A cycle is refused.
Agents imported from .dinoai/agents/ keep the delegates their YAML file lists (agents_squad). An edge from such an agent that its file doesn’t list is a CONFLICT.
Sync agent definitions from code
syncDinoAiAgentDefinitionsFromCode imports the agent definitions committed under .dinoai/agents/, by slug. It reads branch, or the repository’s default branch when you leave it out. It creates agents and replaces those with the same slug, and never deletes one. A file replaces an agent with the same slug even when the agent was authored in Paradime or through the API.
The sync runs as a job: poll adminJob until its status is SUCCEEDED or FAILED. Only the key that started the job can read it. See Async jobs.
Example response
Example response
skipped counts the files the sync skipped as invalid. isFetched is false when Paradime couldn’t fetch the repository first, and read the commits it already had. A workspace with no git repository is a CONFLICT. A branch the repository doesn’t have fails the job with VALIDATION_FAILED. A sync that doesn’t finish within 10 minutes fails with INTERNAL.
Change DinoAI settings
setDinoAiWorkspaceSettings changes the targeted workspace’s DinoAI settings. A setting you leave out keeps its value, and null is refused. sqlQueryToolEnabled is the DinoAI warehouse access switch: whether DinoAI may run SQL queries against the warehouse.
Set consumption budgets
A consumption budget caps the DinoAI credits that one target may spend in a calendar month. A person’s DinoAI use counts against theirUSER budget, then their workspace’s and the account’s. An agent’s use counts against its AGENT budget, then ALL_AGENTS, the workspace’s, and the account’s. A target with no budget is unlimited. For how budgets apply, see Budget & Consumption.
setConsumptionBudget takes one target, by its natural key. Set exactly one field of target:
monthlyAllowance is a number of credits, from 0 (no spend at all) up to 9223372036854775807. The app shows budgets in millions of credits: a 2M budget in the app is 2000000 in the API. Sending the same input again changes nothing.
consumptionBudgets lists the budgets of the workspaces the key can reach, oldest first. Narrow it with workspaceUid and scopes. An empty scopes list returns no budgets. The PLATFORM budget is listed only for an account key granted every active workspace of the account.
deleteConsumptionBudget deletes a target’s budget, so the target is unlimited again. Deleting it again is not an error.
Errors
These are the cases specific to DinoAI. For the error format and the codes every area shares, see Errors.Related
- Python SDK: DinoAI: agent definitions, the agent graph, settings, and the sync in
paradime.admin.dinoai. The SDK has no methods for consumption budgets. - Programmable agents: create agents in the app or in YAML, and how delegation works.
- DinoAI Programmable Agents API: run agents and read their output.
- Budget & Consumption: budgets and spend in the app.
- DinoAI warehouse access: the same setting in Workspace Settings > General.