quick-lizard-90069
12/08/2025, 10:14 AMquick-lizard-90069
12/08/2025, 10:20 AMsession.chatCtx.insert() function. Is this enough to make it visible to the agent or do I also use the session.currentAgent.chatCtx.insert() ? I'm on typescipt agents v1.0.24quaint-ambulance-32873
12/08/2025, 12:55 PMconst ctx = session.currentAgent.chatCtx.copy();
ctx.insert(newItem);
await session.currentAgent.updateChatCtx(ctx);quick-lizard-90069
12/08/2025, 12:57 PMquaint-ambulance-32873
12/08/2025, 1:13 PMbitter-ghost-46918
12/08/2025, 4:29 PMagentSession.history is the global chatCtx. It keep track of all chat items across all agents during the session lifetime (as well as for analytic purpose). agent.chatCtx only keep track of chat history of that active agentquick-lizard-90069
12/09/2025, 8:30 AMquick-lizard-90069
12/09/2025, 9:59 AMquick-lizard-90069
12/11/2025, 9:20 AMbitter-ghost-46918
12/11/2025, 2:20 PMbut pushing to it does not seem to have any effectYou should always call
agent.updateChatCtx to update the chat context of a agent. Inserting into chat ctx object itself won't do anything.
As I am adding this back into context without the exact same tool name, I am violating this behaviour.If you have a different tool set then chat context
copy will automatically filter out all tool calls & outputs that are not part of the given tool set. This is required for models such as openai & gemini & anthropic, where it does not allow unrecognized tool name to appears in the chat history.
I'm curious what specific feature you'd like to implement. Maybe I can help you to find another wayquick-lizard-90069
12/11/2025, 2:56 PMdelegate_tool_call which has a param of create_note . This tool responds immediately with a success message to keep the conversation flowing. After the parallel execution I would like to report back to my agent by inserting the functionCall and functionCallOutput of the create_note toolcall so that it could follow up if it went wrong or use it in subsequent conversation. This feature is blocked by the filteringquick-lizard-90069
12/11/2025, 2:59 PMdeveloper or system message for the agent right?quick-lizard-90069
12/15/2025, 2:38 PMbitter-ghost-46918
12/15/2025, 5:06 PMThe agent itself can callI'm not entirely understand the approach here.. What's the intention behind calling a tool (delegate_tool_call) that calls another tool (create_note), what prevents you from just makingwhich has a param ofdelegate_tool_call. This tool responds immediately with a success message to keep the conversation flowing. After the parallel execution I would like to report back to my agent by inserting thecreate_noteandfunctionCallof thefunctionCallOutputtoolcall so that it could follow up if it went wrong or use it in subsequent conversation. This feature is blocked by the filteringcreate_note
create_note as a tool? And where does the parallel execution comes in? We do support parallel tool call for openai, which might be what you are looking for, or if I'm missing somethingquick-lizard-90069
12/16/2025, 8:37 AMcreate_note tool call is one that can take a lot of time so we don't want to block the response of the agent. There are several of these tools that I want to run on the side. I could just name that delegation to create_note but then after the actual execution I still want to provide confirmation or errors within the conversation. If I modify the original tool call messages, the agent history assumes that it knew this when generating the replies so it doesn't mention anything about it.
Secondly if I hand over to an agent that does not have the create_note then this message will still be filtered out right? Should I create summaries when handing over between agents?quick-lizard-90069
12/16/2025, 8:39 AMbitter-ghost-46918
12/16/2025, 8:56 AMbitter-ghost-46918
12/16/2025, 10:23 AMquick-lizard-90069
12/16/2025, 10:24 AM