# Public Cloud › AI › AI Agents API

> Part of the OVHcloud developer hub. Index of every page and section: https://developers.eu.ovhcloud.com/llms.txt
> The Public Cloud product's sections: https://developers.eu.ovhcloud.com/reference/public-cloud/llms.txt
> Everything in one file: https://developers.eu.ovhcloud.com/llms-full.txt

> 16 operations of the OVHcloud API. Calls carry `authorization: Bearer $OVH_TOKEN`; the EU host is shown, Canada and the United States answer on api.ca.ovhcloud.com and api.us.ovhcloud.com.

Page: https://developers.eu.ovhcloud.com/reference/public-cloud/ai/ai-agents/

OpenAPI v1: https://api.eu.ovhcloud.com/1.0/__schemas/developer-hub-navigation/public-cloud/ai/ai-agents.json?format=openapi3
OpenAPI v2: https://api.eu.ovhcloud.com/v2/__schemas/developer-hub-navigation/public-cloud/ai/ai-agents.json?format=openapi3

## Operations

- `GET /publicCloud/project/{projectId}/ai/agents/agent` — List AI agents
- `POST /publicCloud/project/{projectId}/ai/agents/agent` — Create an AI agent
- `GET /publicCloud/project/{projectId}/ai/agents/agent/{agentId}` — Get an AI agent
- `PUT /publicCloud/project/{projectId}/ai/agents/agent/{agentId}` — Update an AI agent
- `DELETE /publicCloud/project/{projectId}/ai/agents/agent/{agentId}` — Delete an AI agent
- `POST /publicCloud/project/{projectId}/ai/agents/agent/{agentId}/redeploy` — Redeploy an AI agent, refreshing its runtime while keeping its data
- `POST /publicCloud/project/{projectId}/ai/agents/agent/{agentId}/token` — Issue a scoped access token for an AI agent
- `GET /publicCloud/project/{projectId}/ai/agents/preset/globalSettings` — Get the AI agent configuration settings fixed by OVHcloud
- `GET /publicCloud/project/{projectId}/ai/agents/preset/model/aiEndpointsProvider` — Get the OVHcloud AI Endpoints provider preset
- `GET /publicCloud/project/{projectId}/ai/agents/preset/template` — List built-in AI agent template presets
- `GET /publicCloud/project/{projectId}/ai/agents/preset/template/{templatePresetId}` — Get an AI agent template preset
- `GET /publicCloud/project/{projectId}/ai/agents/template` — List AI agent templates
- `POST /publicCloud/project/{projectId}/ai/agents/template` — Create an AI agent template
- `GET /publicCloud/project/{projectId}/ai/agents/template/{templateId}` — Get an AI agent template
- `PUT /publicCloud/project/{projectId}/ai/agents/template/{templateId}` — Update an AI agent template
- `DELETE /publicCloud/project/{projectId}/ai/agents/template/{templateId}` — Delete an AI agent template

## List AI agents

`GET /v2/publicCloud/project/{projectId}/ai/agents/agent`

Link: https://developers.eu.ovhcloud.com/reference/public-cloud/ai/ai-agents/#get-publiccloud-project-projectid-ai-agents-agent

**Status:** Stable production version  
**IAM actions:** `publicCloudProject:apiovh:ai/agents/agent/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `X-Pagination-Cursor` | header | string |  | Pagination cursor |
| `X-Pagination-Size` | header | integer |  | Pagination size |
| `projectId` | path | string | yes | Project ID |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | publicCloud.ai.agents.Agent[] | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `createdAt` | string (date-time) | read-only | Date of the AI agent creation |
| `currentState` | publicCloud.ai.agents.AgentCurrentState | read-only | Current state of the AI agent |
| `currentState.aiEndpoints` | boolean | read-only | Whether this AI agent carries the OVHcloud AI Endpoints provider preset |
| `currentState.aiEndpointsIntegratedAuth` | boolean | read-only | Whether OVHcloud provisioned the AI Endpoints credential for this agent, so the caller did not have to supply one |
| `currentState.enabled` | boolean | read-only | Actual running state of the AI agent. False when the agent is paused. |
| `currentState.endpointUrl` | string | read-only | URL to invoke the AI agent |
| `currentState.name` | string | read-only | Name of the AI agent |
| `id` | string | read-only | Unique identifier of the AI agent |
| `resourceStatus` | common.ResourceStatusEnum | read-only | Reflects the readiness of the AI agent: READY, SUSPENDED when it is paused, or DELETING on the response to its deletion — one of `CREATING`, `CREATION_PLANNED`, `DELETING`, `ERROR`, `OUT_OF_SYNC`, `READY`, `SUSPENDED`, `UNKNOWN`, `UPDATING` |
| `targetSpec` | publicCloud.ai.agents.AgentTargetSpec | read-only | Last target specification of the AI agent |
| `targetSpec.enabled` | boolean | read-only | Desired running state of the AI agent. False when the agent is paused. |
| `targetSpec.name` | string | read-only | Name of the AI agent |
| `updatedAt` | string (date-time) | read-only | Date of the last AI agent update |

```json
[
  {
    "createdAt": "2024-01-01T12:00:00Z",
    "currentState": {
      "aiEndpoints": true,
      "aiEndpointsIntegratedAuth": true,
      "enabled": true,
      "endpointUrl": "string",
      "name": "string"
    },
    "id": "string",
    "resourceStatus": "CREATING",
    "targetSpec": {
      "enabled": true,
      "name": "string"
    },
    "updatedAt": "2024-01-01T12:00:00Z"
  }
]
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/v2/publicCloud/project/{projectId}/ai/agents/agent" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/v2/publicCloud/project/{projectId}/ai/agents/agent")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/v2/publicCloud/project/{projectId}/ai/agents/agent");

print_r($result);
?>
```

## Create an AI agent

`POST /v2/publicCloud/project/{projectId}/ai/agents/agent`

Link: https://developers.eu.ovhcloud.com/reference/public-cloud/ai/ai-agents/#post-publiccloud-project-projectid-ai-agents-agent

**Status:** Stable production version  
**IAM actions:** `publicCloudProject:apiovh:ai/agents/agent/create`

Creates an AI agent: a hosted assistant that answers on its own URL, given by `currentState.endpointUrl`, and reached with a token from the `token` action. An agent runs a model with a persona, plus whatever tools, memory and channels its configuration gives it. That configuration can come from a ready-made one published by OVHcloud, from a template of your own, or from settings supplied here — or from none of them, leaving an agent that cannot answer until it is given a model. Parts of it that OVHcloud manages are rejected here; the `globalSettings` preset says which. This is the only point at which this API sets an agent's configuration: from here on the agent holds its own and is configured through its endpoint. Create it paused to finish preparing it before it answers anyone.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `projectId` | path | string | yes | Project ID |

### Request body (required)

Type: `publicCloud.ai.agents.AgentCreation`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `targetSpec` | publicCloud.ai.agents.AgentCreationTargetSpec | yes | Desired specification of the AI agent to create |
| `targetSpec.config` | publicCloud.ai.agents.Config |  | Optional AI agent configuration seeded at creation, combinable with or used instead of template. Set only here, at creation time; read and changed afterward through the AI agent itself, not through this resource. |
| `targetSpec.config.agent` | publicCloud.ai.agents.AgentConfig |  | The agent's identity settings, such as its display name. |
| `targetSpec.config.auth` | publicCloud.ai.agents.AuthConfig |  | Authentication settings for the agent's HTTP API. Unset falls back to requiring a token issued by the agent itself. |
| `targetSpec.config.builtins` | publicCloud.ai.agents.BuiltinsConfig |  | Toggles for the agent's built-in capabilities, such as network access and web search. |
| `targetSpec.config.channels` | publicCloud.ai.agents.ChannelsConfig |  | Messaging-platform integrations, such as Telegram and Webex, the agent can send and receive messages through. |
| `targetSpec.config.exec` | publicCloud.ai.agents.ExecConfig |  | Remote command-execution settings. Unset or disabled means the agent cannot run shell commands. |
| `targetSpec.config.llm` | publicCloud.ai.agents.LlmConfig |  | The language model this agent uses to respond, including sampling settings and failover targets. |
| `targetSpec.config.mcpIndexer` | publicCloud.ai.agents.McpIndexerConfig |  | Settings for searchable tool indexing, required when any connected tool server uses indexed mode instead of listing all its tools directly. |
| `targetSpec.config.mcpServers` | object |  | Connected MCP tool servers, keyed by a caller-chosen server name. |
| `targetSpec.config.memory` | publicCloud.ai.agents.MemoryConfig |  | Long-term memory settings that let the agent retain and later recall facts across conversations. |
| `targetSpec.config.profiles` | publicCloud.ai.agents.AgentsConfig |  | Specialized sub-personas this agent can delegate tasks to. |
| `targetSpec.config.providers` | object |  | Shared pool of language-model provider connections, keyed by a caller-chosen provider id and referenced by name elsewhere in this configuration. |
| `targetSpec.config.relay` | publicCloud.ai.agents.RelayConfig |  | Settings for hosting a local messaging relay that other participants can join. |
| `targetSpec.config.skills` | publicCloud.ai.agents.SkillsConfig |  | Reusable skills the agent can invoke: named bundles of instructions it can follow on demand. |
| `targetSpec.config.soul` | string |  | The agent's persona and system prompt: free-form text describing who it is, how it should behave, and any standing instructions it should always follow. |
| `targetSpec.config.toolPermissions` | publicCloud.ai.agents.ToolPermissionsConfig |  | Rules applied to every tool call, matched on its name, arguments and what triggered the turn: before the call runs and — for a rule that says so — on what it returned. A matching rule allows the call, refuses it, asks a human, or defers to an LLM reviewer. |
| `targetSpec.config.version` | string |  | Configuration format version. Defaults to '1.0' for agents created before this field existed. |
| `targetSpec.config.workspace` | publicCloud.ai.agents.Workspace |  | The agent's file storage: an ordered list of mount points and the backend serving each one. |
| `targetSpec.enabled` | boolean |  | Desired running state of the AI agent. When false the agent is created paused. Defaults to true |
| `targetSpec.name` | string | yes | Name of the AI agent, at most 192 bytes of UTF-8, free of control characters. Unique among this project's agents, with one exception: an agent created before this API enforced uniqueness may share its name with a newer one. Can be changed afterwards through the update endpoint |
| `targetSpec.template` | publicCloud.ai.agents.AgentTemplateRef |  | Reference to a template used to seed the AI agent configuration once, at creation time |
| `targetSpec.template.id` | string | yes | Identifier of the template to seed the AI agent configuration from. Honored only at creation time. |

```json
{
  "targetSpec": {
    "config": {
      "agent": {
        "name": "string"
      },
      "auth": {
        "kagentJwt": {
          "allowUnlimited": true,
          "enabled": true,
          "maxTtlSeconds": 0,
          "secretB64": "string"
        },
        "mode": "KAGENT_JWT",
        "oauth2": {
          "audience": "string",
          "issuer": "string",
          "jwksUri": "string",
          "ownerSub": "string",
          "requiredScopes": [
            "string"
          ]
        }
      },
      "builtins": {
        "network": true,
        "search": true,
        "searchApiKey": "string",
        "searchProvider": "string",
        "toolsDeny": [
          "string"
        ],
        "wizard": true
      },
      "channels": {
        "telegram": {
          "botToken": "string",
          "enabled": true,
          "webhookSecret": "string"
        },
        "webex": {
          "accessToken": "string",
          "enabled": true,
          "webhookSecret": "string"
        }
      },
      "exec": {
        "apiKey": "string",
        "autoSuspendIdleSeconds": 0,
        "baseUrl": "string",
        "defaultImage": "string",
        "enabled": true
      },
      "llm": {
        "failover": {
          "on": [
            "AUTH"
          ]
        },
        "fallbacks": [
          {
            "maxTokens": 0,
            "model": "string",
            "providerId": "string",
            "temperature": 0
          }
        ],
        "maxContextMessages": 0,
        "maxTokens": 0,
        "model": "string",
        "providerId": "string",
  …
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | publicCloud.ai.agents.Agent | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `createdAt` | string (date-time) | read-only | Date of the AI agent creation |
| `currentState` | publicCloud.ai.agents.AgentCurrentState | read-only | Current state of the AI agent |
| `currentState.aiEndpoints` | boolean | read-only | Whether this AI agent carries the OVHcloud AI Endpoints provider preset |
| `currentState.aiEndpointsIntegratedAuth` | boolean | read-only | Whether OVHcloud provisioned the AI Endpoints credential for this agent, so the caller did not have to supply one |
| `currentState.enabled` | boolean | read-only | Actual running state of the AI agent. False when the agent is paused. |
| `currentState.endpointUrl` | string | read-only | URL to invoke the AI agent |
| `currentState.name` | string | read-only | Name of the AI agent |
| `id` | string | read-only | Unique identifier of the AI agent |
| `resourceStatus` | common.ResourceStatusEnum | read-only | Reflects the readiness of the AI agent: READY, SUSPENDED when it is paused, or DELETING on the response to its deletion — one of `CREATING`, `CREATION_PLANNED`, `DELETING`, `ERROR`, `OUT_OF_SYNC`, `READY`, `SUSPENDED`, `UNKNOWN`, `UPDATING` |
| `targetSpec` | publicCloud.ai.agents.AgentTargetSpec | read-only | Last target specification of the AI agent |
| `targetSpec.enabled` | boolean | read-only | Desired running state of the AI agent. False when the agent is paused. |
| `targetSpec.name` | string | read-only | Name of the AI agent |
| `updatedAt` | string (date-time) | read-only | Date of the last AI agent update |

```json
{
  "createdAt": "2024-01-01T12:00:00Z",
  "currentState": {
    "aiEndpoints": true,
    "aiEndpointsIntegratedAuth": true,
    "enabled": true,
    "endpointUrl": "string",
    "name": "string"
  },
  "id": "string",
  "resourceStatus": "CREATING",
  "targetSpec": {
    "enabled": true,
    "name": "string"
  },
  "updatedAt": "2024-01-01T12:00:00Z"
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/v2/publicCloud/project/{projectId}/ai/agents/agent" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN" \
  -H "content-type: application/json" \
  -d '{ }'
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

# Request body type: publicCloud.ai.agents.AgentCreation
result = client.post("/v2/publicCloud/project/{projectId}/ai/agents/agent",
	targetSpec = None, # Desired specification of the AI agent to create (type: publicCloud.ai.agents.AgentCreationTargetSpec)
)

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

// Request body type: publicCloud.ai.agents.AgentCreation
$result = $ovh->post("/v2/publicCloud/project/{projectId}/ai/agents/agent", array(
	targetSpec => null, // Desired specification of the AI agent to create (type: publicCloud.ai.agents.AgentCreationTargetSpec)
));

print_r($result);
?>
```

## Get an AI agent

`GET /v2/publicCloud/project/{projectId}/ai/agents/agent/{agentId}`

Link: https://developers.eu.ovhcloud.com/reference/public-cloud/ai/ai-agents/#get-publiccloud-project-projectid-ai-agents-agent-agentid

**Status:** Stable production version  
**IAM actions:** `publicCloudProject:apiovh:ai/agents/agent/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `agentId` | path | string | yes | Agent ID |
| `projectId` | path | string | yes | Project ID |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | publicCloud.ai.agents.Agent | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `createdAt` | string (date-time) | read-only | Date of the AI agent creation |
| `currentState` | publicCloud.ai.agents.AgentCurrentState | read-only | Current state of the AI agent |
| `currentState.aiEndpoints` | boolean | read-only | Whether this AI agent carries the OVHcloud AI Endpoints provider preset |
| `currentState.aiEndpointsIntegratedAuth` | boolean | read-only | Whether OVHcloud provisioned the AI Endpoints credential for this agent, so the caller did not have to supply one |
| `currentState.enabled` | boolean | read-only | Actual running state of the AI agent. False when the agent is paused. |
| `currentState.endpointUrl` | string | read-only | URL to invoke the AI agent |
| `currentState.name` | string | read-only | Name of the AI agent |
| `id` | string | read-only | Unique identifier of the AI agent |
| `resourceStatus` | common.ResourceStatusEnum | read-only | Reflects the readiness of the AI agent: READY, SUSPENDED when it is paused, or DELETING on the response to its deletion — one of `CREATING`, `CREATION_PLANNED`, `DELETING`, `ERROR`, `OUT_OF_SYNC`, `READY`, `SUSPENDED`, `UNKNOWN`, `UPDATING` |
| `targetSpec` | publicCloud.ai.agents.AgentTargetSpec | read-only | Last target specification of the AI agent |
| `targetSpec.enabled` | boolean | read-only | Desired running state of the AI agent. False when the agent is paused. |
| `targetSpec.name` | string | read-only | Name of the AI agent |
| `updatedAt` | string (date-time) | read-only | Date of the last AI agent update |

```json
{
  "createdAt": "2024-01-01T12:00:00Z",
  "currentState": {
    "aiEndpoints": true,
    "aiEndpointsIntegratedAuth": true,
    "enabled": true,
    "endpointUrl": "string",
    "name": "string"
  },
  "id": "string",
  "resourceStatus": "CREATING",
  "targetSpec": {
    "enabled": true,
    "name": "string"
  },
  "updatedAt": "2024-01-01T12:00:00Z"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/v2/publicCloud/project/{projectId}/ai/agents/agent/{agentId}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/v2/publicCloud/project/{projectId}/ai/agents/agent/{agentId}")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/v2/publicCloud/project/{projectId}/ai/agents/agent/{agentId}");

print_r($result);
?>
```

## Update an AI agent

`PUT /v2/publicCloud/project/{projectId}/ai/agents/agent/{agentId}`

Link: https://developers.eu.ovhcloud.com/reference/public-cloud/ai/ai-agents/#put-publiccloud-project-projectid-ai-agents-agent-agentid

**Status:** Stable production version  
**IAM actions:** `publicCloudProject:apiovh:ai/agents/agent/edit`

`targetSpec.enabled` is mandatory, including on an update whose only intent is a rename. Restating the agent's current running state changes nothing; stating the other one pauses or resumes it. `targetSpec.name` is optional: omitting it, or restating the current name, leaves it untouched. Any other name renames the agent and redeploys it, keeping its identifier, its access tokens, its configuration and its data, and re-applying its paused state. A name another agent in the project already holds is rejected. The configuration is not settable here; it is read and changed through the agent itself.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `agentId` | path | string | yes | Agent ID |
| `projectId` | path | string | yes | Project ID |

### Request body (required)

Type: `publicCloud.ai.agents.AgentUpdate`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `targetSpec` | publicCloud.ai.agents.AgentUpdateTargetSpec | yes | Desired specification to reconcile the AI agent toward |
| `targetSpec.enabled` | boolean | yes | Desired running state of the AI agent. Set to false to pause it, true to resume it |
| `targetSpec.name` | string |  | New name for the AI agent, at most 192 bytes of UTF-8, free of control characters. Omitted or null leaves the current name untouched, and so does restating the name the agent already has. Rejected if another agent in this project already has it, with the same exception as at creation. Renaming redeploys the agent on its current runtime component |

```json
{
  "targetSpec": {
    "enabled": true,
    "name": "string"
  }
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | publicCloud.ai.agents.Agent | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `createdAt` | string (date-time) | read-only | Date of the AI agent creation |
| `currentState` | publicCloud.ai.agents.AgentCurrentState | read-only | Current state of the AI agent |
| `currentState.aiEndpoints` | boolean | read-only | Whether this AI agent carries the OVHcloud AI Endpoints provider preset |
| `currentState.aiEndpointsIntegratedAuth` | boolean | read-only | Whether OVHcloud provisioned the AI Endpoints credential for this agent, so the caller did not have to supply one |
| `currentState.enabled` | boolean | read-only | Actual running state of the AI agent. False when the agent is paused. |
| `currentState.endpointUrl` | string | read-only | URL to invoke the AI agent |
| `currentState.name` | string | read-only | Name of the AI agent |
| `id` | string | read-only | Unique identifier of the AI agent |
| `resourceStatus` | common.ResourceStatusEnum | read-only | Reflects the readiness of the AI agent: READY, SUSPENDED when it is paused, or DELETING on the response to its deletion — one of `CREATING`, `CREATION_PLANNED`, `DELETING`, `ERROR`, `OUT_OF_SYNC`, `READY`, `SUSPENDED`, `UNKNOWN`, `UPDATING` |
| `targetSpec` | publicCloud.ai.agents.AgentTargetSpec | read-only | Last target specification of the AI agent |
| `targetSpec.enabled` | boolean | read-only | Desired running state of the AI agent. False when the agent is paused. |
| `targetSpec.name` | string | read-only | Name of the AI agent |
| `updatedAt` | string (date-time) | read-only | Date of the last AI agent update |

```json
{
  "createdAt": "2024-01-01T12:00:00Z",
  "currentState": {
    "aiEndpoints": true,
    "aiEndpointsIntegratedAuth": true,
    "enabled": true,
    "endpointUrl": "string",
    "name": "string"
  },
  "id": "string",
  "resourceStatus": "CREATING",
  "targetSpec": {
    "enabled": true,
    "name": "string"
  },
  "updatedAt": "2024-01-01T12:00:00Z"
}
```

### Example

```bash
curl -X PUT \
  "https://api.eu.ovhcloud.com/v2/publicCloud/project/{projectId}/ai/agents/agent/{agentId}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN" \
  -H "content-type: application/json" \
  -d '{ }'
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

# Request body type: publicCloud.ai.agents.AgentUpdate
result = client.put("/v2/publicCloud/project/{projectId}/ai/agents/agent/{agentId}",
	targetSpec = None, # Desired specification to reconcile the AI agent toward (type: publicCloud.ai.agents.AgentUpdateTargetSpec)
)

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

// Request body type: publicCloud.ai.agents.AgentUpdate
$result = $ovh->put("/v2/publicCloud/project/{projectId}/ai/agents/agent/{agentId}", array(
	targetSpec => null, // Desired specification to reconcile the AI agent toward (type: publicCloud.ai.agents.AgentUpdateTargetSpec)
));

print_r($result);
?>
```

## Delete an AI agent

`DELETE /v2/publicCloud/project/{projectId}/ai/agents/agent/{agentId}`

Link: https://developers.eu.ovhcloud.com/reference/public-cloud/ai/ai-agents/#delete-publiccloud-project-projectid-ai-agents-agent-agentid

**Status:** Stable production version  
**IAM actions:** `publicCloudProject:apiovh:ai/agents/agent/delete`

Deletion is asynchronous: the response describes the agent with `resourceStatus: DELETING`.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `agentId` | path | string | yes | Agent ID |
| `projectId` | path | string | yes | Project ID |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | publicCloud.ai.agents.Agent | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `createdAt` | string (date-time) | read-only | Date of the AI agent creation |
| `currentState` | publicCloud.ai.agents.AgentCurrentState | read-only | Current state of the AI agent |
| `currentState.aiEndpoints` | boolean | read-only | Whether this AI agent carries the OVHcloud AI Endpoints provider preset |
| `currentState.aiEndpointsIntegratedAuth` | boolean | read-only | Whether OVHcloud provisioned the AI Endpoints credential for this agent, so the caller did not have to supply one |
| `currentState.enabled` | boolean | read-only | Actual running state of the AI agent. False when the agent is paused. |
| `currentState.endpointUrl` | string | read-only | URL to invoke the AI agent |
| `currentState.name` | string | read-only | Name of the AI agent |
| `id` | string | read-only | Unique identifier of the AI agent |
| `resourceStatus` | common.ResourceStatusEnum | read-only | Reflects the readiness of the AI agent: READY, SUSPENDED when it is paused, or DELETING on the response to its deletion — one of `CREATING`, `CREATION_PLANNED`, `DELETING`, `ERROR`, `OUT_OF_SYNC`, `READY`, `SUSPENDED`, `UNKNOWN`, `UPDATING` |
| `targetSpec` | publicCloud.ai.agents.AgentTargetSpec | read-only | Last target specification of the AI agent |
| `targetSpec.enabled` | boolean | read-only | Desired running state of the AI agent. False when the agent is paused. |
| `targetSpec.name` | string | read-only | Name of the AI agent |
| `updatedAt` | string (date-time) | read-only | Date of the last AI agent update |

```json
{
  "createdAt": "2024-01-01T12:00:00Z",
  "currentState": {
    "aiEndpoints": true,
    "aiEndpointsIntegratedAuth": true,
    "enabled": true,
    "endpointUrl": "string",
    "name": "string"
  },
  "id": "string",
  "resourceStatus": "CREATING",
  "targetSpec": {
    "enabled": true,
    "name": "string"
  },
  "updatedAt": "2024-01-01T12:00:00Z"
}
```

### Example

```bash
curl -X DELETE \
  "https://api.eu.ovhcloud.com/v2/publicCloud/project/{projectId}/ai/agents/agent/{agentId}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.delete("/v2/publicCloud/project/{projectId}/ai/agents/agent/{agentId}")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->delete("/v2/publicCloud/project/{projectId}/ai/agents/agent/{agentId}");

print_r($result);
?>
```

## Redeploy an AI agent, refreshing its runtime while keeping its data

`POST /v2/publicCloud/project/{projectId}/ai/agents/agent/{agentId}/redeploy`

Link: https://developers.eu.ovhcloud.com/reference/public-cloud/ai/ai-agents/#post-publiccloud-project-projectid-ai-agents-agent-agentid-redeploy

**Status:** Stable production version  
**IAM actions:** `publicCloudProject:apiovh:ai/agents/agent/redeploy`

Refreshes the agent's runtime without touching its configuration or the data it holds.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `agentId` | path | string | yes | Agent ID |
| `projectId` | path | string | yes | Project ID |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | publicCloud.ai.agents.Agent | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `createdAt` | string (date-time) | read-only | Date of the AI agent creation |
| `currentState` | publicCloud.ai.agents.AgentCurrentState | read-only | Current state of the AI agent |
| `currentState.aiEndpoints` | boolean | read-only | Whether this AI agent carries the OVHcloud AI Endpoints provider preset |
| `currentState.aiEndpointsIntegratedAuth` | boolean | read-only | Whether OVHcloud provisioned the AI Endpoints credential for this agent, so the caller did not have to supply one |
| `currentState.enabled` | boolean | read-only | Actual running state of the AI agent. False when the agent is paused. |
| `currentState.endpointUrl` | string | read-only | URL to invoke the AI agent |
| `currentState.name` | string | read-only | Name of the AI agent |
| `id` | string | read-only | Unique identifier of the AI agent |
| `resourceStatus` | common.ResourceStatusEnum | read-only | Reflects the readiness of the AI agent: READY, SUSPENDED when it is paused, or DELETING on the response to its deletion — one of `CREATING`, `CREATION_PLANNED`, `DELETING`, `ERROR`, `OUT_OF_SYNC`, `READY`, `SUSPENDED`, `UNKNOWN`, `UPDATING` |
| `targetSpec` | publicCloud.ai.agents.AgentTargetSpec | read-only | Last target specification of the AI agent |
| `targetSpec.enabled` | boolean | read-only | Desired running state of the AI agent. False when the agent is paused. |
| `targetSpec.name` | string | read-only | Name of the AI agent |
| `updatedAt` | string (date-time) | read-only | Date of the last AI agent update |

```json
{
  "createdAt": "2024-01-01T12:00:00Z",
  "currentState": {
    "aiEndpoints": true,
    "aiEndpointsIntegratedAuth": true,
    "enabled": true,
    "endpointUrl": "string",
    "name": "string"
  },
  "id": "string",
  "resourceStatus": "CREATING",
  "targetSpec": {
    "enabled": true,
    "name": "string"
  },
  "updatedAt": "2024-01-01T12:00:00Z"
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/v2/publicCloud/project/{projectId}/ai/agents/agent/{agentId}/redeploy" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.post("/v2/publicCloud/project/{projectId}/ai/agents/agent/{agentId}/redeploy")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->post("/v2/publicCloud/project/{projectId}/ai/agents/agent/{agentId}/redeploy");

print_r($result);
?>
```

## Issue a scoped access token for an AI agent

`POST /v2/publicCloud/project/{projectId}/ai/agents/agent/{agentId}/token`

Link: https://developers.eu.ovhcloud.com/reference/public-cloud/ai/ai-agents/#post-publiccloud-project-projectid-ai-agents-agent-agentid-token

**Status:** Stable production version  
**IAM actions:** `publicCloudProject:apiovh:ai/agents/agent/token/create`

Returns a bearer token to present to the agent at `currentState.endpointUrl`. The token is returned once, here, and is never readable afterwards. Both body fields are optional: send `{}` for the defaults, which are the VIEWER role and the agent's own default lifetime. A lifetime longer than the agent's own maximum is rejected.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `agentId` | path | string | yes | Agent ID |
| `projectId` | path | string | yes | Project ID |

### Request body (required)

Type: `publicCloud.ai.agents.AgentTokenCreation`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `lifetimeSeconds` | integer |  | Token lifetime in seconds. Defaults to the agent's default. |
| `role` | publicCloud.ai.agents.AgentTokenRoleEnum |  | Role granted to the minted token. Defaults to VIEWER. — one of `ADMIN`, `OPERATOR`, `USER`, `VIEWER` |

```json
{
  "lifetimeSeconds": 0,
  "role": "ADMIN"
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | publicCloud.ai.agents.AgentToken | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `expiresAt` | string (date-time) | read-only | Expiration date of the token. Null when the token does not expire. |
| `role` | publicCloud.ai.agents.AgentTokenRoleEnum | read-only | Role granted to the token — one of `ADMIN`, `OPERATOR`, `USER`, `VIEWER` |
| `token` | string | read-only | Bearer token used to authenticate against the AI agent. Returned only once, at mint time. |

```json
{
  "expiresAt": "2024-01-01T12:00:00Z",
  "role": "ADMIN",
  "token": "string"
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/v2/publicCloud/project/{projectId}/ai/agents/agent/{agentId}/token" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN" \
  -H "content-type: application/json" \
  -d '{ }'
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

# Request body type: publicCloud.ai.agents.AgentTokenCreation
result = client.post("/v2/publicCloud/project/{projectId}/ai/agents/agent/{agentId}/token",
	lifetimeSeconds = None, # Token lifetime in seconds. Defaults to the agent's default. (type: integer, nullable)
	role = None, # Role granted to the minted token. Defaults to VIEWER. (type: publicCloud.ai.agents.AgentTokenRoleEnum, nullable)
)

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

// Request body type: publicCloud.ai.agents.AgentTokenCreation
$result = $ovh->post("/v2/publicCloud/project/{projectId}/ai/agents/agent/{agentId}/token", array(
	lifetimeSeconds => null, // Token lifetime in seconds. Defaults to the agent's default. (type: integer, nullable)
	role => null, // Role granted to the minted token. Defaults to VIEWER. (type: publicCloud.ai.agents.AgentTokenRoleEnum, nullable)
));

print_r($result);
?>
```

## Get the AI agent configuration settings fixed by OVHcloud

`GET /v2/publicCloud/project/{projectId}/ai/agents/preset/globalSettings`

Link: https://developers.eu.ovhcloud.com/reference/public-cloud/ai/ai-agents/#get-publiccloud-project-projectid-ai-agents-preset-globalsettings

**Status:** Stable production version  
**IAM actions:** `publicCloudProject:apiovh:ai/agents/preset/globalSettings/get`

Part of an AI agent's configuration is managed by OVHcloud rather than by you: how callers authenticate to the agent, and whether the agent can run code. This route says which parts those are, so a configuration can be prepared knowing what will be accepted — anything OVHcloud manages is rejected if you set it yourself, whether on an agent or on a template. What it reports does not change from one agent to the next.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `projectId` | path | string | yes | Project ID |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | publicCloud.ai.agents.GlobalSettings | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `agentConfig` | publicCloud.ai.agents.GlobalAgentConfig | read-only | What this deployment reserves of, and offers of, an agent's own configuration |
| `agentConfig.auth` | publicCloud.ai.agents.GlobalAgentConfigAuth | read-only | Reservation covering the agent's authentication block |
| `agentConfig.auth.managed` | boolean | read-only | Whether the agent's auth block is reserved by the deployment, and so neither settable at creation nor editable afterward |
| `agentConfig.exec` | publicCloud.ai.agents.GlobalAgentConfigExec | read-only | Availability of the agent's code-execution blocks |
| `agentConfig.exec.enabled` | boolean | read-only | Whether an agent's configuration may carry the code-execution blocks (config.exec and config.workspace.zerofs). When false, a creation or template naming either is refused. |

```json
{
  "agentConfig": {
    "auth": {
      "managed": true
    },
    "exec": {
      "enabled": true
    }
  }
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/v2/publicCloud/project/{projectId}/ai/agents/preset/globalSettings" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/v2/publicCloud/project/{projectId}/ai/agents/preset/globalSettings")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/v2/publicCloud/project/{projectId}/ai/agents/preset/globalSettings");

print_r($result);
?>
```

## Get the OVHcloud AI Endpoints provider preset

`GET /v2/publicCloud/project/{projectId}/ai/agents/preset/model/aiEndpointsProvider`

Link: https://developers.eu.ovhcloud.com/reference/public-cloud/ai/ai-agents/#get-publiccloud-project-projectid-ai-agents-preset-model-aiendpointsprovider

**Status:** Stable production version  
**IAM actions:** `publicCloudProject:apiovh:ai/agents/preset/model/aiEndpointsProvider/get`

States whether the OVHcloud AI Endpoints provider preset can be selected, whether OVHcloud provisions its credential so the caller need not supply one, the base URL whose `/models` sub-path lists the models available, and the model used when the caller names none.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `projectId` | path | string | yes | Project ID |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | publicCloud.ai.agents.AIEndpointsPreset | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `apiBase` | string | read-only | OpenAI-compatible base URL, published so a client can list models from its /models sub-path |
| `defaultModel` | string | read-only | Model seeded when the caller states none. Empty when this deployment states no default. |
| `enabled` | boolean | read-only | Whether the OVHcloud AI Endpoints provider preset is available on this deployment |
| `integratedAuth` | boolean | read-only | Whether OVHcloud provisions the AI Endpoints credential for the agent, so the caller does not have to supply one |

```json
{
  "apiBase": "string",
  "defaultModel": "string",
  "enabled": true,
  "integratedAuth": true
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/v2/publicCloud/project/{projectId}/ai/agents/preset/model/aiEndpointsProvider" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/v2/publicCloud/project/{projectId}/ai/agents/preset/model/aiEndpointsProvider")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/v2/publicCloud/project/{projectId}/ai/agents/preset/model/aiEndpointsProvider");

print_r($result);
?>
```

## List built-in AI agent template presets

`GET /v2/publicCloud/project/{projectId}/ai/agents/preset/template`

Link: https://developers.eu.ovhcloud.com/reference/public-cloud/ai/ai-agents/#get-publiccloud-project-projectid-ai-agents-preset-template

**Status:** Stable production version  
**IAM actions:** `publicCloudProject:apiovh:ai/agents/preset/template/get`

Presets are ready-made configurations OVHcloud publishes, offered alongside the templates a caller writes for themselves. Pass a preset's `id` as `targetSpec.template.id` on an agent creation to build an agent from it. Identifiers carry a reserved prefix, so a client can tell a preset from a template of its own.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `X-Pagination-Cursor` | header | string |  | Pagination cursor |
| `X-Pagination-Size` | header | integer |  | Pagination size |
| `projectId` | path | string | yes | Project ID |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | publicCloud.ai.agents.TemplatePreset[] | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `aiEndpoints` | boolean | read-only | Whether an agent created from this preset uses the OVHcloud AI Endpoints provider preset |
| `aiEndpointsIntegratedAuth` | boolean | read-only | Whether the AI Endpoints credential is minted by this service rather than supplied by the caller |
| `description` | string | read-only | What this preset is for. Empty when the deployment states none. |
| `id` | string | read-only | Identifier to pass as targetSpec.template.id when creating an agent from this preset |
| `name` | string | read-only | Human-readable name of the preset |

```json
[
  {
    "aiEndpoints": true,
    "aiEndpointsIntegratedAuth": true,
    "description": "string",
    "id": "string",
    "name": "string"
  }
]
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/v2/publicCloud/project/{projectId}/ai/agents/preset/template" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/v2/publicCloud/project/{projectId}/ai/agents/preset/template")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/v2/publicCloud/project/{projectId}/ai/agents/preset/template");

print_r($result);
?>
```

## Get an AI agent template preset

`GET /v2/publicCloud/project/{projectId}/ai/agents/preset/template/{templatePresetId}`

Link: https://developers.eu.ovhcloud.com/reference/public-cloud/ai/ai-agents/#get-publiccloud-project-projectid-ai-agents-preset-template-templatepresetid

**Status:** Stable production version  
**IAM actions:** `publicCloudProject:apiovh:ai/agents/preset/template/get`

A preset is a ready-made configuration OVHcloud publishes, offered alongside the templates a caller writes for themselves. Pass its `id` as `targetSpec.template.id` on an agent creation to build an agent from it. The identifier carries a reserved prefix, so a client can tell a preset from a template of its own.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `projectId` | path | string | yes | Project ID |
| `templatePresetId` | path | string | yes | Template preset ID |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | publicCloud.ai.agents.TemplatePreset | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `aiEndpoints` | boolean | read-only | Whether an agent created from this preset uses the OVHcloud AI Endpoints provider preset |
| `aiEndpointsIntegratedAuth` | boolean | read-only | Whether the AI Endpoints credential is minted by this service rather than supplied by the caller |
| `description` | string | read-only | What this preset is for. Empty when the deployment states none. |
| `id` | string | read-only | Identifier to pass as targetSpec.template.id when creating an agent from this preset |
| `name` | string | read-only | Human-readable name of the preset |

```json
{
  "aiEndpoints": true,
  "aiEndpointsIntegratedAuth": true,
  "description": "string",
  "id": "string",
  "name": "string"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/v2/publicCloud/project/{projectId}/ai/agents/preset/template/{templatePresetId}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/v2/publicCloud/project/{projectId}/ai/agents/preset/template/{templatePresetId}")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/v2/publicCloud/project/{projectId}/ai/agents/preset/template/{templatePresetId}");

print_r($result);
?>
```

## List AI agent templates

`GET /v2/publicCloud/project/{projectId}/ai/agents/template`

Link: https://developers.eu.ovhcloud.com/reference/public-cloud/ai/ai-agents/#get-publiccloud-project-projectid-ai-agents-template

**Status:** Stable production version  
**IAM actions:** `publicCloudProject:apiovh:ai/agents/template/get`

The ready-made configurations OVHcloud publishes are absent from this list. They are served by the `preset/template` node.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `X-Pagination-Cursor` | header | string |  | Pagination cursor |
| `X-Pagination-Size` | header | integer |  | Pagination size |
| `projectId` | path | string | yes | Project ID |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | publicCloud.ai.agents.Template[] | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `createdAt` | string (date-time) | read-only | Date of the template creation |
| `id` | string | read-only | Unique identifier of the template |
| `resourceStatus` | common.ResourceStatusEnum | read-only | Reflects the readiness of the template: READY, or DELETING on the response to its deletion — one of `CREATING`, `CREATION_PLANNED`, `DELETING`, `ERROR`, `OUT_OF_SYNC`, `READY`, `SUSPENDED`, `UNKNOWN`, `UPDATING` |
| `source` | publicCloud.ai.agents.TemplateSourceEnum | read-only | Distinguishes built-in (code-defined) from user-authored templates — one of `BUILTIN`, `USER` |
| `targetSpec` | publicCloud.ai.agents.TemplateTargetSpec | read-only | Desired specification to replace the template with |
| `targetSpec.config` | publicCloud.ai.agents.Config |  | Templated AI agent configuration |
| `targetSpec.config.agent` | publicCloud.ai.agents.AgentConfig |  | The agent's identity settings, such as its display name. |
| `targetSpec.config.auth` | publicCloud.ai.agents.AuthConfig |  | Authentication settings for the agent's HTTP API. Unset falls back to requiring a token issued by the agent itself. |
| `targetSpec.config.builtins` | publicCloud.ai.agents.BuiltinsConfig |  | Toggles for the agent's built-in capabilities, such as network access and web search. |
| `targetSpec.config.channels` | publicCloud.ai.agents.ChannelsConfig |  | Messaging-platform integrations, such as Telegram and Webex, the agent can send and receive messages through. |
| `targetSpec.config.exec` | publicCloud.ai.agents.ExecConfig |  | Remote command-execution settings. Unset or disabled means the agent cannot run shell commands. |
| `targetSpec.config.llm` | publicCloud.ai.agents.LlmConfig |  | The language model this agent uses to respond, including sampling settings and failover targets. |
| `targetSpec.config.mcpIndexer` | publicCloud.ai.agents.McpIndexerConfig |  | Settings for searchable tool indexing, required when any connected tool server uses indexed mode instead of listing all its tools directly. |
| `targetSpec.config.mcpServers` | object |  | Connected MCP tool servers, keyed by a caller-chosen server name. |
| `targetSpec.config.memory` | publicCloud.ai.agents.MemoryConfig |  | Long-term memory settings that let the agent retain and later recall facts across conversations. |
| `targetSpec.config.profiles` | publicCloud.ai.agents.AgentsConfig |  | Specialized sub-personas this agent can delegate tasks to. |
| `targetSpec.config.providers` | object |  | Shared pool of language-model provider connections, keyed by a caller-chosen provider id and referenced by name elsewhere in this configuration. |
| `targetSpec.config.relay` | publicCloud.ai.agents.RelayConfig |  | Settings for hosting a local messaging relay that other participants can join. |
| `targetSpec.config.skills` | publicCloud.ai.agents.SkillsConfig |  | Reusable skills the agent can invoke: named bundles of instructions it can follow on demand. |
| `targetSpec.config.soul` | string |  | The agent's persona and system prompt: free-form text describing who it is, how it should behave, and any standing instructions it should always follow. |
| `targetSpec.config.toolPermissions` | publicCloud.ai.agents.ToolPermissionsConfig |  | Rules applied to every tool call, matched on its name, arguments and what triggered the turn: before the call runs and — for a rule that says so — on what it returned. A matching rule allows the call, refuses it, asks a human, or defers to an LLM reviewer. |
| `targetSpec.config.version` | string |  | Configuration format version. Defaults to '1.0' for agents created before this field existed. |
| `targetSpec.config.workspace` | publicCloud.ai.agents.Workspace |  | The agent's file storage: an ordered list of mount points and the backend serving each one. |
| `targetSpec.description` | string |  | Optional human-readable description |
| `targetSpec.name` | string | yes | Name of the template |
| `updatedAt` | string (date-time) | read-only | Date of the last template update |

```json
[
  {
    "createdAt": "2024-01-01T12:00:00Z",
    "id": "string",
    "resourceStatus": "CREATING",
    "source": "BUILTIN",
    "targetSpec": {
      "config": {
        "agent": {
          "name": "string"
        },
        "auth": {
          "kagentJwt": {
            "allowUnlimited": true,
            "enabled": true,
            "maxTtlSeconds": 0,
            "secretB64": "string"
          },
          "mode": "KAGENT_JWT",
          "oauth2": {
            "audience": "string",
            "issuer": "string",
            "jwksUri": "string",
            "ownerSub": "string",
            "requiredScopes": [
              null
            ]
          }
        },
        "builtins": {
          "network": true,
          "search": true,
          "searchApiKey": "string",
          "searchProvider": "string",
          "toolsDeny": [
            "string"
          ],
          "wizard": true
        },
        "channels": {
          "telegram": {
            "botToken": "string",
            "enabled": true,
            "webhookSecret": "string"
          },
          "webex": {
            "accessToken": "string",
            "enabled": true,
            "webhookSecret": "string"
          }
        },
        "exec": {
          "apiKey": "string",
          "autoSuspendIdleSeconds": 0,
          "baseUrl": "string",
          "defaultImage": "string",
          "enabled": true
        },
        "llm": {
          "failover": {
            "on": [
              null
            ]
          },
          "fallbacks": [
            {
  …
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/v2/publicCloud/project/{projectId}/ai/agents/template" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/v2/publicCloud/project/{projectId}/ai/agents/template")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/v2/publicCloud/project/{projectId}/ai/agents/template");

print_r($result);
?>
```

## Create an AI agent template

`POST /v2/publicCloud/project/{projectId}/ai/agents/template`

Link: https://developers.eu.ovhcloud.com/reference/public-cloud/ai/ai-agents/#post-publiccloud-project-projectid-ai-agents-template

**Status:** Stable production version  
**IAM actions:** `publicCloudProject:apiovh:ai/agents/template/create`

Registers a reusable configuration that a later agent creation can name through `targetSpec.template.id`. A template stores a configuration. It runs nothing by itself. `targetSpec.name` must be unique within the project's namespace.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `projectId` | path | string | yes | Project ID |

### Request body (required)

Type: `publicCloud.ai.agents.TemplateCreation`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `targetSpec` | publicCloud.ai.agents.TemplateCreationTargetSpec | yes | Desired specification of the template to create |
| `targetSpec.config` | publicCloud.ai.agents.Config | yes | Templated AI agent configuration |
| `targetSpec.config.agent` | publicCloud.ai.agents.AgentConfig |  | The agent's identity settings, such as its display name. |
| `targetSpec.config.auth` | publicCloud.ai.agents.AuthConfig |  | Authentication settings for the agent's HTTP API. Unset falls back to requiring a token issued by the agent itself. |
| `targetSpec.config.builtins` | publicCloud.ai.agents.BuiltinsConfig |  | Toggles for the agent's built-in capabilities, such as network access and web search. |
| `targetSpec.config.channels` | publicCloud.ai.agents.ChannelsConfig |  | Messaging-platform integrations, such as Telegram and Webex, the agent can send and receive messages through. |
| `targetSpec.config.exec` | publicCloud.ai.agents.ExecConfig |  | Remote command-execution settings. Unset or disabled means the agent cannot run shell commands. |
| `targetSpec.config.llm` | publicCloud.ai.agents.LlmConfig |  | The language model this agent uses to respond, including sampling settings and failover targets. |
| `targetSpec.config.mcpIndexer` | publicCloud.ai.agents.McpIndexerConfig |  | Settings for searchable tool indexing, required when any connected tool server uses indexed mode instead of listing all its tools directly. |
| `targetSpec.config.mcpServers` | object |  | Connected MCP tool servers, keyed by a caller-chosen server name. |
| `targetSpec.config.memory` | publicCloud.ai.agents.MemoryConfig |  | Long-term memory settings that let the agent retain and later recall facts across conversations. |
| `targetSpec.config.profiles` | publicCloud.ai.agents.AgentsConfig |  | Specialized sub-personas this agent can delegate tasks to. |
| `targetSpec.config.providers` | object |  | Shared pool of language-model provider connections, keyed by a caller-chosen provider id and referenced by name elsewhere in this configuration. |
| `targetSpec.config.relay` | publicCloud.ai.agents.RelayConfig |  | Settings for hosting a local messaging relay that other participants can join. |
| `targetSpec.config.skills` | publicCloud.ai.agents.SkillsConfig |  | Reusable skills the agent can invoke: named bundles of instructions it can follow on demand. |
| `targetSpec.config.soul` | string |  | The agent's persona and system prompt: free-form text describing who it is, how it should behave, and any standing instructions it should always follow. |
| `targetSpec.config.toolPermissions` | publicCloud.ai.agents.ToolPermissionsConfig |  | Rules applied to every tool call, matched on its name, arguments and what triggered the turn: before the call runs and — for a rule that says so — on what it returned. A matching rule allows the call, refuses it, asks a human, or defers to an LLM reviewer. |
| `targetSpec.config.version` | string |  | Configuration format version. Defaults to '1.0' for agents created before this field existed. |
| `targetSpec.config.workspace` | publicCloud.ai.agents.Workspace |  | The agent's file storage: an ordered list of mount points and the backend serving each one. |
| `targetSpec.description` | string |  | Optional human-readable description |
| `targetSpec.name` | string | yes | Name of the template, unique within the namespace |

```json
{
  "targetSpec": {
    "config": {
      "agent": {
        "name": "string"
      },
      "auth": {
        "kagentJwt": {
          "allowUnlimited": true,
          "enabled": true,
          "maxTtlSeconds": 0,
          "secretB64": "string"
        },
        "mode": "KAGENT_JWT",
        "oauth2": {
          "audience": "string",
          "issuer": "string",
          "jwksUri": "string",
          "ownerSub": "string",
          "requiredScopes": [
            "string"
          ]
        }
      },
      "builtins": {
        "network": true,
        "search": true,
        "searchApiKey": "string",
        "searchProvider": "string",
        "toolsDeny": [
          "string"
        ],
        "wizard": true
      },
      "channels": {
        "telegram": {
          "botToken": "string",
          "enabled": true,
          "webhookSecret": "string"
        },
        "webex": {
          "accessToken": "string",
          "enabled": true,
          "webhookSecret": "string"
        }
      },
      "exec": {
        "apiKey": "string",
        "autoSuspendIdleSeconds": 0,
        "baseUrl": "string",
        "defaultImage": "string",
        "enabled": true
      },
      "llm": {
        "failover": {
          "on": [
            "AUTH"
          ]
        },
        "fallbacks": [
          {
            "maxTokens": 0,
            "model": "string",
            "providerId": "string",
            "temperature": 0
          }
        ],
        "maxContextMessages": 0,
        "maxTokens": 0,
        "model": "string",
        "providerId": "string",
  …
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | publicCloud.ai.agents.Template | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `createdAt` | string (date-time) | read-only | Date of the template creation |
| `id` | string | read-only | Unique identifier of the template |
| `resourceStatus` | common.ResourceStatusEnum | read-only | Reflects the readiness of the template: READY, or DELETING on the response to its deletion — one of `CREATING`, `CREATION_PLANNED`, `DELETING`, `ERROR`, `OUT_OF_SYNC`, `READY`, `SUSPENDED`, `UNKNOWN`, `UPDATING` |
| `source` | publicCloud.ai.agents.TemplateSourceEnum | read-only | Distinguishes built-in (code-defined) from user-authored templates — one of `BUILTIN`, `USER` |
| `targetSpec` | publicCloud.ai.agents.TemplateTargetSpec | read-only | Desired specification to replace the template with |
| `targetSpec.config` | publicCloud.ai.agents.Config |  | Templated AI agent configuration |
| `targetSpec.config.agent` | publicCloud.ai.agents.AgentConfig |  | The agent's identity settings, such as its display name. |
| `targetSpec.config.auth` | publicCloud.ai.agents.AuthConfig |  | Authentication settings for the agent's HTTP API. Unset falls back to requiring a token issued by the agent itself. |
| `targetSpec.config.builtins` | publicCloud.ai.agents.BuiltinsConfig |  | Toggles for the agent's built-in capabilities, such as network access and web search. |
| `targetSpec.config.channels` | publicCloud.ai.agents.ChannelsConfig |  | Messaging-platform integrations, such as Telegram and Webex, the agent can send and receive messages through. |
| `targetSpec.config.exec` | publicCloud.ai.agents.ExecConfig |  | Remote command-execution settings. Unset or disabled means the agent cannot run shell commands. |
| `targetSpec.config.llm` | publicCloud.ai.agents.LlmConfig |  | The language model this agent uses to respond, including sampling settings and failover targets. |
| `targetSpec.config.mcpIndexer` | publicCloud.ai.agents.McpIndexerConfig |  | Settings for searchable tool indexing, required when any connected tool server uses indexed mode instead of listing all its tools directly. |
| `targetSpec.config.mcpServers` | object |  | Connected MCP tool servers, keyed by a caller-chosen server name. |
| `targetSpec.config.memory` | publicCloud.ai.agents.MemoryConfig |  | Long-term memory settings that let the agent retain and later recall facts across conversations. |
| `targetSpec.config.profiles` | publicCloud.ai.agents.AgentsConfig |  | Specialized sub-personas this agent can delegate tasks to. |
| `targetSpec.config.providers` | object |  | Shared pool of language-model provider connections, keyed by a caller-chosen provider id and referenced by name elsewhere in this configuration. |
| `targetSpec.config.relay` | publicCloud.ai.agents.RelayConfig |  | Settings for hosting a local messaging relay that other participants can join. |
| `targetSpec.config.skills` | publicCloud.ai.agents.SkillsConfig |  | Reusable skills the agent can invoke: named bundles of instructions it can follow on demand. |
| `targetSpec.config.soul` | string |  | The agent's persona and system prompt: free-form text describing who it is, how it should behave, and any standing instructions it should always follow. |
| `targetSpec.config.toolPermissions` | publicCloud.ai.agents.ToolPermissionsConfig |  | Rules applied to every tool call, matched on its name, arguments and what triggered the turn: before the call runs and — for a rule that says so — on what it returned. A matching rule allows the call, refuses it, asks a human, or defers to an LLM reviewer. |
| `targetSpec.config.version` | string |  | Configuration format version. Defaults to '1.0' for agents created before this field existed. |
| `targetSpec.config.workspace` | publicCloud.ai.agents.Workspace |  | The agent's file storage: an ordered list of mount points and the backend serving each one. |
| `targetSpec.description` | string |  | Optional human-readable description |
| `targetSpec.name` | string | yes | Name of the template |
| `updatedAt` | string (date-time) | read-only | Date of the last template update |

```json
{
  "createdAt": "2024-01-01T12:00:00Z",
  "id": "string",
  "resourceStatus": "CREATING",
  "source": "BUILTIN",
  "targetSpec": {
    "config": {
      "agent": {
        "name": "string"
      },
      "auth": {
        "kagentJwt": {
          "allowUnlimited": true,
          "enabled": true,
          "maxTtlSeconds": 0,
          "secretB64": "string"
        },
        "mode": "KAGENT_JWT",
        "oauth2": {
          "audience": "string",
          "issuer": "string",
          "jwksUri": "string",
          "ownerSub": "string",
          "requiredScopes": [
            "string"
          ]
        }
      },
      "builtins": {
        "network": true,
        "search": true,
        "searchApiKey": "string",
        "searchProvider": "string",
        "toolsDeny": [
          "string"
        ],
        "wizard": true
      },
      "channels": {
        "telegram": {
          "botToken": "string",
          "enabled": true,
          "webhookSecret": "string"
        },
        "webex": {
          "accessToken": "string",
          "enabled": true,
          "webhookSecret": "string"
        }
      },
      "exec": {
        "apiKey": "string",
        "autoSuspendIdleSeconds": 0,
        "baseUrl": "string",
        "defaultImage": "string",
        "enabled": true
      },
      "llm": {
        "failover": {
          "on": [
            "AUTH"
          ]
        },
        "fallbacks": [
          {
            "maxTokens": 0,
            "model": "string",
            "providerId": "string",
            "temperature": 0
          }
        ],
  …
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/v2/publicCloud/project/{projectId}/ai/agents/template" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN" \
  -H "content-type: application/json" \
  -d '{ }'
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

# Request body type: publicCloud.ai.agents.TemplateCreation
result = client.post("/v2/publicCloud/project/{projectId}/ai/agents/template",
	targetSpec = None, # Desired specification of the template to create (type: publicCloud.ai.agents.TemplateCreationTargetSpec)
)

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

// Request body type: publicCloud.ai.agents.TemplateCreation
$result = $ovh->post("/v2/publicCloud/project/{projectId}/ai/agents/template", array(
	targetSpec => null, // Desired specification of the template to create (type: publicCloud.ai.agents.TemplateCreationTargetSpec)
));

print_r($result);
?>
```

## Get an AI agent template

`GET /v2/publicCloud/project/{projectId}/ai/agents/template/{templateId}`

Link: https://developers.eu.ovhcloud.com/reference/public-cloud/ai/ai-agents/#get-publiccloud-project-projectid-ai-agents-template-templateid

**Status:** Stable production version  
**IAM actions:** `publicCloudProject:apiovh:ai/agents/template/get`

The ready-made configurations OVHcloud publishes are not returned here. They are served by the `preset/template` node.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `projectId` | path | string | yes | Project ID |
| `templateId` | path | string | yes | Template ID |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | publicCloud.ai.agents.Template | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `createdAt` | string (date-time) | read-only | Date of the template creation |
| `id` | string | read-only | Unique identifier of the template |
| `resourceStatus` | common.ResourceStatusEnum | read-only | Reflects the readiness of the template: READY, or DELETING on the response to its deletion — one of `CREATING`, `CREATION_PLANNED`, `DELETING`, `ERROR`, `OUT_OF_SYNC`, `READY`, `SUSPENDED`, `UNKNOWN`, `UPDATING` |
| `source` | publicCloud.ai.agents.TemplateSourceEnum | read-only | Distinguishes built-in (code-defined) from user-authored templates — one of `BUILTIN`, `USER` |
| `targetSpec` | publicCloud.ai.agents.TemplateTargetSpec | read-only | Desired specification to replace the template with |
| `targetSpec.config` | publicCloud.ai.agents.Config |  | Templated AI agent configuration |
| `targetSpec.config.agent` | publicCloud.ai.agents.AgentConfig |  | The agent's identity settings, such as its display name. |
| `targetSpec.config.auth` | publicCloud.ai.agents.AuthConfig |  | Authentication settings for the agent's HTTP API. Unset falls back to requiring a token issued by the agent itself. |
| `targetSpec.config.builtins` | publicCloud.ai.agents.BuiltinsConfig |  | Toggles for the agent's built-in capabilities, such as network access and web search. |
| `targetSpec.config.channels` | publicCloud.ai.agents.ChannelsConfig |  | Messaging-platform integrations, such as Telegram and Webex, the agent can send and receive messages through. |
| `targetSpec.config.exec` | publicCloud.ai.agents.ExecConfig |  | Remote command-execution settings. Unset or disabled means the agent cannot run shell commands. |
| `targetSpec.config.llm` | publicCloud.ai.agents.LlmConfig |  | The language model this agent uses to respond, including sampling settings and failover targets. |
| `targetSpec.config.mcpIndexer` | publicCloud.ai.agents.McpIndexerConfig |  | Settings for searchable tool indexing, required when any connected tool server uses indexed mode instead of listing all its tools directly. |
| `targetSpec.config.mcpServers` | object |  | Connected MCP tool servers, keyed by a caller-chosen server name. |
| `targetSpec.config.memory` | publicCloud.ai.agents.MemoryConfig |  | Long-term memory settings that let the agent retain and later recall facts across conversations. |
| `targetSpec.config.profiles` | publicCloud.ai.agents.AgentsConfig |  | Specialized sub-personas this agent can delegate tasks to. |
| `targetSpec.config.providers` | object |  | Shared pool of language-model provider connections, keyed by a caller-chosen provider id and referenced by name elsewhere in this configuration. |
| `targetSpec.config.relay` | publicCloud.ai.agents.RelayConfig |  | Settings for hosting a local messaging relay that other participants can join. |
| `targetSpec.config.skills` | publicCloud.ai.agents.SkillsConfig |  | Reusable skills the agent can invoke: named bundles of instructions it can follow on demand. |
| `targetSpec.config.soul` | string |  | The agent's persona and system prompt: free-form text describing who it is, how it should behave, and any standing instructions it should always follow. |
| `targetSpec.config.toolPermissions` | publicCloud.ai.agents.ToolPermissionsConfig |  | Rules applied to every tool call, matched on its name, arguments and what triggered the turn: before the call runs and — for a rule that says so — on what it returned. A matching rule allows the call, refuses it, asks a human, or defers to an LLM reviewer. |
| `targetSpec.config.version` | string |  | Configuration format version. Defaults to '1.0' for agents created before this field existed. |
| `targetSpec.config.workspace` | publicCloud.ai.agents.Workspace |  | The agent's file storage: an ordered list of mount points and the backend serving each one. |
| `targetSpec.description` | string |  | Optional human-readable description |
| `targetSpec.name` | string | yes | Name of the template |
| `updatedAt` | string (date-time) | read-only | Date of the last template update |

```json
{
  "createdAt": "2024-01-01T12:00:00Z",
  "id": "string",
  "resourceStatus": "CREATING",
  "source": "BUILTIN",
  "targetSpec": {
    "config": {
      "agent": {
        "name": "string"
      },
      "auth": {
        "kagentJwt": {
          "allowUnlimited": true,
          "enabled": true,
          "maxTtlSeconds": 0,
          "secretB64": "string"
        },
        "mode": "KAGENT_JWT",
        "oauth2": {
          "audience": "string",
          "issuer": "string",
          "jwksUri": "string",
          "ownerSub": "string",
          "requiredScopes": [
            "string"
          ]
        }
      },
      "builtins": {
        "network": true,
        "search": true,
        "searchApiKey": "string",
        "searchProvider": "string",
        "toolsDeny": [
          "string"
        ],
        "wizard": true
      },
      "channels": {
        "telegram": {
          "botToken": "string",
          "enabled": true,
          "webhookSecret": "string"
        },
        "webex": {
          "accessToken": "string",
          "enabled": true,
          "webhookSecret": "string"
        }
      },
      "exec": {
        "apiKey": "string",
        "autoSuspendIdleSeconds": 0,
        "baseUrl": "string",
        "defaultImage": "string",
        "enabled": true
      },
      "llm": {
        "failover": {
          "on": [
            "AUTH"
          ]
        },
        "fallbacks": [
          {
            "maxTokens": 0,
            "model": "string",
            "providerId": "string",
            "temperature": 0
          }
        ],
  …
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/v2/publicCloud/project/{projectId}/ai/agents/template/{templateId}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/v2/publicCloud/project/{projectId}/ai/agents/template/{templateId}")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/v2/publicCloud/project/{projectId}/ai/agents/template/{templateId}");

print_r($result);
?>
```

## Update an AI agent template

`PUT /v2/publicCloud/project/{projectId}/ai/agents/template/{templateId}`

Link: https://developers.eu.ovhcloud.com/reference/public-cloud/ai/ai-agents/#put-publiccloud-project-projectid-ai-agents-template-templateid

**Status:** Stable production version  
**IAM actions:** `publicCloudProject:apiovh:ai/agents/template/edit`

Replaces the template's target spec as a whole: a field left out of the body is not preserved, and `targetSpec.config` is mandatory. Secrets inside that configuration read back as `[REDACTED]`. Send the sentinel back unchanged to keep the stored value. Configuration blocks OVHcloud reserves or does not offer are left out of a read, and a body that does not restate them drops them from the stored template. Agents already created from this template are unaffected, since a template is read once, at agent creation time.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `projectId` | path | string | yes | Project ID |
| `templateId` | path | string | yes | Template ID |

### Request body (required)

Type: `publicCloud.ai.agents.TemplateUpdate`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `targetSpec` | publicCloud.ai.agents.TemplateTargetSpec | yes | Desired specification to replace the template with |
| `targetSpec.config` | publicCloud.ai.agents.Config |  | Templated AI agent configuration |
| `targetSpec.config.agent` | publicCloud.ai.agents.AgentConfig |  | The agent's identity settings, such as its display name. |
| `targetSpec.config.auth` | publicCloud.ai.agents.AuthConfig |  | Authentication settings for the agent's HTTP API. Unset falls back to requiring a token issued by the agent itself. |
| `targetSpec.config.builtins` | publicCloud.ai.agents.BuiltinsConfig |  | Toggles for the agent's built-in capabilities, such as network access and web search. |
| `targetSpec.config.channels` | publicCloud.ai.agents.ChannelsConfig |  | Messaging-platform integrations, such as Telegram and Webex, the agent can send and receive messages through. |
| `targetSpec.config.exec` | publicCloud.ai.agents.ExecConfig |  | Remote command-execution settings. Unset or disabled means the agent cannot run shell commands. |
| `targetSpec.config.llm` | publicCloud.ai.agents.LlmConfig |  | The language model this agent uses to respond, including sampling settings and failover targets. |
| `targetSpec.config.mcpIndexer` | publicCloud.ai.agents.McpIndexerConfig |  | Settings for searchable tool indexing, required when any connected tool server uses indexed mode instead of listing all its tools directly. |
| `targetSpec.config.mcpServers` | object |  | Connected MCP tool servers, keyed by a caller-chosen server name. |
| `targetSpec.config.memory` | publicCloud.ai.agents.MemoryConfig |  | Long-term memory settings that let the agent retain and later recall facts across conversations. |
| `targetSpec.config.profiles` | publicCloud.ai.agents.AgentsConfig |  | Specialized sub-personas this agent can delegate tasks to. |
| `targetSpec.config.providers` | object |  | Shared pool of language-model provider connections, keyed by a caller-chosen provider id and referenced by name elsewhere in this configuration. |
| `targetSpec.config.relay` | publicCloud.ai.agents.RelayConfig |  | Settings for hosting a local messaging relay that other participants can join. |
| `targetSpec.config.skills` | publicCloud.ai.agents.SkillsConfig |  | Reusable skills the agent can invoke: named bundles of instructions it can follow on demand. |
| `targetSpec.config.soul` | string |  | The agent's persona and system prompt: free-form text describing who it is, how it should behave, and any standing instructions it should always follow. |
| `targetSpec.config.toolPermissions` | publicCloud.ai.agents.ToolPermissionsConfig |  | Rules applied to every tool call, matched on its name, arguments and what triggered the turn: before the call runs and — for a rule that says so — on what it returned. A matching rule allows the call, refuses it, asks a human, or defers to an LLM reviewer. |
| `targetSpec.config.version` | string |  | Configuration format version. Defaults to '1.0' for agents created before this field existed. |
| `targetSpec.config.workspace` | publicCloud.ai.agents.Workspace |  | The agent's file storage: an ordered list of mount points and the backend serving each one. |
| `targetSpec.description` | string |  | Optional human-readable description |
| `targetSpec.name` | string | yes | Name of the template |

```json
{
  "targetSpec": {
    "config": {
      "agent": {
        "name": "string"
      },
      "auth": {
        "kagentJwt": {
          "allowUnlimited": true,
          "enabled": true,
          "maxTtlSeconds": 0,
          "secretB64": "string"
        },
        "mode": "KAGENT_JWT",
        "oauth2": {
          "audience": "string",
          "issuer": "string",
          "jwksUri": "string",
          "ownerSub": "string",
          "requiredScopes": [
            "string"
          ]
        }
      },
      "builtins": {
        "network": true,
        "search": true,
        "searchApiKey": "string",
        "searchProvider": "string",
        "toolsDeny": [
          "string"
        ],
        "wizard": true
      },
      "channels": {
        "telegram": {
          "botToken": "string",
          "enabled": true,
          "webhookSecret": "string"
        },
        "webex": {
          "accessToken": "string",
          "enabled": true,
          "webhookSecret": "string"
        }
      },
      "exec": {
        "apiKey": "string",
        "autoSuspendIdleSeconds": 0,
        "baseUrl": "string",
        "defaultImage": "string",
        "enabled": true
      },
      "llm": {
        "failover": {
          "on": [
            "AUTH"
          ]
        },
        "fallbacks": [
          {
            "maxTokens": 0,
            "model": "string",
            "providerId": "string",
            "temperature": 0
          }
        ],
        "maxContextMessages": 0,
        "maxTokens": 0,
        "model": "string",
        "providerId": "string",
  …
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | publicCloud.ai.agents.Template | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `createdAt` | string (date-time) | read-only | Date of the template creation |
| `id` | string | read-only | Unique identifier of the template |
| `resourceStatus` | common.ResourceStatusEnum | read-only | Reflects the readiness of the template: READY, or DELETING on the response to its deletion — one of `CREATING`, `CREATION_PLANNED`, `DELETING`, `ERROR`, `OUT_OF_SYNC`, `READY`, `SUSPENDED`, `UNKNOWN`, `UPDATING` |
| `source` | publicCloud.ai.agents.TemplateSourceEnum | read-only | Distinguishes built-in (code-defined) from user-authored templates — one of `BUILTIN`, `USER` |
| `targetSpec` | publicCloud.ai.agents.TemplateTargetSpec | read-only | Desired specification to replace the template with |
| `targetSpec.config` | publicCloud.ai.agents.Config |  | Templated AI agent configuration |
| `targetSpec.config.agent` | publicCloud.ai.agents.AgentConfig |  | The agent's identity settings, such as its display name. |
| `targetSpec.config.auth` | publicCloud.ai.agents.AuthConfig |  | Authentication settings for the agent's HTTP API. Unset falls back to requiring a token issued by the agent itself. |
| `targetSpec.config.builtins` | publicCloud.ai.agents.BuiltinsConfig |  | Toggles for the agent's built-in capabilities, such as network access and web search. |
| `targetSpec.config.channels` | publicCloud.ai.agents.ChannelsConfig |  | Messaging-platform integrations, such as Telegram and Webex, the agent can send and receive messages through. |
| `targetSpec.config.exec` | publicCloud.ai.agents.ExecConfig |  | Remote command-execution settings. Unset or disabled means the agent cannot run shell commands. |
| `targetSpec.config.llm` | publicCloud.ai.agents.LlmConfig |  | The language model this agent uses to respond, including sampling settings and failover targets. |
| `targetSpec.config.mcpIndexer` | publicCloud.ai.agents.McpIndexerConfig |  | Settings for searchable tool indexing, required when any connected tool server uses indexed mode instead of listing all its tools directly. |
| `targetSpec.config.mcpServers` | object |  | Connected MCP tool servers, keyed by a caller-chosen server name. |
| `targetSpec.config.memory` | publicCloud.ai.agents.MemoryConfig |  | Long-term memory settings that let the agent retain and later recall facts across conversations. |
| `targetSpec.config.profiles` | publicCloud.ai.agents.AgentsConfig |  | Specialized sub-personas this agent can delegate tasks to. |
| `targetSpec.config.providers` | object |  | Shared pool of language-model provider connections, keyed by a caller-chosen provider id and referenced by name elsewhere in this configuration. |
| `targetSpec.config.relay` | publicCloud.ai.agents.RelayConfig |  | Settings for hosting a local messaging relay that other participants can join. |
| `targetSpec.config.skills` | publicCloud.ai.agents.SkillsConfig |  | Reusable skills the agent can invoke: named bundles of instructions it can follow on demand. |
| `targetSpec.config.soul` | string |  | The agent's persona and system prompt: free-form text describing who it is, how it should behave, and any standing instructions it should always follow. |
| `targetSpec.config.toolPermissions` | publicCloud.ai.agents.ToolPermissionsConfig |  | Rules applied to every tool call, matched on its name, arguments and what triggered the turn: before the call runs and — for a rule that says so — on what it returned. A matching rule allows the call, refuses it, asks a human, or defers to an LLM reviewer. |
| `targetSpec.config.version` | string |  | Configuration format version. Defaults to '1.0' for agents created before this field existed. |
| `targetSpec.config.workspace` | publicCloud.ai.agents.Workspace |  | The agent's file storage: an ordered list of mount points and the backend serving each one. |
| `targetSpec.description` | string |  | Optional human-readable description |
| `targetSpec.name` | string | yes | Name of the template |
| `updatedAt` | string (date-time) | read-only | Date of the last template update |

```json
{
  "createdAt": "2024-01-01T12:00:00Z",
  "id": "string",
  "resourceStatus": "CREATING",
  "source": "BUILTIN",
  "targetSpec": {
    "config": {
      "agent": {
        "name": "string"
      },
      "auth": {
        "kagentJwt": {
          "allowUnlimited": true,
          "enabled": true,
          "maxTtlSeconds": 0,
          "secretB64": "string"
        },
        "mode": "KAGENT_JWT",
        "oauth2": {
          "audience": "string",
          "issuer": "string",
          "jwksUri": "string",
          "ownerSub": "string",
          "requiredScopes": [
            "string"
          ]
        }
      },
      "builtins": {
        "network": true,
        "search": true,
        "searchApiKey": "string",
        "searchProvider": "string",
        "toolsDeny": [
          "string"
        ],
        "wizard": true
      },
      "channels": {
        "telegram": {
          "botToken": "string",
          "enabled": true,
          "webhookSecret": "string"
        },
        "webex": {
          "accessToken": "string",
          "enabled": true,
          "webhookSecret": "string"
        }
      },
      "exec": {
        "apiKey": "string",
        "autoSuspendIdleSeconds": 0,
        "baseUrl": "string",
        "defaultImage": "string",
        "enabled": true
      },
      "llm": {
        "failover": {
          "on": [
            "AUTH"
          ]
        },
        "fallbacks": [
          {
            "maxTokens": 0,
            "model": "string",
            "providerId": "string",
            "temperature": 0
          }
        ],
  …
```

### Example

```bash
curl -X PUT \
  "https://api.eu.ovhcloud.com/v2/publicCloud/project/{projectId}/ai/agents/template/{templateId}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN" \
  -H "content-type: application/json" \
  -d '{ }'
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

# Request body type: publicCloud.ai.agents.TemplateUpdate
result = client.put("/v2/publicCloud/project/{projectId}/ai/agents/template/{templateId}",
	targetSpec = None, # Desired specification to replace the template with (type: publicCloud.ai.agents.TemplateTargetSpec)
)

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

// Request body type: publicCloud.ai.agents.TemplateUpdate
$result = $ovh->put("/v2/publicCloud/project/{projectId}/ai/agents/template/{templateId}", array(
	targetSpec => null, // Desired specification to replace the template with (type: publicCloud.ai.agents.TemplateTargetSpec)
));

print_r($result);
?>
```

## Delete an AI agent template

`DELETE /v2/publicCloud/project/{projectId}/ai/agents/template/{templateId}`

Link: https://developers.eu.ovhcloud.com/reference/public-cloud/ai/ai-agents/#delete-publiccloud-project-projectid-ai-agents-template-templateid

**Status:** Stable production version  
**IAM actions:** `publicCloudProject:apiovh:ai/agents/template/delete`

Deletion is asynchronous: the response describes the template with `resourceStatus: DELETING`. Agents already created from it are unaffected, since a template is read once, at agent creation time.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `projectId` | path | string | yes | Project ID |
| `templateId` | path | string | yes | Template ID |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | publicCloud.ai.agents.Template | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `createdAt` | string (date-time) | read-only | Date of the template creation |
| `id` | string | read-only | Unique identifier of the template |
| `resourceStatus` | common.ResourceStatusEnum | read-only | Reflects the readiness of the template: READY, or DELETING on the response to its deletion — one of `CREATING`, `CREATION_PLANNED`, `DELETING`, `ERROR`, `OUT_OF_SYNC`, `READY`, `SUSPENDED`, `UNKNOWN`, `UPDATING` |
| `source` | publicCloud.ai.agents.TemplateSourceEnum | read-only | Distinguishes built-in (code-defined) from user-authored templates — one of `BUILTIN`, `USER` |
| `targetSpec` | publicCloud.ai.agents.TemplateTargetSpec | read-only | Desired specification to replace the template with |
| `targetSpec.config` | publicCloud.ai.agents.Config |  | Templated AI agent configuration |
| `targetSpec.config.agent` | publicCloud.ai.agents.AgentConfig |  | The agent's identity settings, such as its display name. |
| `targetSpec.config.auth` | publicCloud.ai.agents.AuthConfig |  | Authentication settings for the agent's HTTP API. Unset falls back to requiring a token issued by the agent itself. |
| `targetSpec.config.builtins` | publicCloud.ai.agents.BuiltinsConfig |  | Toggles for the agent's built-in capabilities, such as network access and web search. |
| `targetSpec.config.channels` | publicCloud.ai.agents.ChannelsConfig |  | Messaging-platform integrations, such as Telegram and Webex, the agent can send and receive messages through. |
| `targetSpec.config.exec` | publicCloud.ai.agents.ExecConfig |  | Remote command-execution settings. Unset or disabled means the agent cannot run shell commands. |
| `targetSpec.config.llm` | publicCloud.ai.agents.LlmConfig |  | The language model this agent uses to respond, including sampling settings and failover targets. |
| `targetSpec.config.mcpIndexer` | publicCloud.ai.agents.McpIndexerConfig |  | Settings for searchable tool indexing, required when any connected tool server uses indexed mode instead of listing all its tools directly. |
| `targetSpec.config.mcpServers` | object |  | Connected MCP tool servers, keyed by a caller-chosen server name. |
| `targetSpec.config.memory` | publicCloud.ai.agents.MemoryConfig |  | Long-term memory settings that let the agent retain and later recall facts across conversations. |
| `targetSpec.config.profiles` | publicCloud.ai.agents.AgentsConfig |  | Specialized sub-personas this agent can delegate tasks to. |
| `targetSpec.config.providers` | object |  | Shared pool of language-model provider connections, keyed by a caller-chosen provider id and referenced by name elsewhere in this configuration. |
| `targetSpec.config.relay` | publicCloud.ai.agents.RelayConfig |  | Settings for hosting a local messaging relay that other participants can join. |
| `targetSpec.config.skills` | publicCloud.ai.agents.SkillsConfig |  | Reusable skills the agent can invoke: named bundles of instructions it can follow on demand. |
| `targetSpec.config.soul` | string |  | The agent's persona and system prompt: free-form text describing who it is, how it should behave, and any standing instructions it should always follow. |
| `targetSpec.config.toolPermissions` | publicCloud.ai.agents.ToolPermissionsConfig |  | Rules applied to every tool call, matched on its name, arguments and what triggered the turn: before the call runs and — for a rule that says so — on what it returned. A matching rule allows the call, refuses it, asks a human, or defers to an LLM reviewer. |
| `targetSpec.config.version` | string |  | Configuration format version. Defaults to '1.0' for agents created before this field existed. |
| `targetSpec.config.workspace` | publicCloud.ai.agents.Workspace |  | The agent's file storage: an ordered list of mount points and the backend serving each one. |
| `targetSpec.description` | string |  | Optional human-readable description |
| `targetSpec.name` | string | yes | Name of the template |
| `updatedAt` | string (date-time) | read-only | Date of the last template update |

```json
{
  "createdAt": "2024-01-01T12:00:00Z",
  "id": "string",
  "resourceStatus": "CREATING",
  "source": "BUILTIN",
  "targetSpec": {
    "config": {
      "agent": {
        "name": "string"
      },
      "auth": {
        "kagentJwt": {
          "allowUnlimited": true,
          "enabled": true,
          "maxTtlSeconds": 0,
          "secretB64": "string"
        },
        "mode": "KAGENT_JWT",
        "oauth2": {
          "audience": "string",
          "issuer": "string",
          "jwksUri": "string",
          "ownerSub": "string",
          "requiredScopes": [
            "string"
          ]
        }
      },
      "builtins": {
        "network": true,
        "search": true,
        "searchApiKey": "string",
        "searchProvider": "string",
        "toolsDeny": [
          "string"
        ],
        "wizard": true
      },
      "channels": {
        "telegram": {
          "botToken": "string",
          "enabled": true,
          "webhookSecret": "string"
        },
        "webex": {
          "accessToken": "string",
          "enabled": true,
          "webhookSecret": "string"
        }
      },
      "exec": {
        "apiKey": "string",
        "autoSuspendIdleSeconds": 0,
        "baseUrl": "string",
        "defaultImage": "string",
        "enabled": true
      },
      "llm": {
        "failover": {
          "on": [
            "AUTH"
          ]
        },
        "fallbacks": [
          {
            "maxTokens": 0,
            "model": "string",
            "providerId": "string",
            "temperature": 0
          }
        ],
  …
```

### Example

```bash
curl -X DELETE \
  "https://api.eu.ovhcloud.com/v2/publicCloud/project/{projectId}/ai/agents/template/{templateId}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.delete("/v2/publicCloud/project/{projectId}/ai/agents/template/{templateId}")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->delete("/v2/publicCloud/project/{projectId}/ai/agents/template/{templateId}");

print_r($result);
?>
```
