[
https://issues.apache.org/jira/browse/CAMEL-27244?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Work on CAMEL-27244 started by Federico Mariani.
------------------------------------------------
> camel-spring-ai-chat - ask a person to confirm a tool call before an ai-tool
> route runs
> ---------------------------------------------------------------------------------------
>
> Key: CAMEL-27244
> URL: https://issues.apache.org/jira/browse/CAMEL-27244
> Project: Camel
> Issue Type: New Feature
> Components: camel-ai, camel-spring-ai
> Reporter: Federico Mariani
> Assignee: Federico Mariani
> Priority: Major
>
> Spring AI 2.1.0 can pause the tool-calling loop before a tool runs ("tool
> call confirmation"). When the model calls a tool marked
> {{requiresConfirmation}}, or one chosen by a {{ToolCallConfirmationPolicy}}
> (for example by name, for MCP tools), no call of that reply runs. The reply
> goes back to the application with the calls that wait for a decision. The
> application collects one {{ToolCallDecision}} per call (allow, or deny with a
> message), runs them with {{ToolCallingManager.executeToolCalls(prompt, reply,
> decisions)}} and sends the results to the model. The loop keeps nothing while
> it waits, so the decision can come much later and from another instance.
> For Camel this is a human-in-the-loop step for ai-tool routes that change
> things (book, delete, pay): the approval can come from any route, such as a
> mail, a chat message, a REST call or a task list.
> h3. Proposal, to refine
> * A way to mark the tools that need confirmation: an ai-tool route option,
> and an endpoint option naming tools (which also covers MCP tools).
> * spring-ai-chat: when the loop pauses, the exchange ends with the pending
> calls (id, name, arguments) in a header, and a header that tells the reply
> waits for a decision. The conversation is kept by the session memory, the
> chat memory, or the caller.
> * Resume: a request that carries the decisions runs the allowed calls,
> answers the denied ones with their message, and continues the loop.
> * openai and langchain4j-agent do not support it: a tool that needs
> confirmation must fail there instead of running without one.
> _Claude Code on behalf of Croway_
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)