You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Discussion] What am I missing? ReActAgent.from_tools() not working in LlamaIndex 0.13.x+
Hi LlamaIndex community! 👋
I'm trying to upgrade from LlamaIndex 0.12.x to 0.13.6+ but running into issues with ReActAgent.from_tools(). I'm sure I'm missing something obvious, but could use some guidance.
What I'm trying to do
I have existing code that works perfectly in LlamaIndex 0.12.x:
fromllama_index.core.agentimportReActAgentfromllama_index.core.toolsimportFunctionTool# This worked in 0.12.xagent=ReActAgent.from_tools(
tools=tools,
llm=Settings.llm,
verbose=True,
system_prompt=system_prompt,
max_iterations=6,
)
What's happening
When I upgrade to 0.13.6+, I get:
AttributeError: type object 'ReActAgent' has no attribute 'from_tools'
Environment
LlamaIndex Version: 0.13.6+
Python Version: 3.12
Operating System: macOS
Framework: LlamaIndex with Couchbase vector store
What I think I know
From reading the docs, I see there's a new workflow-based approach for ReAct agents introduced around 0.10.43. The workflow examples look great for complex use cases!
But I'm confused because:
My simple use case worked fine in 0.12.x
I can't find clear migration docs for the from_tools() pattern
The workflow approach seems like overkill for basic ReAct agents
My questions
Was ReActAgent.from_tools() intentionally removed in 0.13.x? Or am I importing from the wrong place?
Is there a simple equivalent for the old from_tools() pattern that doesn't require building a full workflow?
Is there migration documentation I missed that shows how to convert from the old API to the new one?
Should I stick with 0.12.x for now? Or is there an easy upgrade path I'm not seeing?
What I've tried
Checked the documentation (found workflow examples but no migration guide)
Looked at the API reference (ReActAgent exists but no from_tools method)
Searched GitHub issues (found workflow discussions but no clear migration path)
Context
This is affecting integration packages like agentc-llamaindex that require llama-index ^0.13.4 but still use the classic API pattern. So I'm probably not the only one running into this.
Any guidance would be much appreciated! I'm sure there's something simple I'm missing. 🙏
Example of what I'm looking for
Ideally something like:
# What I hope exists in 0.13.x+agent=SomeSimpleReActAgent.from_tools(...) # New class/method?# ORagent=ReActAgent.create_from_tools(...) # Renamed method?# ORagent=create_react_agent(...) # Helper function?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
[Discussion] What am I missing? ReActAgent.from_tools() not working in LlamaIndex 0.13.x+
Hi LlamaIndex community! 👋
I'm trying to upgrade from LlamaIndex 0.12.x to 0.13.6+ but running into issues with
ReActAgent.from_tools()
. I'm sure I'm missing something obvious, but could use some guidance.What I'm trying to do
I have existing code that works perfectly in LlamaIndex 0.12.x:
What's happening
When I upgrade to 0.13.6+, I get:
Environment
What I think I know
From reading the docs, I see there's a new workflow-based approach for ReAct agents introduced around 0.10.43. The workflow examples look great for complex use cases!
But I'm confused because:
from_tools()
patternMy questions
Was
ReActAgent.from_tools()
intentionally removed in 0.13.x? Or am I importing from the wrong place?Is there a simple equivalent for the old
from_tools()
pattern that doesn't require building a full workflow?Is there migration documentation I missed that shows how to convert from the old API to the new one?
Should I stick with 0.12.x for now? Or is there an easy upgrade path I'm not seeing?
What I've tried
from_tools
method)Context
This is affecting integration packages like
agentc-llamaindex
that requirellama-index ^0.13.4
but still use the classic API pattern. So I'm probably not the only one running into this.Any guidance would be much appreciated! I'm sure there's something simple I'm missing. 🙏
Example of what I'm looking for
Ideally something like:
Thanks for any help!
Beta Was this translation helpful? Give feedback.
All reactions