---
title: dots.v2.genAi.agents.byAgent_uuId().child_agents.byChild_agent_uuid().post()
description: Add Agent Route to an Agent
product: Reference
url: https://docs.digitalocean.com/reference/dots/reference/agent-platform-api/genai-attach-agent/
last_updated: "2026-11-18"
---

> **For AI agents:** The documentation index is at [https://docs.digitalocean.com/llms.txt](https://docs.digitalocean.com/llms.txt). Markdown versions of pages use the same URL with `index.html.md` in place of the HTML page (for example, append `index.html.md` to the directory path instead of opening the HTML document).

# dots.v2.genAi.agents.byAgent_uuId().child_agents.byChild_agent_uuid().post()

Generated on 18 Nov 2026 from DoTs version [`v1.25.0`](https://github.com/digitalocean/dots/releases/tag/v1.25.0)

## Usage

```typescript
client.v2.genAi.agents.byAgent_uuId(agent_uuId).child_agents.byChild_agent_uuid(child_agent_uuid).post(body: ApiLinkAgentInputPublic, requestConfiguration?: RequestConfiguration<object>): Promise<undefined | ApiLinkAgentOutput>
```

## Description

To add an agent route to an agent, send a POST request to [`/v2/gen-ai/agents/{parent_agent_uuid}/child_agents/{child_agent_uuid}`](https://docs.digitalocean.com/reference/api/reference/agent-platform-api/index.html.md#genai_attach_agent).

## Parameters

### Path Parameters

`agent_uuId` string required

Example: `"123e4567-e89b-12d3-a456-426614174000"`

A unique identifier for the parent agent.

`child_agent_uuid` string required

Example: `"123e4567-e89b-12d3-a456-426614174000"`

Routed agent id

### Request Body

`childAgentUuid` string optional

Example: `"12345678-1234-1234-1234-123456789012"`

Routed agent id

`ifCase` string optional

Example: `"use this to get weather information"`

`parentAgentUuid` string optional

Example: `"12345678-1234-1234-1234-123456789012"`

A unique identifier for the parent agent.

`routeName` string optional

Example: `"weather_route"`

Name of route

## Request Sample

## Show Request Sample

```typescript
import { FetchRequestAdapter } from "@microsoft/kiota-http-fetchlibrary";
import {
    createDigitalOceanClient,
    DigitalOceanApiKeyAuthenticationProvider,
} from "@digitalocean/dots";

const authProvider = new DigitalOceanApiKeyAuthenticationProvider(process.env.DIGITALOCEAN_TOKEN!);
const adapter = new FetchRequestAdapter(authProvider);
const client = createDigitalOceanClient(adapter);

const response = await client.v2.genAi.agents
    .byAgent_uuId("\"123e4567-e89b-12d3-a456-426614174000\"").child_agents
    .byChild_agent_uuid("\"123e4567-e89b-12d3-a456-426614174000\"").post({
    childAgentUuid: "\"12345678-1234-1234-1234-123456789012\"",
    ifCase: "\"use this to get weather information\"",
    parentAgentUuid: "\"12345678-1234-1234-1234-123456789012\"",
    routeName: "\"weather_route\"",
});
```

## Response Example

## Show Response Example

```json
{
  "child_agent_uuid": "123e4567-e89b-12d3-a456-426614174000",
  "parent_agent_uuid": "123e4567-e89b-12d3-a456-426614174000"
}
```

## More Information

See [`/v2/gen-ai/agents/{parent_agent_uuid}/child_agents/{child_agent_uuid}`](https://docs.digitalocean.com/reference/api/reference/agent-platform-api/index.html.md#genai_attach_agent) in the API reference for additional detail on responses, headers, parameters, and more.