Filter
Exclude
Time range
-
Near
Added memory to my agent today. using MemorySaver, it acts as checkpoint memory. It keeps track of the graph's state across interactions, but only while the Python process is running. Once the process restarts, the memory is gone. Next step: replace it with a persistent checkpointer like SQLite or Postgres for long-term memory
Day 9 & 10/30 of building in public >Spent the last two days turning my AI “sidekick” into a more proper Agent. >It now has: - a Gradio chat UI - LangGraph workflow loop - Playwright browser automation - search file tools - Python execution - an evaluator that checks if the task actually meets the success criteria >Also hit a few very real bugs along the way: -first time used Gradio, Playwright launch parameter that broke startup. right now this Agent is burning a lot of tokens while completing tasks and thats the next challenge for me on this 30 day challenge. Goal is simple: build an AI agent that keeps working until the task is genuinely done. Day 10 done. 20 more to go. Project link:github.com/Abhii-04/Agent
1
12
Replying to @itsFoxCrypto
@OOBEonSol agents don't just chat. They register tools, execute @solana actions, save state with MemorySaver, validate with Merkle proofs & settle via x402. From demo to autonomous micro-business. This is what real agentic execution looks like. $OOBE ascending !!
7
6
13
86
LangGraph でマルチターン会話を実装した際、thread_id を固定しているのにセッション再起動で記憶が消えていました。原因は MemorySaver() をリクエストハンドラ内で毎回インスタンス化していたこと。モジュールレベルで singleton にして解決しました。プロセス再起動をまたいで永続化したい場合は SQLiteSaver か PostgresSaver への切り替えが必要です。
18
🛠️🧭 How to Build AI Agents from Scratch - Even If You’ve Never Done It Before. Using my 𝗦𝗠𝗔𝗥𝗧 𝗖𝗢𝗠𝗣𝗔𝗦𝗦 𝗿𝗼𝗮𝗱𝗺𝗮𝗽 I built 𝗮 𝗖𝘆𝗯𝗲𝗿 𝗗𝗲𝗳𝗲𝗻𝘀𝗲 𝗦𝘆𝘀𝘁𝗲𝗺 in 12 minutes in Langgraph. Here is my roadmap so you can build it Yourself: 𝗣𝗵𝗮𝘀𝗲 𝟭: 𝗦𝗠𝗔𝗥𝗧 (The Core) --- 》𝗦𝘁𝗲𝗽 𝟭: 𝗦etup & Stack ✸ Don't start from zero. Initialize the core requirements. ✸ Choose cost-effective models for high-volume analysis. → Tools: LangGraph, LangChain, OpenAI 》𝗦𝘁𝗲𝗽 𝟮: 𝗠ission ✸ Define the exact goal. We aren't building a chatbot. ✸ Goal: "Ingest logs, detect anomalies, and classify risks." → Outcome: A clear objective for the agent system. 》𝗦𝘁𝗲𝗽 𝟯: 𝗔rchitecture ✸ Map out the team structure (Nodes). ✸ Assign specific roles: Ingest, Detect, Classify, Report. → Concept: Multi-Agent Nodes instead of one massive prompt. 》𝗦𝘁𝗲𝗽 𝟰: 𝗥easoning ✸ Equip agents with "ReAct" (Reason Act) capabilities. ✸ Allow them to think before they decide to use a tool. → Framework: ReAct Agent Construction 》𝗦𝘁𝗲𝗽 𝟱: 𝗧ools ✸ Create Python functions the AI can call upon. ✸ Specific skills: Pattern Detector, Anomaly Detector, Threat Lookup. → Code: @ tool decorated functions 𝗣𝗵𝗮𝘀𝗲 𝟮: 𝗖𝗢𝗠𝗣𝗔𝗦𝗦 (𝗧𝗵𝗲 𝗡𝗮𝘃𝗶𝗴𝗮𝘁𝗶𝗼𝗻) --- 》𝗦𝘁𝗲𝗽 𝟲: 𝗖ollaboration ✸ Build the Graph (The Workflow). ✸ Define Edges: Connect Ingest → Detect → Classify. ✸ Add Conditional Logic: If no threats found → End. → Tool: LangGraph StateGraph 》𝗦𝘁𝗲𝗽 𝟳: 𝗢perate ✸ Run the initial pass to validate the data flow. ✸ Ensure the graph compiles and agents communicate. → Action: Initial execution & debugging. 》𝗦𝘁𝗲𝗽 𝟴: 𝗠emory ✸ Add persistence so agents share context. ✸ Use a Checkpointer so Agent B knows what Agent A saw. → Tool: LangGraph MemorySaver 》𝗦𝘁𝗲𝗽 𝟵: 𝗣resent & Prompt ✸ Force outputs into readable formats (Markdown). ✸ Refine personas: "You are a Senior Security Analyst." → Technique: System Prompt Engineering 》𝗦𝘁𝗲𝗽 𝟭𝟬: 𝗔ssess ✸ Validate the output against business logic. ✸ Check Agent Confidence Scores against real data. → Metric: Precision/Recall on anomalies. 》𝗦𝘁𝗲𝗽 𝟭𝟭: 𝗦ense (The UI) ✸ Stop working in the terminal. ✸ Build a simple frontend for file uploads. → Tool: Gradio Interface 》𝗦𝘁𝗲𝗽 𝟭𝟮: 𝗦how (Live Dashboard) ✸ Deploy the system. ✸ Allow users to upload logs and see real-time agent collaboration. → Result: A production-ready Cyber Defense Dashboard. --- 🎥𝗦𝗠𝗔𝗥𝗧 𝗖𝗢𝗠𝗣𝗔𝗦𝗦 𝗿𝗼𝗮𝗱𝗺𝗮𝗽 𝗖𝘆𝗯𝗲𝗿 𝗗𝗲𝗳𝗲𝗻𝘀𝗲 𝗦𝘆𝘀𝘁𝗲𝗺: youtube.com/watch?v=p5ms-d_c… 🎥For 9 more Real-World AI Agents Projects (incl. architecture, tools, design) Watch this: youtube.com/watch?v=NcnYOLoC… -- 📥 Skip the trial-and-error of building production AI agents. Watch my free 30-min training get 88 pages of production guides. Join 46,000 AI engineers, architects, and directors. 👉 maryammiradi.com/free-ai-age…
5
1
23
4,083
🛠️🧭 How to Build AI Agents from Scratch – Even If You’ve Never Done It Before. Using my 𝗦𝗠𝗔𝗥𝗧 𝗖𝗢𝗠𝗣𝗔𝗦𝗦 𝗿𝗼𝗮𝗱𝗺𝗮𝗽 I built 𝗮 𝗖𝘆𝗯𝗲𝗿 𝗗𝗲𝗳𝗲𝗻𝘀𝗲 𝗦𝘆𝘀𝘁𝗲𝗺 in 12 minutes in Langgraph. My Hands-on Tutorial: youtube.com/watch?v=p5ms-d_c… Here is my roadmap so you can build it Yourself: 𝗣𝗵𝗮𝘀𝗲 𝟭: 𝗦𝗠𝗔𝗥𝗧 (The Core) 》𝗦𝘁𝗲𝗽 𝟭: 𝗦etup & Stack ✸ Don't start from zero. Initialize the core requirements. ✸ Choose cost-effective models for high-volume analysis. → Tools: LangGraph, LangChain, OpenAI 》𝗦𝘁𝗲𝗽 𝟮: 𝗠ission ✸ Define the exact goal. We aren't building a chatbot. ✸ Goal: "Ingest logs, detect anomalies, and classify risks." → Outcome: A clear objective for the agent system. 》𝗦𝘁𝗲𝗽 𝟯: 𝗔rchitecture ✸ Map out the team structure (Nodes). ✸ Assign specific roles: Ingest, Detect, Classify, Report. → Concept: Multi-Agent Nodes instead of one massive prompt. 》𝗦𝘁𝗲𝗽 𝟰: 𝗥easoning ✸ Equip agents with "ReAct" (Reason Act) capabilities. ✸ Allow them to think before they decide to use a tool. → Framework: ReAct Agent Construction 》𝗦𝘁𝗲𝗽 𝟱: 𝗧ools ✸ Create Python functions the AI can call upon. ✸ Specific skills: Pattern Detector, Anomaly Detector, Threat Lookup. → Code: @ tool decorated functions For 9 more Real-World AI Agents Projects (incl. architecture, tools, design) Watch this: youtube.com/watch?v=NcnYOLoC… 𝗣𝗵𝗮𝘀𝗲 𝟮: 𝗖𝗢𝗠𝗣𝗔𝗦𝗦 (𝗧𝗵𝗲 𝗡𝗮𝘃𝗶𝗴𝗮𝘁𝗶𝗼𝗻) 》𝗦𝘁𝗲𝗽 𝟲: 𝗖ollaboration ✸ Build the Graph (The Workflow). ✸ Define Edges: Connect Ingest → Detect → Classify. ✸ Add Conditional Logic: If no threats found → End. → Tool: LangGraph StateGraph 》𝗦𝘁𝗲𝗽 𝟳: 𝗢perate ✸ Run the initial pass to validate the data flow. ✸ Ensure the graph compiles and agents communicate. → Action: Initial execution & debugging. 》𝗦𝘁𝗲𝗽 𝟴: 𝗠emory ✸ Add persistence so agents share context. ✸ Use a Checkpointer so Agent B knows what Agent A saw. → Tool: LangGraph MemorySaver 》𝗦𝘁𝗲𝗽 𝟵: 𝗣resent & Prompt ✸ Force outputs into readable formats (Markdown). ✸ Refine personas: "You are a Senior Security Analyst." → Technique: System Prompt Engineering 》𝗦𝘁𝗲𝗽 𝟭𝟬: 𝗔ssess ✸ Validate the output against business logic. ✸ Check Agent Confidence Scores against real data. → Metric: Precision/Recall on anomalies. 》𝗦𝘁𝗲𝗽 𝟭𝟭: 𝗦ense (The UI) ✸ Stop working in the terminal. ✸ Build a simple frontend for file uploads. → Tool: Gradio Interface 》𝗦𝘁𝗲𝗽 𝟭𝟮: 𝗦how (Live Dashboard) ✸ Deploy the system. ✸ Allow users to upload logs and see real-time agent collaboration. → Result: A production-ready Cyber Defense Dashboard. —- ꆛ Join 46,000 AI Agents Builders - free: Zero to Hero: How to Build AI Agents (30-min training) 2 Guides: 88 pages of real-world agent best practices → maryammiradi.com/free-ai-age…
10
602
One of the main technical problems with agents is handling failures like network hiccups, server restarts, & a process getting killed midway through. @AttilaTothDev explains how LangGraph’s MemorySaver solves this in a highly technical article > ow.ly/cns350YW4Sj #ScyllaDB
2
2
301
Are we all deploying agents differently? @LangChain's LangGraph ships a checkpointer (Postgres or Redis required - MemorySaver is dev-only) and either a managed runtime in LangSmith Deployment or self-host behind FastAPI. @pydantic AI now has first-party durable execution abstraction - wrap your agent and you get checkpointing, replay, and human-in-the-loop pause/resume. @claudeai Claude Agent SDK assumes per-session containers via Modal, E2B, Daytona, Fly Machines or similar, with session resumption built into the SDK, and @OpenAIDevs Agents SDK has pluggable Sessions backends. A lot of engineers instinctively default to FastAPI behind a bespoke queue/worker system (Celery/Redis etc.), missing that there is a layer of the stack that is being built to solve a lot of problems you're gonna head-first into (especially with longer running, automous tasks). A few things worth thinking through before you commit: cost tracking across harnesses, approval gates that behave the same regardless of which harness produced the request, platform team operability without becoming experts in four different durability backends, harness swappability in 18 months without rewriting the deployment. With durable execution firmly evolving as a category, it feels like we need to talk about a blueprint architecture soon. The runtime decision deserves the same scrutiny as the harness/framework pick - worth being honest about whether you chose it on its merits.
1
4
145
🛠️🧭 How to Build AI Agents from Scratch – Even If You’ve Never Done It Before. Using my 𝗦𝗠𝗔𝗥𝗧 𝗖𝗢𝗠𝗣𝗔𝗦𝗦 𝗿𝗼𝗮𝗱𝗺𝗮𝗽 I built 𝗮 𝗖𝘆𝗯𝗲𝗿 𝗗𝗲𝗳𝗲𝗻𝘀𝗲 𝗦𝘆𝘀𝘁𝗲𝗺 in 12 minutes in Langgraph. My Hands-on Tutorial: youtu.be/p5ms-d_cViU?is=mXoL… Here is my roadmap so you can build it Yourself: 𝗣𝗵𝗮𝘀𝗲 𝟭: 𝗦𝗠𝗔𝗥𝗧 (The Core) 》𝗦𝘁𝗲𝗽 𝟭: 𝗦etup & Stack ✸ Don't start from zero. Initialize the core requirements. ✸ Choose cost-effective models for high-volume analysis. → Tools: LangGraph, LangChain, OpenAI 》𝗦𝘁𝗲𝗽 𝟮: 𝗠ission ✸ Define the exact goal. We aren't building a chatbot. ✸ Goal: "Ingest logs, detect anomalies, and classify risks." → Outcome: A clear objective for the agent system. 》𝗦𝘁𝗲𝗽 𝟯: 𝗔rchitecture ✸ Map out the team structure (Nodes). ✸ Assign specific roles: Ingest, Detect, Classify, Report. → Concept: Multi-Agent Nodes instead of one massive prompt. 》𝗦𝘁𝗲𝗽 𝟰: 𝗥easoning ✸ Equip agents with "ReAct" (Reason Act) capabilities. ✸ Allow them to think before they decide to use a tool. → Framework: ReAct Agent Construction 》𝗦𝘁𝗲𝗽 𝟱: 𝗧ools ✸ Create Python functions the AI can call upon. ✸ Specific skills: Pattern Detector, Anomaly Detector, Threat Lookup. → Code: @ tool decorated functions For 9 more Real-World AI Agents Projects (incl. architecture, tools, design) Watch this: youtu.be/NcnYOLoCmxU?is=MGeU… 𝗣𝗵𝗮𝘀𝗲 𝟮: 𝗖𝗢𝗠𝗣𝗔𝗦𝗦 (𝗧𝗵𝗲 𝗡𝗮𝘃𝗶𝗴𝗮𝘁𝗶𝗼𝗻) 》𝗦𝘁𝗲𝗽 𝟲: 𝗖ollaboration ✸ Build the Graph (The Workflow). ✸ Define Edges: Connect Ingest → Detect → Classify. ✸ Add Conditional Logic: If no threats found → End. → Tool: LangGraph StateGraph 》𝗦𝘁𝗲𝗽 𝟳: 𝗢perate ✸ Run the initial pass to validate the data flow. ✸ Ensure the graph compiles and agents communicate. → Action: Initial execution & debugging. 》𝗦𝘁𝗲𝗽 𝟴: 𝗠emory ✸ Add persistence so agents share context. ✸ Use a Checkpointer so Agent B knows what Agent A saw. → Tool: LangGraph MemorySaver 》𝗦𝘁𝗲𝗽 𝟵: 𝗣resent & Prompt ✸ Force outputs into readable formats (Markdown). ✸ Refine personas: "You are a Senior Security Analyst." → Technique: System Prompt Engineering 》𝗦𝘁𝗲𝗽 𝟭𝟬: 𝗔ssess ✸ Validate the output against business logic. ✸ Check Agent Confidence Scores against real data. → Metric: Precision/Recall on anomalies. 》𝗦𝘁𝗲𝗽 𝟭𝟭: 𝗦ense (The UI) ✸ Stop working in the terminal. ✸ Build a simple frontend for file uploads. → Tool: Gradio Interface 》𝗦𝘁𝗲𝗽 𝟭𝟮: 𝗦how (Live Dashboard) ✸ Deploy the system. ✸ Allow users to upload logs and see real-time agent collaboration. → Result: A production-ready Cyber Defense Dashboard. —- ꆛ Join 46,000 AI Agents Builders - free: Zero to Hero: How to Build AI Agents (30-min training) 2 Guides: 88 pages of real-world agent best practices → maryammiradi.com/free-ai-age…
2
1
25
2,379
Langchain, @ tool, tavily, langgraph, Checkpoint, Middleware , MemorySaver,
2
3
631
LangGraph agents can crash mid-execution. Enable checkpoints with MemorySaver() before tool calls. Set interrupt_before=["tools"] in graph config. On failure, call graph.get_state() then resume from checkpoint. GOOD
1
1
2
159
LangGraph agents crash on tool failures. Enable checkpoints with MemorySaver before tool calls. Set interrupt_before=["tools"] in graph config. Use graph.get_state() then graph.update_state() to recover state. Prevents lost work on failures.
1
2
144
AutoVoyce Update!!! (try it here - autovoyce.sanketsonkusare.me…) 1) Fix: AutoVoyce can now answer general questions (improved the agent prompt to do so). 2) Fix: now the older chats are given to the agent (context is retrieved), to do this I have used MemorySaver Checkpointer to give the last 5 chats between human and agent as context.
Thanks for using AutoVoyce! Got to know about 2 behaviour patterns- 1) People are using AutoVoyce to ask general questions. 2) People want the older chat context to answer the current question. At first, I did not consider this two conditions, but according to average user behaviour, I’ll be coming with an update fixing both the issues. Stay tuned!
2
1
5
449
🛠️🧭 How to Build AI Agents from Scratch – Even If You’ve Never Done It Before. Using my 𝗦𝗠𝗔𝗥𝗧 𝗖𝗢𝗠𝗣𝗔𝗦𝗦 𝗿𝗼𝗮𝗱𝗺𝗮𝗽 I built 𝗮 𝗖𝘆𝗯𝗲𝗿 𝗗𝗲𝗳𝗲𝗻𝘀𝗲 𝗦𝘆𝘀𝘁𝗲𝗺 in 12 minutes in Langgraph. Here is my roadmap so you can build it Yourself: 𝗣𝗵𝗮𝘀𝗲 𝟭: 𝗦𝗠𝗔𝗥𝗧 (The Core) 》𝗦𝘁𝗲𝗽 𝟭: 𝗦etup & Stack ✸ Don't start from zero. Initialize the core requirements. ✸ Choose cost-effective models for high-volume analysis. → Tools: LangGraph, LangChain, OpenAI (GPT-5-nano) 》𝗦𝘁𝗲𝗽 𝟮: 𝗠ission ✸ Define the exact goal. We aren't building a chatbot. ✸ Goal: "Ingest logs, detect anomalies, and classify risks." → Outcome: A clear objective for the agent system. 》𝗦𝘁𝗲𝗽 𝟯: 𝗔rchitecture ✸ Map out the team structure (Nodes). ✸ Assign specific roles: Ingest, Detect, Classify, Report. → Concept: Multi-Agent Nodes instead of one massive prompt. 》𝗦𝘁𝗲𝗽 𝟰: 𝗥easoning ✸ Equip agents with "ReAct" (Reason Act) capabilities. ✸ Allow them to think before they decide to use a tool. → Framework: ReAct Agent Construction 》𝗦𝘁𝗲𝗽 𝟱: 𝗧ools ✸ Create Python functions the AI can call upon. ✸ Specific skills: Pattern Detector, Anomaly Detector, Threat Lookup. → Code: @tool decorated functions 𝗣𝗵𝗮𝘀𝗲 𝟮: 𝗖𝗢𝗠𝗣𝗔𝗦𝗦 (𝗧𝗵𝗲 𝗡𝗮𝘃𝗶𝗴𝗮𝘁𝗶𝗼𝗻) 》𝗦𝘁𝗲𝗽 𝟲: 𝗖ollaboration ✸ Build the Graph (The Workflow). ✸ Define Edges: Connect Ingest → Detect → Classify. ✸ Add Conditional Logic: If no threats found → End. → Tool: LangGraph StateGraph 》𝗦𝘁𝗲𝗽 𝟳: 𝗢perate ✸ Run the initial pass to validate the data flow. ✸ Ensure the graph compiles and agents communicate. → Action: Initial execution & debugging. 》𝗦𝘁𝗲𝗽 𝟴: 𝗠emory ✸ Add persistence so agents share context. ✸ Use a Checkpointer so Agent B knows what Agent A saw. → Tool: LangGraph MemorySaver 》𝗦𝘁𝗲𝗽 𝟵: 𝗣resent & Prompt ✸ Force outputs into readable formats (Markdown). ✸ Refine personas: "You are a Senior Security Analyst." → Technique: System Prompt Engineering 》𝗦𝘁𝗲𝗽 𝟭𝟬: 𝗔ssess ✸ Validate the output against business logic. ✸ Check Agent Confidence Scores against real data. → Metric: Precision/Recall on anomalies. 》𝗦𝘁𝗲𝗽 𝟭𝟭: 𝗦ense (The UI) ✸ Stop working in the terminal. ✸ Build a simple frontend for file uploads. → Tool: Gradio Interface 》𝗦𝘁𝗲𝗽 𝟭𝟮: 𝗦how (Live Dashboard) ✸ Deploy the system. ✸ Allow users to upload logs and see real-time agent collaboration. → Result: A production-ready Cyber Defense Dashboard. Link to 12-min Video in Comments ≣≣≣≣≣≣≣≣≣≣≣≣≣≣≣≣≣≣≣≣≣≣≣ ⫸ꆛ I teach the SMART COMPASS method to My 2,300 students so they can build reliable, agentic systems from scratch. 𝗔𝗜 𝗔𝗴𝗲𝗻𝘁𝘀 𝗠𝗮𝘀𝘁𝗲𝗿𝘆 (𝟱-𝗶𝗻-𝟭): ➠ 11 REAL-WORLD Projects. Full code. 100% hands-on ➠ MCP, LangGraph, PydanticAI, CrewAI, OpenAI Swarm ➠ Lifetime access updates ⭒ Build from scratch to deployment 𝟱𝟲% 𝗼𝗳𝗳 ⭒ 𝗟𝗶𝗺𝗶𝘁𝗲𝗱 𝘁𝗶𝗺𝗲 ↓ maryammiradi.com/ai-agents-m…
5
4
30
4,767
i added a checkpointer (MemorySaver) and wired it into my langgraph workflow. now my ai remembers things across turns using a fixed thread_id. i have only added one tool so far, so i won’t call it a full “agent” yet! so now i m trying to add multipletools into my agent.
2
28
🛠️🧭 How to Build AI Agents from Scratch – Even If You’ve Never Done It Before. Using my 𝗦𝗠𝗔𝗥𝗧 𝗖𝗢𝗠𝗣𝗔𝗦𝗦 𝗿𝗼𝗮𝗱𝗺𝗮𝗽 I built 𝗮 𝗖𝘆𝗯𝗲𝗿 𝗗𝗲𝗳𝗲𝗻𝘀𝗲 𝗦𝘆𝘀𝘁𝗲𝗺 in 12 minutes in Langgraph. Here is my roadmap so you can build it Yourself: 𝗣𝗵𝗮𝘀𝗲 𝟭: 𝗦𝗠𝗔𝗥𝗧 (The Core) 》𝗦𝘁𝗲𝗽 𝟭: 𝗦etup & Stack ✸ Don't start from zero. Initialize the core requirements. ✸ Choose cost-effective models for high-volume analysis. → Tools: LangGraph, LangChain, OpenAI (GPT-4o-mini) 》𝗦𝘁𝗲𝗽 𝟮: 𝗠ission ✸ Define the exact goal. We aren't building a chatbot. ✸ Goal: "Ingest logs, detect anomalies, and classify risks." → Outcome: A clear objective for the agent system. 》𝗦𝘁𝗲𝗽 𝟯: 𝗔rchitecture ✸ Map out the team structure (Nodes). ✸ Assign specific roles: Ingest, Detect, Classify, Report. → Concept: Multi-Agent Nodes instead of one massive prompt. 》𝗦𝘁𝗲𝗽 𝟰: 𝗥easoning ✸ Equip agents with "ReAct" (Reason Act) capabilities. ✸ Allow them to think before they decide to use a tool. → Framework: ReAct Agent Construction 》𝗦𝘁𝗲𝗽 𝟱: 𝗧ools ✸ Create Python functions the AI can call upon. ✸ Specific skills: Pattern Detector, Anomaly Detector, Threat Lookup. → Code: @ tool decorated functions 𝗣𝗵𝗮𝘀𝗲 𝟮: 𝗖𝗢𝗠𝗣𝗔𝗦𝗦 (𝗧𝗵𝗲 𝗡𝗮𝘃𝗶𝗴𝗮𝘁𝗶𝗼𝗻) 》𝗦𝘁𝗲𝗽 𝟲: 𝗖ollaboration ✸ Build the Graph (The Workflow). ✸ Define Edges: Connect Ingest → Detect → Classify. ✸ Add Conditional Logic: If no threats found → End. → Tool: LangGraph StateGraph 》𝗦𝘁𝗲𝗽 𝟳: 𝗢perate ✸ Run the initial pass to validate the data flow. ✸ Ensure the graph compiles and agents communicate. → Action: Initial execution & debugging. 》𝗦𝘁𝗲𝗽 𝟴: 𝗠emory ✸ Add persistence so agents share context. ✸ Use a Checkpointer so Agent B knows what Agent A saw. → Tool: LangGraph MemorySaver 》𝗦𝘁𝗲𝗽 𝟵: 𝗣resent & Prompt ✸ Force outputs into readable formats (Markdown). ✸ Refine personas: "You are a Senior Security Analyst." → Technique: System Prompt Engineering 》𝗦𝘁𝗲𝗽 𝟭𝟬: 𝗔ssess ✸ Validate the output against business logic. ✸ Check Agent Confidence Scores against real data. → Metric: Precision/Recall on anomalies. 》𝗦𝘁𝗲𝗽 𝟭𝟭: 𝗦ense (The UI) ✸ Stop working in the terminal. ✸ Build a simple frontend for file uploads. → Tool: Gradio Interface 》𝗦𝘁𝗲𝗽 𝟭𝟮: 𝗦how (Live Dashboard) ✸ Deploy the system. ✸ Allow users to upload logs and see real-time agent collaboration. → Result: A production-ready Cyber Defense Dashboard. My 𝗖𝘆𝗯𝗲𝗿 𝗗𝗲𝗳𝗲𝗻𝘀𝗲 𝗦𝘆𝘀𝘁𝗲𝗺 in 12 steps SMARTCOMPASS in 12 minutes: youtu.be/p5ms-d_cViU ≣≣≣≣≣≣≣≣≣≣≣≣≣≣≣≣≣≣≣≣≣≣≣≣≣ ꆛ 𝗙𝗥𝗘𝗘 𝗧𝗥𝗔𝗜𝗡𝗜𝗡𝗚: (𝗹𝗶𝗺𝗶𝘁𝗲𝗱 𝘁𝗶𝗺𝗲) ⫸ 𝗛𝗼𝘄 𝘁𝗼 𝗕𝘂𝗶𝗹𝗱 𝗥𝗲𝗮𝗹-𝗪𝗼𝗿𝗹𝗱 𝗔𝗜 𝗔𝗴𝗲𝗻𝘁𝘀 𝗶𝗻 𝟯𝟬 𝗠𝗶𝗻𝘂𝘁𝗲𝘀 (𝗭𝗲𝗿𝗼 𝘁𝗼 𝗛𝗲𝗿𝗼) 𝗕𝗢𝗡𝗨𝗦: 49-page guide with battle-tested strategies 👉 𝗚𝗘𝗧 𝗜𝗡𝗦𝗧𝗔𝗡𝗧 𝗔𝗖𝗖𝗘𝗦𝗦: maryammiradi.com/free-ai-age…
3
5
29
2,539
19 Nov 2025
Week 4 (the final week) of my AI consulting engagement just wrapped, and here's what happens when you build on solid foundations: we hit 98% completion rate on a system that was struggling at <60%. If week 1 was about laying groundwork, week 2 was about building proof, and week 3 was about bold architectural decisions, week 4 was about bringing it all together—and learning that sometimes the bleeding edge isn't production-ready. Here's what we shipped: The Complete Pipeline We finished integrating the Planner agent into our LangGraph architecture, completing the full end-to-end system: natural language query → planning → code generation → compilation → execution → verification → natural language response. Four specialised AI agents, each doing one thing exceptionally well: • Planner Agent (GPT-4.1): Interprets queries and generates execution plans • Code Generator Agent (Claude Haiku 4.5): Produces Python/pandas code • Code Result Verifier Agent (Claude Sonnet 4.5): Validates results using LLM-as-a-judge • Result Summariser Agent (GPT-5 Mini): Transforms results to natural language Self-healing retry logic with up to 3 attempts per stage. No manual intervention required when things go wrong—the system corrects itself. The GPT-5 Decision (and Why We Reversed It) This is where it got interesting. I initially used GPT-5 with "medium" reasoning effort for the Planner agent. It's the newest, most capable model—surely that's the right choice? Turns out, no. GPT-5 was taking over 1 minute for simple planning tasks. Reliability was patchy: timeouts, token limit errors despite a 50,000 token maximum (meandering chain of thought!). The thing is that the Planner already has ample metadata and schema context. It doesn't need deep reasoning; it needs good intelligence, but also speed and reliability. So we switched to GPT-4.1, and never looked back. Responses dropped to 20-30 seconds for the full pipeline, about 60 seconds with retries. The application went from frustratingly slow to genuinely usable. GPT-5 is brilliant for background deep research tasks where latency doesn't matter. But likely not for user-facing applications where every second counts. Sometimes the "older" model is the right call. Pragmatism over hype, always. Memory and Conversation Continuity We integrated LangGraph's MemorySaver so the system can maintain context across multi-turn conversations. This matters because real users don't ask perfectly formed single questions; they refine, clarify, and build on previous queries. UI Improvements Enhanced the interface to display planning summaries, code generation steps, compilation results, and verification outcomes—all with token usage metrics. Added a "Chain of Thoughts" expander so users can see the system's reasoning. Transparency builds trust. Handover I created a comprehensive end-of-engagement report documenting: • What we built and why • Every architectural trade-off and decision • What works, what doesn't (yet), and why • Future directions and improvements • 79 passing tests (58 unit, 21 integration) as proof • Full eval suite with 35 tests per domain (6 domains, e.g. finance, logistics, etc.) Good consulting means you go beyond building things. You must ensure competent knowledge transfer, making sure the client can maintain, extend, and improve the system after you leave. Reflections on the Four-Week Journey Week 1: We built the evaluation suite and improved tooling (UV, Ruff, Pydantic, CI). Seemed like slow progress at the time. Week 2: Those evals proved code generation was 98% successful vs <60% for the existing approach. Evidence drove the decision to pivot. Week 3: We built the five-node LangGraph pipeline with retry logic. Could only do this confidently because we had tests proving it worked. Week 4: We completed the architecture, made pragmatic model choices, and handed over a production-ready system. What I learned The flashiest approach isn't always the right one. GPT-5 is incredible technology, but GPT-4.1 was the better choice for this use case. Evidence-driven decisions beat hype every time. And those "boring" foundations from week 1: the test suite, the linting, the CI pipeline... They were the difference between hoping the system worked and proving it did. You can't make bold architectural calls in week 3 without solid ground beneath you. The original system had <60% success and burned 20,000-50,000 tokens per query. The new system: 98% completion rate, self-healing, 20-30 second response times, and a codebase the team can confidently maintain. That's what happens when you measure, build proof, make evidence-based decisions, and choose pragmatism over hype. Would love to hear from folks who've faced similar decisions. When have you chosen the "older but reliable" option over the shiny new thing? How do you balance innovation with production readiness? Thanks for reading this post!
2
7
242
【Next.jsでLangChainエージェントを構築し、SSEでストリーミング応答を実装】 Next.js 16のApp Router上でLangChainのcreateAgentを用いたエージェントを実装し、Reactクライアントは@ langchain/langgraph-sdk/reactのuseStreamでストリーミング応答を受け取る。バックエンドはサーバーサイドイベント(SSE)で逐次トークンを配信し、フロントはメッセージを即時描画する。ツール呼び出しはバブル表示で可視化し、エラー時の再送や表示も備える。 状態管理はLangGraphのcheckpointerであるMemorySaverを使用し、会話の継続に必要な情報を保持する。エージェントはChatAnthropicを通じてClaudeと連携し、モデルはclaude-3-7-sonnet-latestなど任意に切り替え可能。ツールはget_customer_informationなどを例に、Zod(z.object(...))でパラメータを検証する。通信はFetchStreamTransportでAPIルートに接続し、ダークモード対応のモダンUIで人間とAIのメッセージをストリーミング表示する。 pnpm、npm、yarnのいずれでも動作し、環境変数NEXT_PUBLIC_ANTHROPIC_API_KEYを設定してブラウザからキー入力を省略できる。MIT Licenseで公開。
1
22
2,020
I've been using Composer as a sci-fi librarian. Basically I spider docs locally into a single files and then have it create a "grep index" in another MD file that let's it find anything super fast, like a index at the back of a book, but for bots. It works a lot better (in my experience) than vector stored docs because today's models are amazing at using unix tools like grep and awk. Now I can basically say: "Go find me everything on StateGraph in langgraph docs using langgraph-docs-index.md and then VALIDATE it against the install library by READING the library closely." It will build a strongly accurate reply or doc for you in 10-15 seconds that is just a joy to read. Some examples from my langgraph index: #### Usage Patterns ```bash # Find swarm examples grep -n -A30 "createSwarm({" langgraph-api-reference.md | head -100 # Find handoff patterns grep -n "handoff\|Handoff\|createHandoffTool" langgraph-api-reference.md | head -30 # Find active agent router grep -n "addActiveAgentRouter\|active.*agent" langgraph-api-reference.md | head -30 # Find compile with checkpointer grep -n -A20 "\.compile.*checkpointer\|compile.*MemorySaver" langgraph-api-reference.md | head -30 ``` #### State Management ```bash # Find SwarmState type grep -n "SwarmState\|swarm.*state" langgraph-api-reference.md | head -20 # Find memory integration grep -n "short-term.*memory\|long-term.*memory\|checkpointer" langgraph-api-reference.md | head -30 # Find conversation state grep -n "conversation.*state\|multi-turn\|turn.*state" langgraph-api-reference.md | head -30 ``` --- ## Common Patterns ### Finding Method Documentation ```bash # Find methods section for a class grep -n "^## Methods$" langgraph-api-reference.md | head -20 # Find specific method (e.g., invoke) grep -n "### \`invoke\`" langgraph-api-reference.md | head -10 # Find method with class context grep -B10 -A30 "### \`invoke\`" langgraph-api-reference.md | grep -B10 "StateGraph" | head -50 ``` ### Finding Property Documentation ```bash # Find properties section grep -n "^## Properties$" langgraph-api-reference.md | head -20 # Find specific property grep -n "### \`name\`" langgraph-api-reference.md | head -10 ```

1
2
1,163