Overview
Replay’s AI agents support Remote Procedure Call (RPC) methods through LiveKit’s RPC framework. These methods allow you to request data from the agent during an active conversation, such as retrieving the conversation transcript.Want to learn more about LiveKit RPC? Check out the official LiveKit RPC documentation for in-depth information about the underlying technology.
Available RPC Methods
get_agent_transcript
Retrieves the full conversation transcript from the AI agent, including all messages exchanged between the user and the agent.Use Cases
- Retrieving a full transcript at any point during the call
- Saving conversation records when a user ends the call
How to Invoke
Use LiveKit’s nativeperformRpc method on the local participant:
Method Name: The RPC method name is
get_agent_transcript (all lowercase with underscores).Return Signature
The method returns aTranscriptResponse object with the following structure:
Response Fields
| Field | Type | Description |
|---|---|---|
snippets | TranscriptSnippet[] | Array of conversation messages in chronological order |
createdAt | number | Unix timestamp (milliseconds) when the conversation was started |
TranscriptSnippet Fields
| Field | Type | Description |
|---|---|---|
speakerName | string | Display name of the speaker |
text | string | The actual transcribed message content |
createdAt | number | Unix timestamp (milliseconds) when the completed message was added to the transcript array. Typically corresponds to the time a user or agent finished speaking their snippet. |
isUser | boolean | true if the message is from the user, false if from the agent |
Example Response
Error Handling
RPC calls may fail for several reasons. Always implement proper error handling:Important Considerations:
- Ensure the user is connected to a LiveKit room before calling RPC methods
- The AI agent must be active and connected to the room
- RPC calls are asynchronous and may take time depending on transcript length
- Always implement timeout handling for production applications
Need Help? Contact our support team ([email protected]) for assistance with implementing RPC methods in your application.

