> Documentation index: https://www.gooddata.ai/docs/gooddata-ui/llms.txt lists every page of these docs as Markdown.

# IOrganizationAgentsService

- Package: [@gooddata/sdk-backend-spi](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/index.md)
- Kind: interface
- Stability: alpha
- Source: https://github.com/gooddata/gooddata-ui-sdk/blob/rel/11.64/libs/sdk-backend-spi/src/organization/agents/index.ts

> **Alpha API.** Initial API, highly likely to change outside SemVer. Don't build on it in production. See [API maturity](https://www.gooddata.ai/docs/gooddata-ui/latest/integrations/platform/api-maturity/index.md).
> 

This service provides access to AI agents and their skills in the organization.

**Signature:**

```typescript
export interface IOrganizationAgentsService 
```

## Methods

| Method | Description |
| --- | --- |
| [createAgent(agent)](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/sdk-backend-spi.iorganizationagentsservice/index.md#iorganizationagentsservicecreateagent) | **_(ALPHA)_** Create a new agent. |
| [deleteAgent(ref)](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/sdk-backend-spi.iorganizationagentsservice/index.md#iorganizationagentsservicedeleteagent) | **_(ALPHA)_** Delete an agent. |
| [getAgent(ref)](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/sdk-backend-spi.iorganizationagentsservice/index.md#iorganizationagentsservicegetagent) | **_(ALPHA)_** Get agent by ref. |
| [getAgentsQuery()](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/sdk-backend-spi.iorganizationagentsservice/index.md#iorganizationagentsservicegetagentsquery) | **_(ALPHA)_** Get agents query. |
| [getAvailableSkills()](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/sdk-backend-spi.iorganizationagentsservice/index.md#iorganizationagentsservicegetavailableskills) | **_(ALPHA)_** Get all available skills for the AI agent. |
| [patchAgent(agent)](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/sdk-backend-spi.iorganizationagentsservice/index.md#iorganizationagentsservicepatchagent) | **_(ALPHA)_** Patch existing agent (partial update). |
| [updateAgent(agent)](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/sdk-backend-spi.iorganizationagentsservice/index.md#iorganizationagentsserviceupdateagent) | **_(ALPHA)_** Update existing agent (full replace). |

## Method details

### IOrganizationAgentsService.createAgent()

> **Alpha API.** Initial API, highly likely to change outside SemVer. Don't build on it in production. See [API maturity](https://www.gooddata.ai/docs/gooddata-ui/latest/integrations/platform/api-maturity/index.md).
> 

Create a new agent.

**Signature:**

```typescript
createAgent(agent: IAgent): Promise<IAgent>;
```

#### Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| agent | [IAgent](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-model/sdk-model.iagent/index.md) | definition of the agent |

**Returns:**

Promise&lt;[IAgent](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-model/sdk-model.iagent/index.md)&gt;

Promise resolved with created agent.

### IOrganizationAgentsService.deleteAgent()

> **Alpha API.** Initial API, highly likely to change outside SemVer. Don't build on it in production. See [API maturity](https://www.gooddata.ai/docs/gooddata-ui/latest/integrations/platform/api-maturity/index.md).
> 

Delete an agent.

**Signature:**

```typescript
deleteAgent(ref: ObjRef): Promise<void>;
```

#### Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| ref | [ObjRef](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-model/sdk-model.objref/index.md) | ref of the agent |

**Returns:**

Promise&lt;void&gt;

Promise resolved when the agent is deleted.

### IOrganizationAgentsService.getAgent()

> **Alpha API.** Initial API, highly likely to change outside SemVer. Don't build on it in production. See [API maturity](https://www.gooddata.ai/docs/gooddata-ui/latest/integrations/platform/api-maturity/index.md).
> 

Get agent by ref.

**Signature:**

```typescript
getAgent(ref: ObjRef): Promise<IAgent | undefined>;
```

#### Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| ref | [ObjRef](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-model/sdk-model.objref/index.md) | ref of the agent |

**Returns:**

Promise&lt;[IAgent](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-model/sdk-model.iagent/index.md) &#124; undefined&gt;

Promise resolved with agent.

### IOrganizationAgentsService.getAgentsQuery()

> **Alpha API.** Initial API, highly likely to change outside SemVer. Don't build on it in production. See [API maturity](https://www.gooddata.ai/docs/gooddata-ui/latest/integrations/platform/api-maturity/index.md).
> 

Get agents query.

**Signature:**

```typescript
getAgentsQuery(): IAgentsQuery;
```
**Returns:**

[IAgentsQuery](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/sdk-backend-spi.iagentsquery/index.md)

agents query

### IOrganizationAgentsService.getAvailableSkills()

> **Alpha API.** Initial API, highly likely to change outside SemVer. Don't build on it in production. See [API maturity](https://www.gooddata.ai/docs/gooddata-ui/latest/integrations/platform/api-maturity/index.md).
> 

Get all available skills for the AI agent.

**Signature:**

```typescript
getAvailableSkills(): Promise<IAgentSkill[]>;
```
**Returns:**

Promise&lt;[IAgentSkill](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-model/sdk-model.iagentskill/index.md)[]&gt;

Promise resolved with a list of available skills.

### IOrganizationAgentsService.patchAgent()

> **Alpha API.** Initial API, highly likely to change outside SemVer. Don't build on it in production. See [API maturity](https://www.gooddata.ai/docs/gooddata-ui/latest/integrations/platform/api-maturity/index.md).
> 

Patch existing agent (partial update).

**Signature:**

```typescript
patchAgent(agent: IAgentPatch): Promise<IAgent>;
```

#### Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| agent | [IAgentPatch](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-model/sdk-model.iagentpatch/index.md) | partial definition of the agent |

**Returns:**

Promise&lt;[IAgent](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-model/sdk-model.iagent/index.md)&gt;

Promise resolved with patched agent.

### IOrganizationAgentsService.updateAgent()

> **Alpha API.** Initial API, highly likely to change outside SemVer. Don't build on it in production. See [API maturity](https://www.gooddata.ai/docs/gooddata-ui/latest/integrations/platform/api-maturity/index.md).
> 

Update existing agent (full replace).

**Signature:**

```typescript
updateAgent(agent: IAgent): Promise<IAgent>;
```

#### Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| agent | [IAgent](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-model/sdk-model.iagent/index.md) | definition of the agent |

**Returns:**

Promise&lt;[IAgent](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-model/sdk-model.iagent/index.md)&gt;

Promise resolved with updated agent.
