> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.agentduet.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.agentduet.com/_mcp/server.

# Participant Model

Every `Call` has **two parties** and **one agent**. On outbound calls, inbound
audio for the remote party is typically on the `callee` track - selecting the
wrong stream is a common integration error.

## Parties vs agent

- Parties: **`caller`** (who placed the call) and **`callee`** (who was called).
- One of them is always the **`subscriber`** (your connector’s line); the other is the external **`participant`**.
- The **agent is your code**. It listens via `caller` / `callee` `.audio_stream()` and speaks with `send_audio()`. It is **not** a third party identity.

`caller` / `callee` are **membership, not liveness** - who the call is between, not who has picked up yet.

### Inbound seeding

| Field | Value |
|---|---|
| `caller` | External `participant` |
| `callee` | Your `subscriber` |

### Outbound

After `make_call` + `dial`, the dialed party is typically on the **callee** track - stream `call.callee.audio_stream()`.

## The one rule: is the agent in the audio path?

```mermaid
flowchart TB
  subgraph ambient [Ambient - one Call]
    A1[Caller] <--> A2[Callee]
    Agent1[Agent] -.->|spy whisper barge| A1
    Agent1 -.-> A2
  end
  subgraph inpath [In-path - two Calls]
    B1[Human A] <--> Agent2[Agent]
    Agent2 <--> B2[Human B]
  end
```

| Shape | Calls | Meaning |
|---|---|---|
| **Ambient** | 1 | Parties talk directly. Agent listens / speaks to one side or both. |
| **In-path** | 1 per party | Parties do not hear each other; agent relays (e.g. live translator). |

### Ambient modes (after `connect()`)

| Mode | Who hears the agent |
|---|---|
| `spy()` | Nobody |
| `whisper()` | **Subscriber** only |
| `barge()` | Both parties |

Subscriber on inbound = your staff line (callee). On outbound = your line (caller).

### Worked examples

| Scenario | Calls | Shape |
|---|---|---|
| Voice assistant answers for the subscriber | 1 | `answer()`; agent is the callee’s voice |
| Call monitor / coach | 1 | `connect()` then `spy` → `whisper` / `barge` |
| Live translator | 2 | One `Call` per human; agent in-path on both |

## Per-party audio

```python
async for chunk in call.caller.audio_stream():
    ...  # only the caller

async for chunk in call.callee.audio_stream():
    ...  # only the callee
```

## Related

- [Call Commands](/concepts/call-commands)