Agents

Codex + AgentLine

Codex

Give Codex a number it can actually call from

Can Codex make and receive phone calls?

Yes. With an authorized AgentLine MCP connection or API access, Codex can provision a US or Canada number, start calls and retrieve transcripts. AgentLine hosts inbound and outbound voice conversations. A relay or webhook adds live tool results from your runtime; an ordinary ChatGPT chat does not automatically have these permissions.

Connect Codex through MCP or the AgentLine skill to create a phone agent, provision a number, place calls and retrieve transcripts. Add the relay only when a call needs live tools from your environment.

Get an API key

One skill file

Install the AgentLine skill in Codex, set AGENTLINE_API_KEY, and ask it to provision a number. A hosted phone agent can handle calls without a live Codex session.

text
Get yourself a phone number and call me. Follow https://agentline.cloud/skill.md

Why give Codex a phone number

Codex writes it, AgentLine runs it

Let Codex generate the webhook or the agent prompt. The phone network stays on AgentLine.

No audio pipeline in the agent

AgentLine hosts speech and normal conversation. Codex can retrieve transcripts and supply facts or task results through the optional live integration.

Same number for voice and SMS

2FA codes, missed-call follow-up, and voice all share one identity.

Set up Codex

How the skill and the service land on this runtime.

1. Add the MCP server

Add this to ~/.codex/config.toml, then restart Codex.

toml
[mcp_servers.agentline]
command = "npx"
args = ["-y", "mcp-remote@latest", "https://api.agentline.cloud/mcp", "--header", "Authorization: Bearer $AGENTLINE_API_KEY"]

2. Install the relay service

Optional: connects explicit live lookups and tasks to Codex. Run on an available machine where the Codex CLI is installed with CODEX_API_KEY set — the installer checks both. Replace agt_xxx with your agent ID.

bash
python -c "import urllib.request; urllib.request.urlretrieve('https://api.agentline.cloud/static/agentline_relay.py','agentline_relay.py')"
python agentline_relay.py install --agent-id agt_xxx --runtime codex

Use Codex to set up and verify a phone agent

Guide updated

Before you start

  • An AgentLine account with an API key, an active US or Canada number and available plan allowance or wallet credit. Check current terms on the pricing page.
  • A destination number you control for the first test, plus a short approved instruction for the hosted phone agent.
  • Codex with authorized tool or terminal access. An ordinary ChatGPT conversation does not automatically have the same tools or local environment.

1. Choose MCP or the skill

Connect AgentLine through your Codex MCP settings, or have Codex read the skill and use the API. Check which tools are available before asking it to provision a number.

2. Define the task

Give Codex the phone agent's greeting, the facts it may use and the outcome you need. For a first test, ask the hosted agent to collect a preferred callback time from your own phone.

3. Run one test and review it

Have Codex create the hosted agent, provision or reuse its number, and call your test number. Ask for the call ID, final status and transcript rather than treating a queued call as success.

4. Add repository context

If a caller needs information from your repository or another tool, install the relay on an available machine with the required runtime credentials. The relay supplies facts or executes explicit tasks; it is not needed for every spoken sentence.

Check the result

  • Keep the agent ID, assigned number and call ID. A successful create-call response means the call was requested, not that someone answered.
  • Check the final call status and transcript. Compare the transcript with the task you asked the phone agent to complete.
  • For a booking, payment or other external action, check the destination system too. Spoken agreement is not proof that a calendar or database was updated.

Troubleshooting

Tools are missing or authentication fails
Check that the MCP connection is enabled in this client and that AGENTLINE_API_KEY is available to its process. Do not paste your key into a public prompt or example.
The call works but live lookups do not
Test the relay or webhook separately. The hosted phone agent can speak without your runtime; live tools require a reachable, authenticated integration. Follow the skill for call.utterance and turn-scoped context replies.

Related guides

FAQ

Does AgentLine work with Codex?

Yes. Install the skill, export AGENTLINE_API_KEY, and ask Codex to create an agent and buy a number.

Can Codex handle inbound calls live?

AgentLine handles inbound voice using the hosted agent prompt. Add a persistent relay or HTTPS webhook when an explicit request needs Codex tools or context, and test that integration separately.

Is there a number I can call to test?

Call +1 (734) 471-3677 to hear a hosted AgentLine agent, then provision your own on a plan from $20/month.

Clone a template next