[RFC] Agent Categorization + ReACT Agent OutputParser#955
Closed
[RFC] Agent Categorization + ReACT Agent OutputParser#955
Conversation
This was referenced Feb 4, 2025
yanxi0830
commented
Feb 4, 2025
| response_format: Optional[ResponseFormat] = None | ||
| stream: Optional[bool] = False | ||
| logprobs: Optional[LogProbConfig] = None | ||
| response_output_parser: Optional[ResponseOutputParser] = Field(default=ResponseOutputParser.default) |
Contributor
Author
There was a problem hiding this comment.
Synced offline w/ @ashwinb @hardikjshah , we will hold off this and put parsers on client SDK side.
Contributor
|
Summarizing what we discussed offline --
[ not sure if this will work, i think you ll have to test on this format and see what works , for eg. does optional work consistently ]
|
Contributor
Author
|
Closing PR, moving to https://github.com/meta-llama/llama-stack/discussions/975 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Problem
We want to standardize the steps necessary for users to build a ReACT agent with the ability to interleave between generating thoughts and taking task specific actions dynamically.
The current agent orchestration loop requires ad hoc logic for intercepting agent outputs and parsing outputs from output messages to fit a ReACT framework (example). This proposes changes to LlamaStack client SDKs and server APIs for better ergonomics to build an ReACT agent.
Proposed Solution
We want to have the flexibility to configure custom prompts and custom output parsers in agent loop execution.
Our current agent loop with custom tool calls will loop and call tools until there’s no more tool response. In ReACT framework, action output typically maps to a tool call. We can re-utilize the agent loop, but add a parsing logic right after agent outputs to populate “action” into ToolCall to enable ReACT.
Current Agent Types Summary
Agentinstance is defined by anAgentConfigAgentinstance can be categorized into several classesPass tool response as next turn (built-in tool & custom tool differ)
force_retrieval=?
output_parser=react_output_parser
Pass tool response as next turn
Proof of Concept Implementation