> For the complete documentation index, see [llms.txt](https://agenticai.kasinathanramesh.vip/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://agenticai.kasinathanramesh.vip/section-6-context-handling-in-graphs/21st-june-2026.md).

# 21st June 2026

**`LangChain and LangGraph`**

<figure><img src="/files/iir3Vhsry1iFfo60hY30" alt=""><figcaption></figcaption></figure>

Consolidation of Jobs - Need an Agent

To Build aganet - LangChain

<div align="left"><figure><img src="/files/98CbwizZoZjcIxILed1f" alt=""><figcaption></figcaption></figure></div>

How do identify edges? How many edges in the attached flow? How many nodes?

In a flow graph (or directed graph), an **edge** is each connection/arrow between two nodes.

From your diagram, the directed edges are:

1. BR → DH
2. DH → FR
3. DH → RR
4. DH → LR
5. FR → CA
6. RR → CA
7. LR → CA
8. CA → BC
9. BC → AP

So:

* **Number of nodes (vertices)** = 8 (BR, DH, FR, RR, LR, CA, BC, AP)
* **Number of edges** = **9**

A quick way to identify edges is to count every arrow connecting one node to another. Each arrow represents one edge.

The diagram contains **8 nodes (vertices)**:

1. BR
2. DH
3. FR
4. RR
5. LR
6. CA
7. BC
8. AP

So:

* **Nodes = 8**
* **Edges = 9**

As a check, you can count the circles in the diagram—each circle is a node. There are 8 circles total.

**`Memory, buffer and context handling`**

**`buffer -`** Last 4 conversation store. To store temporary last few conversations.

**`Context Memory -`&#x20;**&#x20;Keywords from conversations.

**`Memory`** -&#x20;

Longer conversation can store it in&#x20;

**`Memory, context memory, buffer explanation in using multi agent`**

#### 1. Memory (long-term storage)

Think of **memory** as a notebook the agents can keep and reuse over time.

* It stores important information for later
* It can persist across tasks or sessions
* Example: “User prefers short answers” or “Agent A learned a rule yesterday”

👉 In multi-agent systems, different agents can sometimes share memory so they don’t relearn the same things.

***

#### 2. Context (working situation)

**Context** is the “current situation” the agent is thinking about right now.

* It’s temporary
* It includes what’s happening in the current task
* It helps the agent make immediate decisions

Example:

* The current user question
* The current conversation history
* The current goal (“solve math problem” or “plan trip”)

👉 Think of context as what’s on your desk right now while working.

***

#### 3. Buffer (short-term holding area)

A **buffer** is like a waiting tray where information is temporarily stored before being used or moved somewhere else.

* Very short-term storage
* Often used to pass messages between agents
* Helps coordinate timing and flow

Example:

* Agent A sends results → buffer → Agent B reads them
* Streaming incoming data before processing

👉 Think of it as a “holding queue” or inbox.

***

### Simple way to remember

* **Memory = what you keep forever (or long-term)**
* **Context = what you are using right now**
* **Buffer = what is waiting to be used next**

***

### In multi-agent systems

Imagine 3 agents:

* Agent A (researcher)
* Agent B (planner)
* Agent C (writer)

Flow might look like:

1. A writes finding → goes into **buffer**
2. B reads buffer → uses **context** to plan
3. Key insights saved into **memory** for future tasks

**`Why retry and fall back mechanism`**&#x20;


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://agenticai.kasinathanramesh.vip/section-6-context-handling-in-graphs/21st-june-2026.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
