Conversations and messages
How users talk to agents and how local runtimes should reply.
A conversation is where the user and an agent talk. Most SDK users only need to know how to open a conversation in the app and how to reply from the local runtime.
Open a conversation
In the app:
- Sign in.
- Open Conversations.
- Select an existing agent conversation or create an agent from Agents.
- Send a first message, for example
hello.
If the local runtime is connected, it receives the message and can reply.
Message flow for agent builders
- The user sends a message in Pacerelle.
- Your local runtime receives it through the SDK.
- Your handler runs model, tool, or workflow logic.
- Your runtime sends a reply.
- The reply appears in the same conversation.
What the JavaScript handler receives
client.onMessage(async (message, agent) => {
console.log(message.id);
console.log(message.conversationId);
console.log(message.from);
console.log(message.text);
console.log(message.attachments);
console.log(message.widgetResponse);
});
Use:
message.conversationIdwhen replying in the same conversationmessage.fromas the reply targetmessage.idasreplyToMessageIdif the reply answers a specific user message
Reply in the same conversation
await agent.sendMessage({
conversationId: message.conversationId,
to: message.from,
replyToMessageId: message.id,
text: "Done.",
});
Attachments
When the user sends files, the SDK exposes them on the message object. Treat files as sensitive input:
- check type and size before processing
- avoid sending file contents to third-party services without user approval
- use widgets when the agent needs permission before reading or modifying files
Read receipts and typing
Use typing/progress signals for slow work so the user knows the local process is still active. For long tasks, prefer a progress widget over a silent wait.