feat(tools): add HumanTool for user interaction during agent workflows #255
+198
−2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Added human.ts to experimental tools and human.ts to agents. Updated io.ts in helpers to support the new tool. This PR solves step one of issue #121, which defines the HumanTool as a tool that can be invoked by a Bee agent when additional user input is required during its workflow.
This replaces a previous PR that I closed after incorporating the suggested changes. The previous PR had a complex merge conflict, and instead of resolving it, I decided to create a fresh branch and open this new PR for a cleaner submission.
Which issue(s) does this pull-request address?
Closes: #121
Description
This PR introduces the following changes to implement the first step of the HumanTool feature:
Tool Definition (human.ts in experimental/tools):
Implements the HumanTool as a tool equipped to Bee agents.
Allows agents to generate natural language (NL) messages to request specific information from the user.
Captures the user's NL response as tool output, appends it to the agent's memory, and resumes the workflow.
Agent Integration (human.ts in agents):
Integrates the HumanTool into the Bee agent workflow, enabling it to pause, call for human input, and continue based on the provided data.
Helper Update (io.ts):
Updated input/output handling in helpers/io.ts to support the HumanTool integration.
Checklist
yarn lint
oryarn lint:fix
yarn format
oryarn format:fix
yarn test:unit
yarn test:e2e