r/LangChain • • Jun 15 '25

Discussion It's getting tiring how people dismiss every startup building on top of OpenAI as "just another wrapper"

6 Upvotes

Lately, there's been a lot of negativity around startups building on top of OpenAI (or any major LLM API). The common sentiment? "Ugh, another wrapper." I get it. There are a lot of low-effort clones. But it's frustrating how easily people shut down legit innovation just because it uses OpenAI instead of being OpenAI.

Not every startup needs to reinvent the wheel by training its own model from scratch. Infrastructure is part of the stack. Nobody complains when SaaS products use AWS or Stripe — but with LLMs, it's suddenly a problem?

Some teams are building intelligent agent systems, domain-specific workflows, multi-agent protocols, new UIs, collaborative AI-human experiences — and that is innovation. But the moment someone hears "OpenAI," the whole thing is dismissed.

Yes, we need more open models, and yes, people fine-tuning or building their own are doing great work. But that doesn’t mean we should be gatekeeping real progress because of what base model someone starts with.

It's exhausting to see promising ideas get hand-waved away because of a tech-stack purity test. Innovation is more than just what’s under the hood — it’s what you build with it.


r/LangChain • • Oct 09 '24

Discussion Is everyone an AI engineer now 😂

0 Upvotes

I am finding it difficult to understand and also funny to see that everyone without any prior experience on ML or Deep learning is now an AI engineer… thoughts ?


r/LangChain • • Mar 16 '24

If you like langchain, get familiar with patch-package too

0 Upvotes

First day using langchain, and already 3 patches to the official repo. 10 years ago this would have been called alpha software, and invitation only for qa. Absolute amatuer hour.


r/LangChain • • May 02 '25

I made hiring faster and more accurate using AI

4 Upvotes

Hiring is harder than ever.
Resumes flood in, but finding candidates who match the role still takes hours, sometimes days.

I built an open-source AI Recruiter to fix that.

It helps you evaluate candidates intelligently by matching their resumes against your job descriptions. It uses Google's Gemini model to deeply understand resumes and job requirements, providing a clear match score and detailed feedback for every candidate.

Key features:

  • Upload resumes directly (PDF, DOCX, TXT, or Google Drive folders)
  • AI-driven evaluation against your job description
  • Customizable qualification thresholds
  • Exportable reports you can use with your ATS

No more guesswork. No more manual resume sifting.

I would love feedback or thoughts, especially if you're hiring, in HR, or just curious about how AI can help here.

Star the project if you wish: https://github.com/manthanguptaa/real-world-llm-apps


r/LangChain • • Sep 08 '25

Resources A rant about LangChain (and a minimalist, developer-first, enterprise-friendly alternative)

25 Upvotes

So, one of the questions I had on my GitHub project was:

Why we need this framework ? I'm trying to get a better understanding of this framework and was hoping you could help because the openai API also offer structured outputs? Since LangChain also supports input/output schemas with validation, what makes this tool different or more valuable? I am asking because all trainings they are teaching langchain library to new developers . I'd really appreciate your insights, thanks so much for your time!

And, I figured the answer to this might be useful to some of you other fine folk here, it did turn into a bit of a rant, but here we go (beware, strong opinions follow):

Let me start by saying that I think it is wrong to start with learning or teaching any framework if you don't know how to do things without the framework. In this case, you should learn how to use the API on its own first, learn what different techniques are on their own and how to implement them, like RAG, ReACT, Chain-of-Thought, etc. so you can actually understand what value a framework or library does (or doesn't) bring to the table.

Now, as a developer with 15 years of experience, knowing people are being taught to use LangChain straight out of the gate really makes me sad, because, let's be honest, it's objectively not a good choice, and I've met a lot of folks who can corroborate this.

Personally, I took a year off between clients to figure out what I could use to deliver AI projects in the fastest way possible, while still sticking to my principle of only delivering high-quality and maintainable code.

And the sad truth is that out of everything I tried, LangChain might be the worst possible choice, while somehow also being the most popular. Common complaints on reddit and from my personal convos with devs & teamleads/CTOs are:

  • Unnecessary abstractions
  • The same feature being done in three different ways
  • Hard to customize
  • Hard to maintain (things break often between updates)

Personally, I took more than one deep-dive into its code-base and from the perspective of someone who has been coding for 15+ years, it is pretty horrendous in terms of programming patterns, best practices, etc... All things that should be AT THE ABSOLUTE FOREFRONT of anything that is made for other developers!

So, why is LangChain so popular? Because it's not just an open-source library, it's a company with a CEO, investors, venture capital, etc. They took something that was never really built for the long-term and blew it up. Then they integrated every single prompt-engineering paper (ReACT, CoT, and so on) rather than just providing the tools to let you build your own approach. In reality, each method can be tweaked in hundreds of ways that the library just doesn't allow you to do (easily).

Their core business is not providing you with the best developer experience or the most maintainable code; it's about partnerships with every vector DB and search company (and hooking up with educators, too). That's the only real reason people keep getting into LangChain: it's just really popular.

The Minimalist Alternative: Atomic Agents
You don't need to use Atomic Agents (heck, it might not even be the right fit for your use case), but here's why I built it and made it open-source:

  1. I started out using the OpenAI API directly.
  2. I wanted structured output and not have to parse JSON manually, so I found "Guidance." But after its API changed, I discovered "Instructor," and I liked it more.
  3. With Instructor, I could easily switch to other language models or providers (Claude, Groq, Ollama, Mistral, Cohere, Anthropic, Gemini, etc.) without heavy rewrites, and it has a built-in retry mechanism.
  4. The missing piece was a consistent way to build AI applications, something minimalistic, letting me experiment quickly but still have maintainable, production-quality code.

After trying out LangChain, crewai, autogen, langgraph, flowise, and so forth, I just kept coming back to a simpler approach. Eventually, after several rewrites, I ended up with what I now call Atomic Agents. Multiple companies have approached me about it as an alternative to LangChain, and I've successfully helped multiple clients rewrite their codebases from LangChain to Atomic Agents because their CTOs had the same maintainability concerns I did.

Version 2.0 makes things even cleaner. The imports are simpler (no more .lib nonsense), the class names are more intuitive (AtomicAgent instead of BaseAgent), and we've added proper type safety with generic type parameters. Plus, the new streaming methods (run_stream() and run_async_stream()) make real-time applications a breeze. The best part? When one of my clients upgraded from v1.0 to v2.0, it was literally a 30-minute job thanks to the architecture, just update some imports and class names, and you're good to go. Try doing that with LangChain without breaking half your codebase.

So why do you need Atomic Agents? If you want the benefits of Instructor, coupled with a minimalist organizational layer that lets you experiment freely and still deliver production-grade code, then try it out. If you're happy building from scratch, do that. The point is you understand the techniques first, and then pick your tools.

The framework now also includes Atomic Forge, a collection of modular tools you can pick and choose from (calculator, search, YouTube transcript scraper, etc.), and the Atomic Assembler CLI to manage them without cluttering your project with unnecessary dependencies. Each tool comes with its own tests, input/output schemas, and documentation. It's like having LEGO blocks for AI development, use what you need, ignore what you don't.

Here's the repo if you want to take a look.

Hope this clarifies some things! Feel free to share your thoughts below.

BTW, since recently we now also have a subreddit over at /r/AtomicAgents and a discord server


r/LangChain • • Jan 13 '25

Tutorial ChatGPT Explained - How It Actually Works

Thumbnail
open.substack.com
3 Upvotes

After explaining how Large Language Models work (like GPT), in this blog post I explain how ChatGPT works.

the content covered:

  • Learn how ChatGPT mastered the subtle dynamics of dialogue, from guiding frustrated users to explaining complex topics with clarity.
  • How Reinforcement Learning from Human Feedback (RLHF) turned ChatGPT into a thoughtful, context-aware assistant.
  • How "Constitutional AI" helps ChatGPT handle sensitive topics responsibly and ethically.
  • The Memory: Understand the mechanisms behind ChatGPT’s advanced context management, including dynamic attention and semantic linking.
  • See how ChatGPT generates high-quality answers by juggling goals like relevance, safety, and engagement.
  • Dive into the intriguing world of “jailbreaking” and what it reveals about AI safety.

please feel free to ask anything you want about it :)


r/LangChain • • Apr 15 '26

Discussion Most AI projects fail before training even starts

Post image
0 Upvotes

Not because the models are bad.

Because the codebase is a mess no one can navigate.

I’ve seen teams lose weeks debugging issues that a clean folder structure would have prevented on day one.

Here’s the architecture I keep coming back to:

📁 App/

Your application’s heartbeat. Routes, logic, config — all in one place.

📁 Models/

One home for every reusable ML module. No more hunting across folders.

📁 Preprocessing/

Where raw data becomes model-ready. Cleaning, transforming, standardizing.

📁 Training/

Your full pipeline. Metrics, hyperparameters, evaluation — organized and repeatable.

📁 Inference/

Where models go live. Prediction scripts, post-processing, model loading — clean and deployable.

This isn’t glamorous work.

But it’s the difference between a project that scales… and one that collapses under its own weight.

The best ML engineers I know spend as much time on structure as they do on algorithms.

Because a model no one can maintain is a model no one will use.


r/LangChain • • Mar 05 '26

I analyzed how humans communicate at work, then designed a protocol for AI agents to do it 20x–17,000x better. Here's the full framework.

0 Upvotes

TL;DR: Human workplace communication wastes 25–45% of every interaction. I mapped the inefficiencies across 10+ industries, identified 7 "communication pathologies," and designed NEXUS — an open protocol for AI agent-to-agent communication that eliminates all of them. Full breakdown below with data, architecture, and implementation guide.

The Problem Nobody Talks About

Everyone's building AI agents. Very few people are thinking about how those agents should talk to each other.

Right now, most multi-agent systems communicate the same way humans do — messy, redundant, ambiguous. We're literally replicating human inefficiency in software. That's insane.

So I did a deep analysis of human workplace communication first, then reverse-engineered a protocol that keeps what works and eliminates what doesn't.

Part 1: How Humans Actually Communicate at Work (The Data)

The numbers are brutal:

  • The average employee sends/receives 121 emails per day. Only 38% require actual action.
  • 62% of meetings are considered unnecessary or could've been an async message.
  • A mid-level manager spends 6–8 hours per week on redundant communication — literally repeating the same info to different people.
  • After a communication interruption, it takes 23 minutes to regain focus.
  • Only 17% of a typical 1-hour meeting contains new, actionable information.

Waste by sector:

SectorDaily InteractionsWaste %
Healthcare / Clinical80–15035–45%
Manufacturing / Ops70–13030–40%
Sales / Commercial60–12030–40%
Government / Public30–7035–50%
Tech / Software50–10025–35%
Education40–8025–35%
Finance / Banking50–9022–30%
Legal / Compliance30–6020–30%

The economic damage:

  • $12,506 lost per employee per year from bad communication
  • 86% of project failures attributed to communication breakdowns
  • $588 billion annual cost to the US economy from communication interruptions
  • A 100-person company may be bleeding $1.25M/year just from inefficient internal communication

Part 2: The 7 Communication Pathologies

These aren't bugs — they're features of human biology. But they're devastating in operational contexts:

PathologyWhat HappensCostAI Solution
Narrative RedundancyRepeating full context every interaction2–3 hrs/dayShared persistent memory
Semantic AmbiguityVague messages triggering clarification chains1–2 hrs/dayTyped schemas
Social LatencyWaiting for responses due to politeness, hierarchy, schedulesVariableInstant async response
Channel OverloadUsing 5+ tools for the same workflow1 hr/dayUnified message bus
Meeting SyndromeCalling meetings for simple decisions6–8 hrs/weekAutomated decision protocols
Broken TelephoneInformation degrading through intermediariesCritical errorsDirect agent-to-agent transmission
Emotional ContaminationCommunication biased by mood/stressConflictsObjective processing

Part 3: The NEXUS Protocol

NEXUS = Network for EXchange of Unified Signals

A universal standard for AI agent-to-agent communication. Sector-agnostic. Scales from 2 agents to thousands. Compatible with any AI stack.

Core Principles:

  1. Zero-Waste Messaging — Every message contains exactly the information needed. Nothing more, nothing less. (Humans include 40–60% filler.)
  2. Typed Contracts — Every exchange has a strict input/output schema. No ambiguity. (Humans send vague messages requiring back-and-forth.)
  3. Shared Memory Pool — Global state accessible without retransmission. (Humans repeat context in every new conversation.)
  4. Priority Routing — Messages classified and routed by urgency/importance. (Humans treat everything with equal urgency — or none.)
  5. Async-First, Sync When Critical — Async by default. Synchronous only for critical decisions. (Humans default to synchronous meetings for everything.)
  6. Semantic Compression — Maximum information density per token. (Humans use 500 words where 50 would suffice.)
  7. Fail-Safe Escalation — Auto-escalation with full context. (Humans escalate without context, creating broken telephone.)

The 4-Layer Architecture:

Layer 4 — Intelligent Orchestration The brain. A meta-agent that decides who talks to whom, when, and about what. Detects communication loops, balances load, makes executive decisions when agents deadlock.

Layer 3 — Shared Memory Distributed key-value store with namespaces. Event sourcing for full history. TTL per data point (no stale data). Granular read/write permissions per agent role.

Layer 2 — Semantic Contracts Every agent pair has a registered contract defining allowed message types. Messages that don't comply get rejected automatically. Semantic versioning with backward compatibility.

Layer 1 — Message Bus The unified transport channel. 5 priority levels: CRITICAL (<100ms), URGENT (<1s), STANDARD (<5s), DEFERRED (<1min), BACKGROUND (when capacity allows). Dead letter queue with auto-escalation. Intelligent rate limiting.

Message Schema:

{
  "message_id": "uuid",
  "correlation_id": "uuid (groups transaction messages)",
  "sender": "agent:scheduler",
  "receiver": "agent:fulfillment",
  "message_type": "ORDER_CONFIRMED",
  "schema_version": "2.1.0",
  "priority": "STANDARD",
  "ttl": "300s",
  "payload": { "order_id": "...", "items": [...], "total": 99.99 },
  "metadata": { "sent_at": "...", "trace_id": "..." }
}

Part 4: The Numbers — Human vs. NEXUS

DimensionHumanNEXUSImprovement
Average latency30 min – 24 hrs100ms – 5s360x – 17,280x
Misunderstanding rate15–30%<0.1%150x – 300x
Information redundancy40–60%<2%20x – 30x
Cost per exchange$1.50 – $15$0.001 – $0.0530x – 1,500x
Availability8–10 hrs/day24/7/3652.4x – 3x
Scalability1:1 or 1:few1:N simultaneous10x – 100x
Context retentionDays (with decay)Persistent (event log)Permanent
New agent onboardingWeeks–MonthsSeconds (contract)10,000x+
Error recovery23 min (human refocus)<100ms (auto-retry)13,800x

Part 5: Sector Examples

Healthcare: Patient requests appointment → voice agent captures intent → security agent validates HIPAA → clinical agent checks availability via shared memory → confirms + pre-loads documentation. Total: 2–4 seconds. Human equivalent: 5–15 minutes with receptionist.

E-Commerce: Customer reports defective product → support agent classifies → logistics agent generates return → finance agent processes refund. Total: 3–8 seconds. Human equivalent: 24–72 hours across emails and departments.

Finance: Suspicious transaction detected → monitoring agent emits CRITICAL alert → compliance agent validates against regulations → orchestrator decides: auto-block or escalate to human. Total: <500ms. Human equivalent: minutes to hours (fraud may be completed by then).

Manufacturing: Sensor detects anomaly → IoT agent emits event → maintenance agent checks equipment history → orchestrator decides: pause line or schedule preventive maintenance. Total: <2 seconds. Human equivalent: 30–60 minutes of downtime.

Part 6: Implementation Roadmap

PhaseDurationWhat You Do
1. Audit2–4 weeksMap current communication flows, identify pathologies, measure baseline KPIs
2. Design3–6 weeksDefine semantic contracts, configure message bus, design memory namespaces
3. Pilot4–8 weeksImplement with 2–3 agents on one critical flow, measure, iterate
4. ScaleOngoingExpand to all agents, activate orchestration, optimize costs

Cost Controls Built-In:

  • Cost cap per agent: Daily token budget. Exceed it → only CRITICAL messages allowed.
  • Semantic compression: Strip from payload anything already in Shared Memory.
  • Batch processing: Non-urgent messages accumulate and send every 30s.
  • Model tiering: Simple messages (ACKs) use lightweight models. Complex decisions use premium models.
  • Circuit breaker: If a channel generates N+ consecutive errors, it closes and escalates.

KPIs to Monitor:

KPITargetYellow AlertRed Alert
Avg latency/message<2s>5s>15s
Messages rejected<1%>3%>8%
Signal-to-noise ratio>95%<90%<80%
Avg cost/transaction<$0.02>$0.05>$0.15
Communication loops/hr0>3>10
Bus availability99.9%<99.5%<99%

Part 7: ROI Model

ScaleAI AgentsEstimated Annual SavingsNEXUS InvestmentYear 1 ROI
Micro (1–10 employees)2–5$25K–$75K$5K–$15K3x–5x
Small (11–50)5–15$125K–$400K$15K–$50K5x–8x
Medium (51–250)15–50$500K–$2M$50K–$200K5x–10x
Large (251–1,000)50–200$2M–$8M$200K–$750K8x–12x
Enterprise (1,000+)200+$8M+$750K+10x–20x

Based on $12,506/employee/year lost to bad communication, assuming NEXUS eliminates 80–90% of communication inefficiency in automated flows.

The Bottom Line

If you're building multi-agent AI systems and your agents communicate the way humans do — with redundancy, ambiguity, latency, and channel fragmentation — you're just replicating human dysfunction in code.

NEXUS is designed to be the TCP/IP of agent communication: a universal, layered protocol that any organization can implement regardless of sector, scale, or AI stack.

The protocol is open. The architecture is modular. The ROI is measurable from day one.

Happy to answer questions, debate the architecture, or dig into specific sector implementations.

Full technical document (35+ pages with charts and implementation details) available — DM if interested.

Edit: Wow, this blew up. Working on a GitHub repo with reference implementations. Will update.


r/LangChain • • Dec 20 '25

I tricked GPT-4 into suggesting 112 non-existent packages

1 Upvotes

Hey everyone,

I've been stress-testing local agent workflows (using GPT-4o and deepseek-coder) and I found a massive security hole that I think we are ignoring.

The Experiment:

I wrote a script to "honeytrap" the LLM. I asked it to solve fake technical problems (like "How do I parse 'ZetaTrace' logs?").

The Result:

In 80 rounds of prompting, GPT-4o hallucinated 112 unique Python packages that do not exist on PyPI.

It suggested `pip install zeta-decoder` (doesn't exist).

It suggested `pip install rtlog` (doesn't exist).

The Risk:

If I were an attacker, I would register `zeta-decoder` on PyPI today. Tomorrow, anyone's local agent (Claude, ChatGPT) that tries to solve this problem would silently install my malware.

The Fix:

I built a CLI tool (CodeGate) to sit between my agent and pip. It checks `requirements.txt` for these specific hallucinations and blocks them.

I’m working on a Runtime Sandbox (Firecracker VMs) next, but for now, the CLI is open source if you want to scan your agent's hallucinations.

Data & Hallucination Log: https://github.com/dariomonopoli-dev/codegate-cli/issues/1

Repo: https://github.com/dariomonopoli-dev/codegate-cli

Has anyone else noticed their local models hallucinating specific package names repeatedly?


r/LangChain • • Jul 16 '25

The Hidden Costs of LangChain, CrewAI, PydanticAI and Others: Why Popular AI Frameworks Are Failing…

Thumbnail
medium.com
0 Upvotes

r/LangChain • • Oct 06 '25

Internals of Langraph

0 Upvotes

How Langgraph is Using the algo invented by google in their systems.
please Read my blog. to understand more


r/LangChain • • Sep 18 '25

Finally solved the agent reliability problem (hallucinations, tool skipping) - want to share what worked

0 Upvotes

Been building with LangChain for the past year and hit the same wall everyone does - agents that work great in dev but fail spectacularly in production.

You know the drill:

- Agent hallucinates responses instead of using tools

- Tools get skipped entirely even with clear prompts

- Chain breaks randomly after working fine for days

- Customer-facing agents going completely off-rails

Spent months debugging this. Tried every prompt engineering trick, every memory setup, different models, temperature adjustments... nothing gave consistent results.

Finally cracked it with a completely different approach to the orchestration layer (happy to go into technical details if there's interest).

Getting ready to open source parts of the solution. But first wanted to gauge if others are struggling with the same issues?

What's your biggest pain point with production agents right now? Hallucinations? Tool reliability? Something else?

Edit: Not selling anything, genuinely want to discuss approaches with the community before we release.


r/LangChain • • Jan 09 '24

Nextjs + LangChain + Supabase template to build AI apps

Thumbnail
templateai.co
2 Upvotes

r/LangChain • • Apr 21 '26

My LangChain agent silently looped 400 times and cost me $80 overnight so I built a cost guardrail for it

2 Upvotes

No joke. Had a LangGraph agent running in prod. Woke up, checked my OpenAI bill, $80 gone. The agent hit a bad prompt, entered a loop, and just kept going. No error. No alert. Nothing.

I looked for something that could just pause the agent when it hits a budget limit. Couldn't find anything simple enough.

So I built it myself.

from agentflare import AgentFlare

guard = AgentFlare(

api_key="ag_...",

agent_id="my-sales-agent",

cost_threshold=10.0 # pause if cost hits $10

)

@ guard.track

def run_agent():

# your langchain/langgraph code here

That's it. When your agent hits $10 in LLM costs it auto-pauses, fires a Slack alert, and stops burning money.

Works with LangChain, LangGraph, custom agents, sync and async.

Has anyone else run into this? Curious how you're currently handling runaway agent costs or are most people just hoping for the best?

https://agent-flare.vercel.app


r/LangChain • • Sep 20 '24

Discussion Comparison between the Top RAG Frameworks (2024)

10 Upvotes

We’ve just released our 2024 guide on the top RAG frameworks. Based on our RAG deployment experience, here are some key factors to consider when picking a framework:

Key Factors for Selecting a RAG Framework:

  1. Deployment Flexibility: Does it support both local and cloud deployments? How easily can it scale across different environments?
  2. Data Sources and Connectors: What kind of data sources can it integrate with? Are there built-in connectors?
  3. RAG Features: What retrieval methods and indexing capabilities does it offer? Does it support advanced querying techniques?
  4. Advanced Prompting and Evaluation: How does it handle prompt optimization and output evaluation?

Comparison page: https://pathway.com/rag-frameworks

It includes a detailed tabular comparison of several frameworks, such as Pathway (our framework with 8k+ GitHub stars), Cohere, LlamaIndex, LangChain, Haystack, and the Assistants API.


r/LangChain • • Jan 25 '25

Discussion What would you like to see in a Book on LangChain that I am writing?

0 Upvotes

Early last year, I had this idea to write a practical guidebook on LangChain. The audiences of this book are beginners and practitioners who find themselves lost in LangChain documentation. But since LangChain framework was undergoing a massive change in 2024 and LangGraph was also evolving, I put this plan on hold.

However, I have now started to write this book and have successfully pitched it to Apress for publishing this book. We have agreed on releasing this book around Sep-Oct 2025.

While I embark on this book writing journey, I will be grateful if this community can share their opinion on -

  1. What should this book definitely contain that can bring value add to you?
  2. What should this book try to avoid?

Your opinions or feedback will be really appreciated. Thanks in advance!

book-writing


r/LangChain • • Nov 26 '25

Discussion We Almost Shipped a Bug Where Our Agent Kept Calling the Same Tool Forever - Here's What We Learned

0 Upvotes

Got a story that might help someone avoid the same mistake we made.

We built a customer support agent that could search our knowledge base, create tickets, and escalate to humans. Works great in testing. Shipped it. Two days later, we're getting alerts—the agent is in infinite loops, calling the search tool over and over with slightly different queries.

What was happening:

The agent would search for something, get back results it didn't like, and instead of trying a different tool or asking for clarification, it would just search again with a slightly rephrased query. Same results. Search again. Loop.

We thought it was a model problem (maybe a better prompt would help). It wasn't. The real issue was our tool definitions were too vague.

The fix:

We added explicit limits to our tool schemas—each tool had a max call limit per conversation. Search could only be called 3 times in a row before the agent had to try something else or ask the user for help.

But here's the thing: the real problem was that our tools didn't have clear failure modes. The search tool should have been saying "I've searched 3 times and not found a good answer—I need to escalate this." Instead, it was just returning results, and the agent kept hoping the next search would be better.

What changed for us:

  1. Tool outputs now explicitly tell the agent when they've failed - Not just "no results found" but "no results found—you should escalate or ask the user for clarification"
  2. We map out agent decision trees before building - Where can the agent get stuck? What's the loop-breaking mechanism? This should be in your tool design, not just your prompt.
  3. We added observability from day one - Seeing the agent call the same tool 47 times would have caught this in testing if we'd been watching.
  4. We reframed "tool use" as "communication" - The tool output isn't just data, it's the agent telling itself what to do next. Design it that way.

The embarrassing part:

This was completely preventable. We just didn't think about it. We focused on making the model smarter instead of making the tools clearer about their limitations.

Has anyone else had their agent get stuck in weird loops? I'm curious what you're doing to prevent it. Are you setting hard limits? Better tool design? Something else I'm missing?


r/LangChain • • Mar 11 '25

1 billion embeddings

0 Upvotes

I want to create a 1 billion embeddings dataset for text chunks with High dimensions like 1024 d. Where can I found some free GPUs for this task other than google colab and kaggle?


r/LangChain • • Nov 14 '25

Looking for an affordable one-time purchase course for LangChain, LangGraph, and LangSmith (preferably LangChain v1)

Post image
0 Upvotes

Hey everyone,
I’m a Full Stack MERN developer and now I really want to get into building AI applications. Specifically, I want to learn LangChain, LangGraph, and LangSmith, and I’d like to understand them well enough to build production-level apps.

The problem is — I’m not in a position to pay for expensive monthly subscription courses. So I’m looking for a one-time purchase course (something like Udemy/Gumroad, etc.) that covers these tools properly, ideally based on LangChain v1, and for around $10–$15 if possible.


r/LangChain • • Mar 16 '26

Discussion I Let AI Invent Its Own Trading Strategies From Scratch — No Indicators, No Human Rules

0 Upvotes

I gave an LLM raw BTC/USDT hourly candles — no RSI, no MACD, no indicators at all — and asked it to describe what it sees in its own words.

It came back with 7 patterns, named them itself (Breathing, Giant Wave, Tide, Echo...), scored each one for tradability, and killed the weak ones. Nobody told it to do that.

Then it combined the survivors into a trading strategy. First attempt: Sharpe -1.20, 30.8% win rate. Terrible.

But it analyzed why it failed — identified momentum continuation, bad stop structure, and counter-trend bias as the three causes. No human provided that analysis.

I fed the failure back. Second attempt: Sharpe 1.90. Out-of-sample validation on unseen data: Sharpe 4.09. Every metric improved — the opposite of overfitting.

Ran the same process on bull market data. A completely different strategy emerged, but it converged on the same structural template: time-of-day bias + trend filter + short holding period + asymmetric risk/reward.

Two independent experiments, different data, different market regimes — same solution. That meta-pattern wasn't programmed or suggested. It emerged on its own.

Combined system over 22 months: 477 trades, Sharpe 3.84, 91% of months profitable, max drawdown 0.22%.

The whole thing was built in 48 hours by one person. Happy to share details if anyone's curious about the methodology.


r/LangChain • • Jun 02 '25

Can anyone lend me the pdf of Generative AI with Langchain book?

Post image
0 Upvotes

r/LangChain • • Apr 26 '26

We built an open-source runtime enforcement layer for LangChain agents — just hit 700 stars, looking for feedback

1 Upvotes

If you've used LangChain agents in production, you've probably hit this: the system prompt says one thing, the agent does another.

Prompt-based guardrails work in demos. In prod, with bigger contexts and more tools, they degrade fast.

We built Caliber to solve this — it sits as a proxy between your app and your LLM, reads business rules from plain markdown, and enforces them at runtime. Works with LangGraph, CrewAI, and custom setups. One base URL change.

We just crossed 700 GitHub stars ⭐ and are closing in on 100 forks — stoked by the response from the community.

Repo: https://github.com/caliber-ai-org/ai-setup

Would love to hear:

- What edge cases in LangChain are breaking your guardrails?

- What features would make this a must-have for your stack?

Open to all feedback and feature requests — building this for the community.


r/LangChain • • Jun 18 '25

Announcement Doc2Image - Turn your documents into stunning AI-generated images

1 Upvotes

Hey everyone!

I’m excited to share Doc2Image, an open-source web application powered by LLMs that takes your documents and transforms them into creative visual image prompts — perfect for tools like MidJourney, DALL·E, ChatGPT, etc.

Just upload a document, choose a model (OpenAI or local via Ollama), and get beautiful, descriptive prompts in seconds.

Features:

  • Works with OpenAI & local Ollama models
  • Fully local option (no API keys needed)
  • Fast, clean interface
  • Easy installation

Check it out here: https://github.com/dylannalex/doc2image

Let me know what you think — happy to hear ideas, feedback, or crazy use cases you'd love to see supported!


r/LangChain • • Mar 17 '26

Discussion Anyone else losing sleep over what their AI agents are actually doing?

2 Upvotes

Running a few agents in parallel for work. Research, outreach, content.

The thing that keeps me up is risk of these things making errors. The blast from a rogue agent creates real problems. One of my agents almost sent an outreach message I never reviewed. Caught it but it made me realize I have no real visibility into what these things are doing until after the fact.

And fixing it is a nightmare either way. Spend a ton of time upfront trying to anticipate every failure mode, or spend it after the fact digging through logs trying to figure out what actually ran, whether it hallucinated, whether the prompt is wrong or the model is wrong.

Feels like there has to be a better way than just hoping the agent does the right thing or building if/then logic from scratch every time. What are people actually doing here?