Security advisory — Malicious litellm versions 1.82.7 and 1.82.8 were removed from PyPI (potential API key exfiltration). Uninstall them, rotate exposed credentials, and upgrade to a safe release (e.g. 1.82.9+ per upstream). Run pip show litellm to verify. PyPI · README

Knowledge & RAG

Document intelligence and RAG with AgenticX.

Knowledge & RAG

Overview

AgenticX provides a complete document intelligence pipeline — from ingestion and chunking to hybrid retrieval and GraphRAG.


Document Ingestion

python
1from agenticx.knowledge import KnowledgeBase
2
3kb = KnowledgeBase(name="my-docs")
4
5# Add documents
6kb.add_file("report.pdf")
7kb.add_url("https://example.com/article")
8kb.add_text("AgenticX is a multi-agent framework...", source="manual")
9
10# Process (chunk, embed, index)
11kb.build()

Retrieval

python
1# Vector retrieval
2results = kb.search("What are the key features?", top_k=5)
3
4# Hybrid retrieval (vector + BM25)
5results = kb.search("key features", mode="hybrid", top_k=10)
6
7# With reranking
8results = kb.search("key features", mode="hybrid", rerank=True, top_k=5)

GraphRAG

For complex documents with rich relationships, use GraphRAG:

python
1from agenticx.knowledge import GraphKnowledgeBase
2
3gkb = GraphKnowledgeBase(
4 name="research-papers",
5 graph_backend="neo4j", # or "nebula"
6 neo4j_uri="bolt://localhost:7687"
7)
8
9gkb.add_file("research_paper.pdf")
10gkb.build() # Extracts entities and relationships
11
12# Graph-aware retrieval
13results = gkb.search("relationship between agent memory and performance")

Giving a Knowledge Base to an Agent

python
1from agenticx.tools import KnowledgeBaseTool
2
3kb_tool = KnowledgeBaseTool(knowledge_base=kb)
4
5executor = AgentExecutor(
6 agent=agent,
7 llm=llm,
8 tools=[kb_tool]
9)

Supported Document Formats

FormatReader
PDFMinerU / PyMuPDF
Word (.docx)python-docx
PowerPoint (.pptx)python-pptx
MarkdownNative
HTMLBeautifulSoup
CSV / ExcelPandas
Plain textNative

Embeddings

python
1from agenticx.embeddings import OpenAIEmbeddings
2
3embeddings = OpenAIEmbeddings(model="text-embedding-3-small")
4kb = KnowledgeBase(name="my-docs", embeddings=embeddings)

Supported embedding providers: OpenAI, Bailian, SiliconFlow, LiteLLM.


Vector Stores

StoreNotes
FaissLocal, fast, no server required
ChromaLocal or server mode
QdrantProduction-grade, cloud available
MilvusHigh-scale enterprise
PgVectorPostgreSQL extension
PineconeManaged cloud
WeaviateManaged cloud with GraphQL