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

# add

```bash theme={null}
telnyx-acp add
```

With no arguments, `add` reopens the wizard over this project's `agent.json`, pre-filled, and asks again about the model, the numbers, email, the channels, the browser page, the greeting and voice, memory and the step limit. It needs a terminal. Each `add <thing>` below is the non-interactive form. Every form edits `agent.json` (`phone`, `email`, `web`, `channels`, `tools` or `secrets`), the next `deploy` applies the change, and a running `dev` reloads it, except `web` and `phone`, which the page reads as `dev` starts.

## Phone

```bash theme={null}
telnyx-acp add phone +15550001234
```

Adds a number the agent answers on, in E.164. `add` checks the format; the number must be in the account by the time of the next `deploy`, which looks it up and stops if it is missing. The next `deploy` puts it on a Call Control application for calls and a messaging profile for texts, and [Phone](/docs/agent-sdk/inside/configuration/phone) follows what happens from there.

## Email

```bash theme={null}
telnyx-acp add email
telnyx-acp add email support@acme.example
```

Answers email. With no address, the inbox is named after the agent on the account's shared inbound subdomain, with no DNS to set up. With an address, it is that inbox on a domain of the account's, which must be verified with inbound enabled. The next `deploy` finds or creates the inbox, subscribes its domain to `email.received` and prints the address.

## Web

```bash theme={null}
telnyx-acp add web
telnyx-acp add web --title "Acme Support"
```

Makes the agent reachable from a browser. The function serves a chat page at `<mount>/web` and an embed script at `<mount>/web/embed.js` for any site; without `web`, `/web` answers 404. The page is public once deployed: anyone with the URL can talk to the agent, and nothing on the page asks who they are. `--title` is the page's title and the launcher's label, the agent's name with dashes and underscores as spaces by default. When the agent has a number, the page's header shows it as a `tel:` link. When it has a number or `voice` settings, the page under `telnyx-acp dev` also has a voice button: the browser becomes the media stream (µ-law at 8 kHz, the same protocol as a call) and the exchange lands in the chat as bubbles; the deployed page does not offer that yet. `dev` serves the page from its next start; a `dev` already running needs a restart.

## Channel

```bash theme={null}
telnyx-acp add channel messaging_profile:<id>
```

Adds an existing artifact by type and id, `call_control_application`, `texml_application`, `messaging_profile` or `email_domain`, and never touches a number. The next `deploy` points the artifact's webhook at the function and remembers the previous one. [Channels](/docs/agent-sdk/inside/configuration/channels) follows what happens from there.

## Tool

```bash theme={null}
telnyx-acp add tool web_search
telnyx-acp add tool web_search --domains acme.example --freshness week --research --no-contents
telnyx-acp add tool mcp --url https://mcp.deepwiki.com/mcp
telnyx-acp add tool mcp --url https://mcp.acme.example/mcp --name crm --secret CRM_TOKEN --allow lookup_order,refund_order
telnyx-acp add tool agent_gateway --id <instance id>
```

Gives the model tools. `web_search` is [Web Search](/docs/web-search) as `web_search`, `fetch_page` and, with `--research`, `research`; it runs over the account's credential, so nothing to add. `mcp --url` is a remote MCP server: the CLI lists its tools and writes them into `agent.json`, and the model sees them as `<name>__<tool>`; `--secret NAME` authenticates (a bearer token, or `--header X-API-Key` to send it in that header), with the value read from `.env` here and from the platform secret once deployed. `agent_gateway --id` declares a gateway instance; the managed loop does not call a gateway's tools yet, so the entry is recorded for when it does. [Web Search](/docs/agents/tools/web-search), [MCP Servers](/docs/agents/tools/mcp-servers) and [Agent Gateway](/docs/agents/tools/agent-gateway) have each flag; `telnyx-acp tools` lists what the model has.

| Flag | Applies to | Meaning |
| - | - | - |
| `--domains <a,b>` | web\_search | Bare hostnames results are limited to. |
| `--freshness <when>` | web\_search | `day`, `week`, `month` or `year`. |
| `--research` | web\_search | Adds the `research` tool, slow. |
| `--no-contents` | web\_search | Leaves out `fetch_page`. |
| `--url <url>` | mcp | The server's Streamable HTTP endpoint. |
| `--name <name>` | mcp | The tools' prefix; from the host by default. |
| `--secret <NAME>` | mcp | The secret that authenticates to the server. |
| `--header <Header>` | mcp | Send the secret in this header instead of `Authorization: Bearer`. |
| `--allow <a,b>` | mcp | Only these of the server's tools. |
| `--id <id>` | agent\_gateway | The instance id. |

## Secret

```bash theme={null}
telnyx-acp add secret OPENAI_API_KEY
```

Stores a secret on the platform and binds it to the function. `add secret` prompts for the value, or reads it from stdin when piped, and `agent.json` records only the name. No value ever belongs in a file in the project or on a command line, and the error for a rejected secret names the secret, never its value. `.env` holds keys for `dev`, and the secret of an MCP server when `add tool mcp` or `tools --refresh` lists its tools; it is never read on the platform. The scaffolded `.gitignore` excludes `.telnyx/` and `node_modules/`, and `.env` belongs in it before the first commit.

Some secrets have a meaning of their own.

* `TELNYX_PUBLIC_KEY` is the account's public key. The function verifies every webhook's signature over the raw body against it before parsing the body, and answers 401 without it, so a project with a phone number, an email inbox or a channel must have it. `deploy` asks for it once.
* `OPENAI_API_KEY`, `ANTHROPIC_API_KEY`, `GOOGLE_API_KEY` and `GROQ_API_KEY` are sent as the caller's key for an `openai/*`, `anthropic/*`, `google/*` or `groq/*` model, and a class reads them with `env.SECRETS.get("OPENAI_API_KEY")`.

Nothing else needs a key. The Telnyx inference endpoint, Agent Memory, messaging and Call Control are reached with the account's credential through the function's binding.
