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

# roark connections agent create

> Connect an agent

Connects the platform a project’s agents run on. The body is shaped by `provider`; `GET /v1/connections/agent/providers` lists what each needs. Retell, Vapi, ElevenLabs and Bland keys are checked by listing agents first, so a refused key returns 400 and nothing is stored. Platforms that pull agents start syncing straight away. For `LIVEKIT_SELF_HOSTED` and the Pipecat providers, the response carries `observerApiKey`, shown once, for your SDK to report calls with. Most platforms connect once per project, and a second create returns 409; LiveKit Cloud may connect several accounts.

```bash Synopsis theme={"theme":{"light":"everforest-light","dark":"everforest-dark"}}
roark connections agent create [options]
```

> [!NOTE]
>
> Calls `POST /v1/connections/agent`

## Request body

This endpoint accepts one of several request shapes, so the body is supplied as
JSON through `--data` or on standard input rather than as individual flags.

**AgentConnectionCreateRetell** `object`

Requires `provider`, `name`, `apiKey`

**AgentConnectionCreateVapi** `object`

Requires `provider`, `name`, `apiKey`

**AgentConnectionCreateElevenLabs** `object`

Requires `provider`, `name`, `apiKey`

**AgentConnectionCreateBland** `object`

Requires `provider`, `name`, `apiKey`

**AgentConnectionCreateLeaping** `object`

Requires `provider`, `name`, `apiKey`, `agentIds`

**AgentConnectionCreateLivekit** `object`

Requires `provider`, `name`, `url`, `apiKey`, `apiSecret`

**AgentConnectionCreateLivekitSelfHosted** `object`

Requires `provider`, `name`

**AgentConnectionCreatePipecatSelfHosted** `object`

Requires `provider`, `name`

**AgentConnectionCreatePipecatCloud** `object`

Requires `provider`, `name`

**AgentConnectionCreateKore** `object`

Requires `provider`, `name`, `apiKey`, `appId`, `envName`

**AgentConnectionCreateGoogleCes** `object`

Requires `provider`, `name`, `wifConfig`, `location`, `appId`, `deploymentId`

## Example

```bash theme={"theme":{"light":"everforest-light","dark":"everforest-dark"}}
roark connections agent create --data '{ ... }'
```

Every command also takes the [global options](https://docs.roark.ai/cli-reference/overview.md#global-options) and sets one
of the [exit codes](https://docs.roark.ai/cli-reference/overview.md#exit-codes).


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