Skip to content

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