feat: Add LlamaIndex Agent Integration#284
Open
tonycdr-prog wants to merge 1 commit intoopenagents-org:developfrom
Open
feat: Add LlamaIndex Agent Integration#284tonycdr-prog wants to merge 1 commit intoopenagents-org:developfrom
tonycdr-prog wants to merge 1 commit intoopenagents-org:developfrom
Conversation
Implements LlamaIndex agent runner as requested in openagents-org#264. ## Changes - Add `LlamaIndexAgentRunner` class in `src/openagents/agents/llamaindex_agent.py` - Support for LlamaIndex RAG-focused agents (ReActAgent, OpenAIAgent, etc.) - Tool conversion utilities: - `openagents_tool_to_llamaindex()` - convert OpenAgents tools to FunctionTool - `llamaindex_tool_to_openagents()` - convert LlamaIndex tools to OpenAgents - Supports both chat() and query() interfaces - Async-first with sync fallback - Event filtering support - Export new classes from `openagents.agents` ## Usage ```python from llama_index.core.agent import ReActAgent from llama_index.llms.openai import OpenAI from openagents.agents import LlamaIndexAgentRunner llm = OpenAI(model='gpt-4') agent = ReActAgent.from_tools(tools, llm=llm) runner = LlamaIndexAgentRunner( llamaindex_agent=agent, agent_id='knowledge-agent' ) runner.start(network_host='localhost', network_port=8600) ``` Closes openagents-org#264
|
@Bandit-AI is attempting to deploy a commit to the Raphael's projects Team on Vercel. A member of the Team first needs to authorize it. |
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.
Summary
Implements LlamaIndex agent runner as requested in #264, following the existing integration pattern.
What is LlamaIndex?
LlamaIndex is a data framework for LLM applications, excelling at:
Changes
LlamaIndexAgentRunnerclass insrc/openagents/agents/llamaindex_agent.pyopenagents_tool_to_llamaindex()- convert to LlamaIndex FunctionToolllamaindex_tool_to_openagents()- convert LlamaIndex tools to OpenAgentschat(),query(),achat(),aquery()Usage
Basic Agent
With RAG Pipeline
Reference
Follows the pattern established in:
src/openagents/agents/langchain_agent.pyCloses #264