The DurableAgent class strigifies tool call outputs to strings before returning them.
|
value: JSON.stringify(toolResult) ?? '', |
Why does this happen? It just makes it harder to consume the tools since it violates the types and I must parse the output before consuming. As a workaround, I have made my own version of this class without this behavior.
The
DurableAgentclass strigifies tool call outputs to strings before returning them.workflow/packages/ai/src/agent/durable-agent.ts
Line 1089 in ee7b1fd
Why does this happen? It just makes it harder to consume the tools since it violates the types and I must parse the output before consuming. As a workaround, I have made my own version of this class without this behavior.