> ## Documentation Index
> Fetch the complete documentation index at: https://docs.paradime.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Admin client: DinoAI

> List, create, update and delete DinoAI agent definitions, set the agent graph and workspace settings, and sync agents from code with paradime.admin.dinoai.

`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`](https://docs.paradime.io/developers/python-sdk/modules/dinoai-programmable-agents). For the GraphQL operations, see [DinoAI](https://docs.paradime.io/developers/graphql-api/admin-api/dinoai).

> [!NOTE]
>
> **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](https://docs.paradime.io/developers/python-sdk/modules/admin/index).

The examples on this page use this client:

```python theme={"system"}
from paradime import Paradime

paradime = Paradime(api_endpoint="API_ENDPOINT", api_secret="prdm_cmp_...", workspace_uid="WORKSPACE_UID")
```

> [!NOTE]
>
> 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`](#sync-agents-from-code).

## List agents

Iterates over the workspace's DinoAI agent definitions, from YAML and from the UI.

**workspace\_uid** `Optional[str]` (default: None)

The workspace to read, for a company API key.

**page\_size** `int` (default: 100)

How many agents to read per request, at most 500.

**Returns** `Iterator[DinoAiAgentDefinition]`

The agents, read one page at a time.

```python theme={"system"}
for agent in paradime.admin.dinoai.list_agents():
    print(agent.slug, agent.name, agent.source, agent.agents_squad)
```

## Get an agent

Reads one DinoAI agent definition.

**slug** `str` *required*

The agent's slug.

**workspace\_uid** `Optional[str]` (default: None)

The workspace to read, for a company API key.

**Returns** `Optional[DinoAiAgentDefinition]`

The agent, or `None` when no agent has this slug.

```python theme={"system"}
agent = paradime.admin.dinoai.get_agent("triager")
```

## 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.

**name** `str` *required*

The agent's display name.

**spec** `DinoAiAgentSpecInput` *required*

What the agent is and may do. A field you leave out is unset on the agent. See [Types](#types).

**slug** `Optional[str]` (default: None)

The agent's slug: lowercase letters, digits and single hyphens. Generated from the name when left out.

**slack\_bot\_name** `Optional[str]` (default: None)

The name that the agent's Slack messages show.

**slack\_bot\_icon\_url** `Optional[str]` (default: None)

The https URL of the icon that the agent's Slack messages show.

**workspace\_uid** `Optional[str]` (default: None)

The workspace to change, for a company API key.

**Returns** `DinoAiAgentDefinition`

The agent, as now stored.

```python theme={"system"}
from paradime.apis.admin.dinoai.types import (
    DinoAiAgentSlackSettingsInput,
    DinoAiAgentSpecInput,
    DinoAiAgentToolGateInput,
    DinoAiAgentToolGateMode,
)

agent = paradime.admin.dinoai.create_agent(
    "Triager",
    DinoAiAgentSpecInput(
        role="On-call analytics engineer",
        goal="Find why a Bolt run failed and propose a fix",
        backstory="You know the dbt project and the team's conventions.",
        tools=DinoAiAgentToolGateInput(mode=DinoAiAgentToolGateMode.DENYLIST, names=[]),
        slack=DinoAiAgentSlackSettingsInput(channel="#data-alerts"),
    ),
    slug="triager",
)
```

## 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`.

**slug** `str` *required*

The slug of the agent to change.

**name** `str` *required*

The agent's display name.

**spec** `DinoAiAgentSpecInput` *required*

What the agent is and may do.

**slack\_bot\_name** `Optional[str]` (default: None)

The name that the agent's Slack messages show.

**slack\_bot\_icon\_url** `Optional[str]` (default: None)

The icon that the agent's Slack messages show.

**workspace\_uid** `Optional[str]` (default: None)

The workspace to change, for a company API key.

**Returns** `DinoAiAgentDefinition`

The agent, as now stored.

```python theme={"system"}
from paradime.apis.admin.dinoai.types import DinoAiAgentModel, DinoAiAgentSpecInput

paradime.admin.dinoai.update_agent(
    "triager",
    "Triager",
    DinoAiAgentSpecInput(
        role="On-call analytics engineer",
        goal="Find why a Bolt run failed and propose a fix",
        backstory="You know the dbt project and the team's conventions.",
        model=DinoAiAgentModel.OPUS,
    ),
)
```

## Delete an agent

Deletes a DinoAI agent definition. An agent that another agent delegates to can't be deleted.

**slug** `str` *required*

The agent's slug.

**workspace\_uid** `Optional[str]` (default: None)

The workspace to change, for a company API key.

**Returns** `str`

The slug of the deleted agent.

```python theme={"system"}
paradime.admin.dinoai.delete_agent("triager")
```

## Set the agent graph

Replaces every delegation between the workspace's agents. The API refuses a cycle.

**edges** `Sequence[Tuple[str, str]]` *required*

`(from_slug, to_slug)` pairs: the first agent may delegate to the second.

**workspace\_uid** `Optional[str]` (default: None)

The workspace to change, for a company API key.

**Returns** `None`

This method returns nothing.

```python theme={"system"}
paradime.admin.dinoai.set_agent_graph([("triager", "fixer"), ("triager", "reporter")])
```

## Get DinoAI settings

Reads the workspace's DinoAI settings.

**workspace\_uid** `Optional[str]` (default: None)

The workspace to read, for a company API key.

**Returns** `Optional[DinoAiWorkspaceSettings]`

The settings: `sql_query_tool_enabled`, whether DinoAI may run SQL queries against the warehouse.

```python theme={"system"}
settings = paradime.admin.dinoai.get_settings()
print(settings.sql_query_tool_enabled)
```

## Set DinoAI settings

Changes the workspace's DinoAI settings. A setting you leave out keeps its value.

**sql\_query\_tool\_enabled** `Optional[bool]` (default: None)

Whether DinoAI may run SQL queries against the warehouse.

**workspace\_uid** `Optional[str]` (default: None)

The workspace to change, for a company API key.

**Returns** `Optional[DinoAiWorkspaceSettings]`

The settings now.

```python theme={"system"}
paradime.admin.dinoai.set_settings(sql_query_tool_enabled=False)
```

## 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.

**branch** `Optional[str]` (default: None)

The branch to read. The repository's default branch when left out.

**workspace\_uid** `Optional[str]` (default: None)

The workspace to sync, for a company API key.

**Returns** `AdminJob`

The job. Wait for it with [`admin.jobs.wait`](https://docs.paradime.io/developers/python-sdk/modules/admin/jobs#wait-for-a-job). Its result is a `DinoAiAgentSyncResult`, which counts the agents the sync added, updated and skipped.

```python theme={"system"}
job = paradime.admin.dinoai.sync_agents_from_code(branch="main")
job = paradime.admin.jobs.wait(job.id)
print(job.result.added, job.result.updated, job.result.skipped)
```

## Types

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

**DinoAiAgentSpecInput** `input`

**fields**

**role** `str` *required*

Who the agent is.

**goal** `str` *required*

What the agent works towards.

**backstory** `str` *required*

The context the agent works with.

**version** `Optional[int]`

The definition format version. 1 by default.

**model** `Optional[DinoAiAgentModel]`

The model tier: `HAIKU` (fastest), `SONNET` (balanced) or `OPUS` (most capable). The default when left out.

**model\_family** `Optional[str]`

The model family. The default when left out.

**environment** `Optional[str]`

The slug of the agent environment the agent runs in. The default agent environment when left out.

**tools** `Optional[DinoAiAgentToolGateInput]`

Which Paradime tools the agent may call: a `mode` (`ALLOWLIST` or `DENYLIST`) and the tool `names`.

**mcp\_tools** `Optional[DinoAiAgentToolGateInput]`

Which MCP server tools the agent may call.

**slack** `Optional[DinoAiAgentSlackSettingsInput]`

Where the agent posts in Slack: `channel` (by name or id), `answer_in` (`THREAD`, the default, or `CHANNEL`) and `updates` (`ALL`, the default, or `FINAL`).

**ms\_teams** `Optional[DinoAiAgentMsTeamsInput]`

Where the agent posts in Microsoft Teams: `team`, `channel`, `answer_in` and `updates`.

**jira** `Optional[DinoAiAgentJiraInput]`

How the agent files Jira issues: `default_watchers`.

**git\_writes** `Optional[DinoAiAgentGitWritesInput]`

What the agent may do to pull requests: `comment`, `edit` (push changes), `approve` and `merge`. Each is `False` by default.

**DinoAiAgentDefinition** `model`

**fields**

**slug** `str`

The agent's slug.

**name** `str`

The display name.

**source** `Optional[DinoAiAgentSource]`

`YAML` for an agent under `.dinoai/agents/`, `UI` for one created in Paradime or through the API.

**role, goal, backstory, version, model, model\_family** `various`

The spec fields, as stored.

**environment** `Optional[EnvironmentLink]`

The agent environment, with its `slug` and `name`.

**tools, mcp\_tools, slack, ms\_teams, jira, git\_writes** `Optional[model]`

The spec settings, as stored.

**agents\_squad** `Optional[List[str]]`

The slugs of the agents that this agent may delegate to (up to 500). `agents_squad_count` is how many there are.

**slack\_bot\_name, slack\_bot\_icon\_url** `Optional[str]`

The Slack bot fields.

**git\_path, git\_commit\_sha, synced\_at** `Optional`

For a YAML agent: the file, the commit and when it was synced.

**created\_at, updated\_at** `Optional[datetime]`

When the agent was created and last changed.


## Related topics

- [Admin client](https://docs.paradime.io/developers/python-sdk/modules/admin/index.md)
- [Admin client: integrations](https://docs.paradime.io/developers/python-sdk/modules/admin/integrations.md)
- [Admin client: environments](https://docs.paradime.io/developers/python-sdk/modules/admin/environments.md)
- [Admin client: usage](https://docs.paradime.io/developers/python-sdk/modules/admin/usage.md)
- [Admin client: jobs](https://docs.paradime.io/developers/python-sdk/modules/admin/jobs.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.