Repository navigation
Four tool-safety habits for FunctionAgent / AgentWorkflow (free MIT patterns) #24169
stackyardweekstart
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Disclosure: this is ours, from Stackyard. It's a free, MIT-licensed set of 10 small habits for agents that call tools, each a short guide plus a snippet to adapt (patterns, not a library): https://github.com/stackyardweekstart/weekstart-starter-pack
Four of them map cleanly onto
FunctionAgent/AgentWorkflow:await ctx.wait_for_event(HumanResponseEvent, waiter_event=InputRequiredEvent(...)), as in the human-in-the-loop guide. Keep the list of tools that must ask hard-coded, and treat anything but an explicit yes as no.max_iterationsto.run()so a looping agent stops, and keep your own token tally that ends the run once it passes a budget.ToolCall.tool_id, since a rerun gets a fresh id and would write twice.stream_events(),ToolCallis what the agent asked to do andToolCallResultis what the tool sent back. Log them separately under one run id.There's also a free weekly brief on agent tool and API changes: https://stackyard.fyi
All reactions