Orchestra-Research/AI-Research-SKILLs / 14-agents/llamaindex
llamaindex
VerifiedData framework for building LLM applications with RAG. Specializes in document ingestion (300+ connectors), indexing, and querying. Features vector indices, query engines, agents, and multi-modal support. Use for document Q&A, chatbots, knowledge retrieval, or building RAG pipelines. Best for data-centric LLM applications.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 14.4 KB |
| references/agents.md | markdown | 1.9 KB |
| references/data_connectors.md | markdown | 2.3 KB |
| references/query_engines.md | markdown | 9.7 KB |
references/agents.md
View on GitHub# LlamaIndex Agents Guide
Building agents with tools and RAG capabilities.
## Basic agent
```python
from llama_index.core.agent import FunctionAgent
from llama_index.llms.openai import OpenAI
def multiply(a: int, b: int) -> int:
"""Multiply two numbers."""
return a * b
llm = OpenAI(model="gpt-4o")
agent = FunctionAgent.from_tools(
tools=[multiply],
llm=llm,
verbose=True
)
response = agent.chat("What is 25 * 17?")
```
## RAG agent
```python
from llama_index.core.tools import QueryEngineTool
# Create query engine as tool
index = VectorStoreIndex.from_documents(documents)
query_tool = QueryEngineTool.from_defaults(
query_engine=index.as_query_engine(),
name="python_docs",
description="Useful for Python programming questions"
)
# Agent with RAG + calculator
agent = FunctionAgent.from_tools(
tools=[query_tool, multiply],
llm=llm
)
response = agent.chat("According to the docs, what is Python?")
```
## Multi-document agent
```python
# Multiple knowledge bases
python_tool = QueryEngineTool.from_defaults(
query_engine=python_index.as_query_engine(),
name="python_docs",
description="Python programming documentation"
)
numpy_tool = QueryEngineTool.from_defaults(
query_engine=numpy_index.as_query_engine(),
name="numpy_docs",
description="NumPy array documentation"
)
agent = FunctionAgent.from_tools(
tools=[python_tool, numpy_tool],
llm=llm
)
# Agent chooses correct knowledge base
response = agent.chat("How do I create numpy arrays?")
```
## Best practices
1. **Clear tool descriptions** - Agent needs to know when to use each tool
2. **Limit tools to 5-10** - Too many confuses agent
3. **Use verbose mode during dev** - See agent reasoning
4. **Combine RAG + calculation** - Powerful combination
5. **Test tool combinations** - Ensure they work together
## Resources
- **Agents Docs**: https://developers.llamaindex.ai/python/framework/modules/agents/
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| writing-skillsobra/superpowersUse when creating new skills, editing existing skills, or verifying skills work before deployment | Stars: 323k | Updated | Claude CodeCodex | Verified | Install |
| xlsxanthropics/skillsUse this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing .xlsx, .xlsm, .xltx, .csv, or .tsv file (e.g., adding columns, computing formulas, formatting, charting, cleaning messy data); create a new spreadsheet from scratch or from other data sources; or convert between tabular file formats. Trigger especially when the user references a spreadsheet file by name or path — even casually (like "the xlsx in my downloads") — and wants something done to it or produced from it. Also trigger for cleaning or restructuring messy tabular data files (malformed rows, misplaced headers, junk data) into proper spreadsheets. The deliverable must be a spreadsheet file. Do NOT trigger when the primary deliverable is a Word document, HTML report, standalone Python script, database pipeline, or Google Sheets API integration, even if tabular data is involved. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| shipping-and-launchaddyosmani/agent-skillsPrepares production launches. Use when preparing to deploy to production, or when asking what needs to be in place before shipping. Use when you need a pre-launch checklist, when setting up monitoring, when planning a staged rollout, or when you need a rollback strategy. | Stars: 119k | Updated | Claude CodeCodex | Verified | Install |
| childhoodthedotmack/claude-memBabysit a shipped release after merge, publication, or deployment. Verify published packages, production behavior, installed plugins, and late CI or user reports until the observation window is clean; use babysit for PR readiness before release. | Stars: 118k | Updated | Claude CodeCodex | Verified | Install |