> ## 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.

# The Generated Code

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

```text {2,3,5,6,7,8,26,28} theme={null}
support-agent/
├── agent.json                                         ◀
├── instructions.md                                    ◀
└── .telnyx/                        written by deploy
    ├── index.ts                                       ◀
    ├── telnyx.toml                                    ◀
    ├── telnyx-env.d.ts                                ◀
    └── package.json                                   ◀

@telnyx/acp/                      the package
├── managed/
│   ├── index.ts
│   ├── agent.ts
│   ├── model.ts
│   ├── memory.ts
│   ├── tools.ts
│   ├── mcp.ts
│   ├── voice.ts
│   ├── direct-turn.ts
│   └── filler.ts
├── channels/
│   ├── index.ts
│   ├── phone.ts
│   ├── email.ts
│   ├── web.ts
│   └── wire.ts
├── synth/
│   ├── index.ts                                       ◀
│   ├── code-entry.ts
│   └── vendor.ts                                      ◀
└── spec/
    ├── schema.ts
    ├── model.ts
    ├── phone.ts
    ├── project.ts
    └── io.ts
```

A configuration-based agent is a class the user never sees. It extends `Agent` from the [Agent Runtime SDK](/docs/agent-sdk/runtime-sdk) and drives the [Agent Harness SDK](/docs/agent-sdk/harness-sdk). This chapter opens it in the order the CLI builds it. This page is the code `deploy` generates. [Configuration](/docs/agent-sdk/inside/configuration/model) follows each field of `agent.json` into that code. [The Harness](/docs/agent-sdk/inside/harness) is where those fields are plugged in, once per activation. [Request Handling](/docs/agent-sdk/inside/request-handling/rpc-methods) follows each inbound request to its handler. [Turn Taking](/docs/agent-sdk/inside/turn-taking/admit) is the loop itself, from the admitted message to the delivered reply. Every piece named here can be overridden by the user, and [Extending the Managed Agent](/docs/agent-sdk/extending) describes how.

`create` writes no code; [Project Layout](/docs/agents/project-layout) shows the files. The class comes into being at `deploy`, which generates `.telnyx/index.ts` from `agent.json`, with `instructions.md` inlined so that the deployed function reads no files. For `support-agent` the file is this, with the spec abbreviated:

```ts theme={null}
// Generated by `telnyx-acp deploy`. Do not edit: it is rewritten on every deploy.
import { mountAgents } from "@telnyx/edge-runtime/mount";
import { defineManagedAgent } from "@telnyx/acp/managed";
import { channelRoutes } from "@telnyx/acp/channels";

// agent.json, with instructions.md inlined: the deployed function reads no files.
const spec = { name: "support-agent", model: "zai-org/GLM-5.3-Flash", instructions: "…" } as const;

export class SupportAgent extends defineManagedAgent(spec) {}

export default {
  fetch: mountAgents<Env>((env) => ({ "support-agent": env.SUPPORT_AGENT }), {
    fallback: channelRoutes([], { agent: "support-agent", binding: "SUPPORT_AGENT" }),
  }),
};
```

Three lines carry the agent.

* `export class SupportAgent extends defineManagedAgent(spec) {}` is the agent. `defineManagedAgent(spec)` is the managed harness bound to this spec, and `SupportAgent` is the actor type the platform runs, one instance per conversation.
* [`mountAgents`](/docs/agent-sdk/internals/mount/mountAgents) is the function's `fetch`. It serves every conversation at `/agents/support-agent/<conversation>`.
* `channelRoutes` is the fallback for everything else the function receives, which is the webhooks. With `web` set, the options also carry `web`, and the fallback serves the chat page at `/web` and the embed script at `/web/embed.js` before the webhook routes.

`mountAgents(map, { fallback })` is [`mountAgents()`](/docs/agent-sdk/internals/mount/mountAgents).

* `map` is the whole routing table. Its one entry serves the actor namespace `env.SUPPORT_AGENT` under the mount name `support-agent`.
* `fallback` receives every request whose path is outside `/agents`.

Beside it, `deploy` writes `telnyx.toml`, the manifest that names the actor type and its binding, `telnyx-env.d.ts` with the types, and a `package.json`. It then links `@telnyx/acp` and `@telnyx/edge-runtime` into `.telnyx/node_modules`, in `synth/vendor.ts`, so that the bundle built on this machine resolves them. With a phone number, or a Call Control application among the channels, the base is `defineManagedVoiceAgent(spec)` instead; `export` writes the same class into `src/agent.ts` for the user to own, and counts a TeXML application as answering calls too. The module names on the pages that follow, `managed/agent.ts` and the rest, are files of the `@telnyx/acp` package.
