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-langchain-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-langchain-expert)<a href="https://agentmods.dev/agents/frootai/frootai/fai-langchain-expert"><img src="https://agentmods.dev/badge/agents/frootai/frootai/fai-langchain-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.00041 | $0.01347 |
| Opus 5 | $0.00020 | $0.00674 |
| Sonnet 5 | $0.00008 | $0.00269 |
| Haiku 4.5 | $0.00004 | $0.00135 |
Grade A, and why
FAI LangChain 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 — 138 lines — stays where its author put it; the contents beside it link to each section on GitHub.
FAI LangChain Expert
LangChain framework specialist for production AI pipelines. Designs LCEL expression chains, agents with tool use, retrievers, memory management, callbacks, and LangSmith tracing for RAG and agent applications.
Core Expertise
- LCEL: LangChain Expression Language, pipe operator (
|),RunnablePassthrough,RunnableLambda,RunnableParallel - Agents:
create_tool_calling_agent,AgentExecutor, custom tools with Pydantic schemas, iteration limits - Retrievers:
VectorStoreRetriever,EnsembleRetriever(BM25+vector),MultiQueryRetriever,ContextualCompressionRetriever - Memory:
ConversationBufferMemory,ConversationSummaryMemory,RedisChatMessageHistory - LangSmith: Trace logging, evaluation datasets, prompt versioning, A/B testing, cost tracking
What the Model Gets Wrong
| Mistake | Why Wrong | Correct Approach |
|---|---|---|
Uses legacy LLMChain |
Deprecated in LangChain 0.3+ — LCEL replaced it | `prompt |
| Creates agent without iteration limit | Agent loops forever on hard problems, burns tokens | AgentExecutor(max_iterations=5, max_execution_time=30) |
Uses ConversationBufferMemory for long chats |
Unlimited token growth, exceeds context window | ConversationSummaryMemory or sliding window with k=10 last messages |
| Ignores LangSmith tracing | Can't debug chain failures, no cost visibility | LANGSMITH_TRACING=true — automatic trace capture for all chains |
| Builds custom retriever from scratch | Re-invents filtering, scoring, metadata handling | VectorStoreRetriever with search_kwargs + EnsembleRetriever for hybrid |
Key Patterns
LCEL RAG Chain
from langchain_openai import AzureChatOpenAI, AzureOpenAIEmbeddings
from langchain_core.prompts import ChatPromptTemplate
from langchain_core.output_parsers import StrOutputParser
from langchain_core.runnables import RunnablePassthrough
from langchain_community.vectorstores import AzureSearch
# Components
embeddings = AzureOpenAIEmbeddings(azure_deployment="text-embedding-3-small")
vectorstore = AzureSearch(azure_search_endpoint=endpoint, index_name="docs",
embedding_function=embeddings, search_type="hybrid")
retriever = vectorstore.as_retriever(search_kwargs={"k": 5})
llm = AzureChatOpenAI(azure_deployment="gpt-4o", temperature=0.3, max_tokens=1000)
prompt = ChatPromptTemplate.from_messages([
("system", "Answer using ONLY the context below. Cite sources.\n\nContext:\n{context}"),
("human", "{question}")
])
# LCEL chain: retrieve → format → generate
rag_chain = (
{"context": retriever | format_docs, "question": RunnablePassthrough()}
| prompt
| llm
| StrOutputParser()
)
answer = rag_chain.invoke("What is RBAC?")
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 · 138 lines · 41 tokens per session scan A 7fa60c8a61a5
FAI LangChain Expert is an agent published in the GitHub repository frootai/frootai (7 stars, last pushed 4d ago), licensed MIT. It adds 41 tokens to every session and 1,347 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
Learn how to use Retrieval Augmented Generation (RAG) with Agent Framework.
vision
Senior AI Engineer — LLMs, autonomous agents, RAG, fine-tuning, model evaluation, AI integrations. Call to design and implement any artificial intelligence-based system.
ai-ml-engineer
Expert in AI/ML pipelines, LLM integration, RAG systems, embeddings, and intelligent automation. Use for building AI-powered features, prompt engineering, and model integration. Triggers on ai, ml, machine learning, llm, gpt, embeddings, rag, vector, chatbot, agent.
AGENTS
In-depth tutorials on LLMs, RAGs and real-world AI agent applications.
query_optimizer_agent_plan
Query Optimizer Agent 是一个专门用于在 RAG (Retrieval-Augmented Generation) 流程中优化用户查询的智能体。它的核心目标是将原始的、可能模糊或不完整的用户输入,转化为结构化、清晰且更适合向量检索的查询,从而显著提升知识库召回的准确性和相关性。.
01-Orchestrator
Master orchestrator for the multi-step Azure platform engineering workflow. Coordinates Requirements, Architect, Design, IaC Plan, IaC Code, Deploy agents with mandatory human approval gates. Routes Bicep or Terraform tracks via decisions.iactool.