Skip to content

[WIP] fix: ReACT Agent should be consistent with Agent #171

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

MichaelClifford
Copy link

Relies on changes in #142 getting merged first.

What does this PR do?

This PR updates the the ReActAgent class so that instantiating it is similar to Agent, with an explicit reliance on the user defining their AgentConfig and passing it as a parameter to the class.

agent = ReActAgent(client=client, agent_config=agent_config)

Closes #161

Test Plan

Tested the changes using a modified version of llama-stack-apps/examples/agents/react_agent.py with the AgentConfig explicitly defined and passed to the ReActAgent like below:

    agent_config = AgentConfig(
        model="meta-llama/Llama-3.1-8B-Instruct",
        enable_session_persistence = False,
        instructions = "You are a helpful assistant.",
        toolgroups = ["builtin::websearch"],
        client_tools = [torchtune],
        tool_choice="auto",
        tool_prompt_format="json",
        )

    agent = ReActAgent(
        client=client,
        agent_config = agent_config
    )

Note: since these changes rely on #142, be aware that this test snippet will likely not work until after the other PR is merged.

Signed-off-by: Michael Clifford <mcliffor@redhat.com>
@MichaelClifford
Copy link
Author

Closing as changes in #142 won't be merged in favor of #178. Can revisit in a followup PR based on #178.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ReACT Agent should be consistent with Agent
2 participants