ConversationStore
interface ConversationStore
Methods
Get the participant's most recent conversation ID with the given agent.
Store a new conversation and return its ID.
Store a new user message for the given conversation and return its ID.
Store the assistant turn, folding a resume into the row it paused on, or null when nothing was stored.
Get the latest messages for the given conversation.
Durably record resolved approval results on the paused turn before the run continues.
Details
at line 23
string|null
latestConversationId(string $participantType, string|int $participantId, string $agent)
Get the participant's most recent conversation ID with the given agent.
at line 28
string
storeConversation(string|null $participantType, string|int|null $participantId, string $title, string|null $id = null)
Store a new conversation and return its ID.
at line 35
string
storeUserMessage(string $conversationId, string|null $participantType, string|int|null $participantId, string $agent, UserMessage $message)
Store a new user message for the given conversation and return its ID.
at line 42
string|null
storeAssistantMessage(string $conversationId, string|null $participantType, string|int|null $participantId, AgentPrompt $prompt, AgentResponse $response, Throwable|null $exception = null)
Store the assistant turn, folding a resume into the row it paused on, or null when nothing was stored.
at line 49
Collection
getLatestConversationMessages(string $conversationId, int $limit)
Get the latest messages for the given conversation.
at line 58
void
storeApprovalResults(string $conversationId, array $toolResults)
Durably record resolved approval results on the paused turn before the run continues.