Comprehensive Analysis of MetaGPT: An LLM Framework for Software Development

Comprehensive Analysis of MetaGPT: An LLM Framework for Software Development

AI Agents are considered by many to be the future direction of large model development. Previously, Lilian Weng, head of OpenAI’s safety team, published a detailed blog introducing AI autonomous agent robots, which attracted a lot of attention. Released in July, MetaGPT is a brand new AI Agent project that provides an automated agent framework … Read more

Mastering LangGraph – State Management – 01

Mastering LangGraph - State Management - 01

Using Pydantic model as state Previously, we might have used TypedDict the most, but Pydantic model is also a great choice. Let’s see how this type can serve as the graph state. Input Validation from langgraph.graph import StateGraph, START, END from typing_extensions import TypedDict from pydantic import BaseModel # Overall state of the graph (this … Read more

Mastering LangGraph-Memory: A Comprehensive Guide

Mastering LangGraph-Memory: A Comprehensive Guide

LangGraph allows you to easily manage conversation memory in graphs. These operational guides demonstrate how to implement various strategies for this. Managing Conversation History One of the most common use cases for persistence is using it to track conversation history. It makes continuing conversations easier. However, as conversations get longer, this conversation history accumulates and … Read more

Mastering LangGraph Tools: Error Handling Guide

Mastering LangGraph Tools: Error Handling Guide

LLMs are not perfect when calling tools. Models may attempt to call non-existent tools or fail to return parameters that match the requested schema. Strategies such as keeping the schema simple, reducing the number of tools passed at once, and using good names and descriptions can help mitigate this risk, but they are not foolproof. … Read more

Mastering LangGraph: Controllability 03

Mastering LangGraph: Controllability 03

Combining control flow (edges) and state updates (nodes) can be very useful. For instance, you might want to execute state updates and decide which node to transition to next within the same node. LangGraph provides a way to achieve this by returning an object from the Command node function: def my_node(state: State) -> Command[Literal["my_other_node"]]: return … Read more

Creating an Agent with LangGraph and Search Tools

Creating an Agent with LangGraph and Search Tools

In this tutorial, we will learn how to build an intelligent dialogue agent with memory capabilities using LangGraph and LangChain. This agent can use search tools to answer questions and maintain the continuity of conversations. 1. Obtain API Key for Search Tool Log in to the search tool website: <span>https://tavily.com/</span>, generate an API key as … Read more

Mastering LangGraph Tools: Configuring Parameters

Mastering LangGraph Tools: Configuring Parameters

How to Pass Config to the Tools At runtime, we may need to pass values to the tools, such as user ID. For security reasons, this value should be set by application logic rather than controlled by the LLM. The LLM should only manage its expected parameters. The LangChain tools use the Runnable interface, where … Read more

Mastering LangGraph Tools: A Comprehensive Guide

Mastering LangGraph Tools: A Comprehensive Guide

Sometimes, we want the LLM that calls the tools to fill in a subset of parameters for the tool functions, while providing other values for the remaining parameters at runtime. If you are using LangChain-style tools, a simple way to handle this situation is to annotate the function parameters with InjectedArg. This annotation excludes the … Read more

Differences Between LangChain and LangGraph

Differences Between LangChain and LangGraph

In the field of large models, LangChain and LangGraph are two frameworks that have attracted considerable attention. Both aim to help developers build applications using large language models (LLMs), but they differ significantly in design philosophy, architecture, functionality, and applicable scenarios. 1. Introduction to LangChain LangChain is a framework for developing applications powered by large … Read more

Mastering LangGraph-Stream

Mastering LangGraph-Stream

LangGraph has built-in first-class stream support. Streaming output graph .stream and .astream are synchronous and asynchronous methods for streaming outputs back from the graph run. When calling these methods, several different modes can be specified (for example, `graph.stream(…, mode=”…”)`): values: This will transmit the full value of the state after each step of the graph. … Read more