# Give Codex a number it can actually call from

- **URL:** https://agentline.cloud/build/codex
- **Runtime:** Codex
- **Keywords:** Codex phone number, Codex voice agent, phone number for AI agents, AI telephony, AI voice API

Codex can write the integration. AgentLine is the number, the dial tone, and the transcript so that integration is one skill instead of a Twilio weekend.

## One skill file

Install the AgentLine skill in Codex, set AGENTLINE_API_KEY, and ask it to provision a number. The relay keeps live call turns in-session.

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

## Why Codex needs its own 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

Codex never sees PCM. It sees transcripts and writes the next sentence.

### Same number for voice and inbound SMS

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

## Python

```python
from agentline import AgentLine

client = AgentLine(api_key="al_live_...")

agent = client.agents.create(
    name="Voice Agent",
    system_prompt="You are a helpful voice agent. Keep spoken turns under 15 words.",
    initial_greeting="Hey, this is your agent. How can I help?",
    voice_id="female-1",
)

number = client.numbers.buy(agent_id=agent.id, country="US", area_code="415")
call = client.calls.create(agent_id=agent.id, to="+14155557890")
print("Number:", number)
print("Call:", call)
```

## Node.js

```ts
import AgentLine from "agentline";

const client = new AgentLine({ apiKey: "al_live_..." });

const agent = await client.agents.create({
  name: "Voice Agent",
  systemPrompt: "You are a helpful voice agent. Keep spoken turns under 15 words.",
  initialGreeting: "Hey, this is your agent. How can I help?",
  voiceId: "female-1",
});

const number = await client.numbers.buy({
  agentId: agent.id,
  country: "US",
  areaCode: "415",
});
const call = await client.calls.create({
  agentId: agent.id,
  to: "+14155557890",
});
console.log("Number:", number);
console.log("Call:", call);
```

## 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?**

With the persistent relay installed, live utterances reach the runtime. A public webhook is the fallback.

**Is there a US number I can test against?**

Call +1 (734) 471-3677 to hear a hosted AgentLine agent, then provision your own for $2.
