-
Notifications
You must be signed in to change notification settings - Fork 61
Open
Description
As part of a custom workflow system triggered by an LLM where steps are rendered dynamically in a chat.
I’d like to be able to save tool-call messages in addition to tool-result messages.
Currently, the saveMessage API only supports saving tool-result messages, but throws an error when attempting to save a message with type: "tool-call".
Example
const id = `call_${nanoid()}`;
await saveMessage(ctx, components.agent, {
agentName: ctx.agent?.options.name,
promptMessageId: ctx.messageId,
threadId: ctx.threadId,
message: {
role: "tool",
content: [{
type: "tool-call", // ❌ Currently not supported
toolName: tool,
toolCallId: id,
args: args,
}]
}
})When tool calls are long-running, it’s useful to display them in the UI as pending or in-progress.
Right now, there’s no way to persist that intermediate “tool call started” state, only the “tool result” state.
Metadata
Metadata
Assignees
Labels
No labels