datarobot_genai.dragent.plugins.per_user_tool_calling_agent
per_user_tool_calling_agent
Per-user variant of the NAT tool_calling_agent workflow.
The built-in tool_calling_agent is registered as a shared workflow, which
means NAT's dependency validator forbids it from referencing per-user function
groups such as a2a_client. This module registers an identical workflow under
the name per_user_tool_calling_agent using register_per_user_function so
that per-user function groups can be used while still benefiting from OpenAI-style
structured tool calling (bind_tools).
NAT 1.6 added a stream_fn that yields ChatResponseChunk (and a single_fn that
returns str). This wrapper leaves that native output untouched; the
datarobot_dragent_normalization middleware converts it into DRAgentEventResponse with
valid AG-UI event sequences. Declare that middleware on this function (in the workflow block
when this agent is the workflow, or on the inner function when it is a memory wrapper's
inner_agent_name).
PerUserToolCallAgentWorkflowConfig
Bases: ToolCallAgentWorkflowConfig
Per-user version of tool_calling_agent.