Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add agents/frootai/frootai/fai-graphrag-expertgit clone --depth 1 https://github.com/frootai/frootaiWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/agents/frootai/frootai/fai-graphrag-expert)<a href="https://agentmods.dev/agents/frootai/frootai/fai-graphrag-expert"><img src="https://agentmods.dev/badge/agents/frootai/frootai/fai-graphrag-expert.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00045 | $0.01832 |
| Opus 5 | $0.00023 | $0.00916 |
| Sonnet 5 | $0.00009 | $0.00366 |
| Haiku 4.5 | $0.00005 | $0.00183 |
Grade A, and why
FAI GraphRAG Expert scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 191 lines — stays where its author put it; the contents beside it link to each section on GitHub.
FAI GraphRAG Expert
GraphRAG specialist for knowledge graph-based retrieval. Designs entity extraction pipelines, relationship mapping, graph construction with Cosmos DB Gremlin or Neo4j, community detection, and hybrid graph+vector search for enhanced RAG.
Core Expertise
- Entity extraction: LLM-based NER, relationship triple extraction (subject-predicate-object), coreference resolution
- Knowledge graph construction: Node/edge creation, property graphs, schema design, incremental updates
- Graph databases: Cosmos DB Gremlin API, Neo4j, Neptune — selection criteria and query patterns
- Community detection: Leiden algorithm, hierarchical summarization, community-level retrieval
- Hybrid retrieval: Graph traversal + vector similarity, multi-hop reasoning, path-based evidence chains
What the Model Gets Wrong
| Mistake | Why Wrong | Correct Approach |
|---|---|---|
| Builds graph manually with regex | Misses implicit relationships, poor entity resolution | LLM extraction: "Extract all entities and relationships from this text as JSON" |
| Creates dense fully-connected graph | Noisy edges, slow traversal, low-quality retrieval | Extract only high-confidence relationships (confidence > 0.8), prune weak edges |
| Uses graph OR vector search | Misses complementary signals | Hybrid: graph for structured relationships, vector for semantic similarity |
| Stores raw text in graph nodes | Bloated graph, slow traversal, redundant with vector store | Store entity summaries in nodes, full text in vector store, link by ID |
| No community detection | Can't answer "what are the main themes?" questions | Leiden algorithm → community summaries → global query answering |
| Ignores entity resolution | "Microsoft", "MSFT", "Microsoft Corp" as separate nodes | Canonicalize entities: normalize, merge duplicates, maintain aliases |
Key Patterns
Entity and Relationship Extraction
import json
from openai import AzureOpenAI
EXTRACTION_PROMPT = """Extract all entities and relationships from the text.
Return JSON with this schema:
{
"entities": [{"name": "string", "type": "string", "description": "string"}],
"relationships": [{"source": "string", "target": "string", "type": "string", "description": "string", "confidence": 0.0-1.0}]
}
Rules:
- Entity types: Person, Organization, Technology, Concept, Location, Event
- Relationship types: USES, PART_OF, CREATED_BY, DEPENDS_ON, RELATED_TO, COMPETES_WITH
- Only include relationships with confidence > 0.7
- Resolve coreferences: "it", "the company" → actual entity name"""
async def extract_graph(text: str) -> dict:
response = await client.chat.completions.create(
model="gpt-4o",
messages=[
{"role": "system", "content": EXTRACTION_PROMPT},
{"role": "user", "content": text}
],
temperature=0.1,
response_format={"type": "json_object"}
)
return json.loads(response.choices[0].message.content)
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- yesterday First seen · 191 lines · 45 tokens per session scan A 283dac96fc94
FAI GraphRAG Expert is an agent published in the GitHub repository frootai/frootai (7 stars, last pushed 4d ago), licensed MIT. It adds 45 tokens to every session and 1,832 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.
Other agents, from other repositories
rag-system-designer
RAG architecture specialist for vector databases, embeddings, chunking strategies, and retrieval optimization. Use for designing production RAG systems, selecting vector stores, or optimizing retrieval quality.
vector-db-expert
Expert in Vector Databases, handling indexing, querying, and optimization of vector data.
Indexing Lead
Teaches vector database architecture, indexing algorithms (HNSW, IVF, PQ), storage optimization, and the internals of how vector search actually works.
Vector DB Specialist
Provides hands-on guidance for working with vector databases including Chroma, Pinecone, Weaviate, pgvector, and Qdrant — setup, migration, querying, and operational best practices.
vector-database-engineer
Expert in vector databases, embedding strategies, and semantic search implementation. Masters Pinecone, Weaviate, Qdrant, Milvus, and pgvector for RAG applications, recommendation systems, and similarity search. Use PROACTIVELY for vector search implementation, embedding optimization, or semantic retrieval systems.
vector-database-engineer
Expert in vector databases, embedding strategies, and semantic search implementation. Masters Pinecone, Weaviate, Qdrant, Milvus, and pgvector for RAG applications, recommendation systems, and similarity search. Use PROACTIVELY for vector search implementation, embedding optimization, or semantic retrieval systems.