เฟรมเวิร์ก · LlamaIndex
ภาพรวม LlamaIndex
LlamaIndex ผสานเครื่องมือแยกวิเคราะห์เอกสารและค้นคืนข้อมูลเข้ากับ Agent Workflows แบบขับเคลื่อนด้วยเหตุการณ์ใน Python และ TypeScript Workflows หยุดรอข้อมูลจากมนุษย์ บันทึก state และให้บริการเป็น MCP servers หรือ deploy ไปยัง LlamaCloud ได้
เหมาะสำหรับ: เอเจนต์ที่ทำงานกับเอกสารจำนวนมากและเน้นการค้นคืนข้อมูล โดยแยกวิเคราะห์ ดึงข้อมูล และค้นหาก่อนลงมือทำ
ข้อมูลสำคัญ
- ผู้ดูแล
- LlamaIndex
- ภาษา
- Python, TypeScript
- ไลเซนส์
- MIT
- เวอร์ชันล่าสุด
llama-index 0.14.25 / llama-index-workflows 2.25.0· 25 กันยายน 2569- Repository
- run-llama/llama_index
- ตัวเลือกแบบโฮสต์
- LlamaCloud via LlamaAgents (llamactl deploy)
Quickstart
ติดตั้งแพ็กเกจ ตั้งค่าข้อมูลรับรอง แล้วเรียกใช้ agent ตัวอย่างที่เล็กที่สุดจากเอกสารทางการ Model ID เป็นค่าที่เอกสารใช้ และอาจยังไม่ได้เปิดใช้งานในบัญชีของคุณ
pip install llama-index-core llama-index-llms-openai (from search summary of the starter tutorial; not copied verbatim)import asyncio
from llama_index.core.agent.workflow import FunctionAgent
from llama_index.llms.openai import OpenAI
# Define a simple calculator tool
def multiply(a: float, b: float) -> float:
"""Useful for multiplying two numbers."""
return a * b
# Create an agent workflow with our calculator tool
agent = FunctionAgent(
tools=[multiply],
llm=OpenAI(model="gpt-4o-mini"),
system_prompt="You are a helpful assistant that can multiply two numbers.",
)
async def main():
# Run the agent
response = await agent.run("What is 1234 * 4567?")
print(str(response))
# Run the agent
if __name__ == "__main__":
asyncio.run(main())ฟีเจอร์
| ใช้ได้กับทุกโมเดล | ใช่ | ใช้ FunctionAgent กับโมเดลที่รองรับ function calling และใช้ ReActAgent กับโมเดลอื่น |
|---|---|---|
| MCP client | ใช่ | ใช้ get_tools_from_mcp_url จาก llama-index-tools-mcp |
| MCP server | ใช่ | workflow_as_mcp ให้บริการ workflow ผ่าน FastMCP |
| หลาย agent | ใช่ | AgentWorkflow ประสานงานเอเจนต์หลายตัว |
| การทำงานต่อเนื่องแบบทนทาน | ใช่ | Workflows บันทึก state ได้เมื่อเชื่อมต่อ coordination backend |
| การอนุมัติโดยมนุษย์ | ใช่ | InputRequiredEvent และ HumanResponseEvent ใช้หยุดรอใน workflow |
| Tracing | ยังไม่ยืนยัน | |
| Evals | ยังไม่ยืนยัน |
การเปลี่ยนแปลงล่าสุด
- เปลี่ยนชื่อ repo workflows เป็น run-llama/llama-agents (LlamaAgents); แพ็กเกจบน PyPI ยังคงชื่อ llama-index-workflows
- ตอนนี้ llamactl ใช้ให้บริการและ deploy workflows ได้