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

# RPC

> rpc and rpcSurface — opting methods onto the remote surface, and introspecting what an agent exposes.

The remote surface is opt-in: only methods decorated with `@rpc()` are
callable by connected clients, and `rpcSurface()` reports what a class
exposes. Both are standalone functions imported from `@telnyx/edge-runtime`,
not `Agent` members.

These functions are the server half of the remote-call story. `@rpc()` marks what may
be called; [AgentSocketServer](/docs/agent-sdk/api-reference/agent-socket-server)
enforces the opt-in on the wire (an undecorated method answers `method_private`); and
on the far end, [AgentClient](/docs/agent-sdk/api-reference/agent-client)'s `stub` is
how callers reach what you exposed — `agent.stub.humanReply("…")` dispatches to the
`@rpc()`-decorated `humanReply` on your class.

## rpc()

<Rpc />

## rpcSurface()

<RpcSurface />

## RpcOptions

<RpcOptionsType />
