<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: obiwale ayomide</title>
    <description>The latest articles on DEV Community by obiwale ayomide (@obiwale_ayomide_cdcf8b961).</description>
    <link>https://dev.to/obiwale_ayomide_cdcf8b961</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3654336%2Fd0c09b10-f874-4618-83e8-183aad940c78.png</url>
      <title>DEV Community: obiwale ayomide</title>
      <link>https://dev.to/obiwale_ayomide_cdcf8b961</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/obiwale_ayomide_cdcf8b961"/>
    <language>en</language>
    <item>
      <title>The Anatomy of an AI Agent: Five Parts and the Framework That Wires Them Together</title>
      <dc:creator>obiwale ayomide</dc:creator>
      <pubDate>Mon, 07 Sep 2026 23:02:12 +0000</pubDate>
      <link>https://dev.to/obiwale_ayomide_cdcf8b961/the-anatomy-of-an-ai-agent-five-parts-that-turn-thinking-into-doing-38ml</link>
      <guid>https://dev.to/obiwale_ayomide_cdcf8b961/the-anatomy-of-an-ai-agent-five-parts-that-turn-thinking-into-doing-38ml</guid>
      <description>&lt;p&gt;Ask a language model to book you a table for six this Thursday and it will do something quietly maddening. It will explain, fluently and with total confidence, exactly how one might book a table for six this Thursday. Then it will stop. Articulate, helpful, and unable to lift a finger.&lt;/p&gt;

&lt;p&gt;That gap between knowing and doing is the whole difference between a chatbot and an agent. And the reason for the gap is blunt: a language model can only ever produce text. It cannot click a button, run a program, remember yesterday, or wait for your approval. So an agent is not a smarter model. It's a model surrounded by parts that cover what it can't do — and, just as importantly, a &lt;strong&gt;framework&lt;/strong&gt; that wires those parts together and runs them.&lt;/p&gt;

&lt;p&gt;That second half is the part most explanations skip. You can read ten articles listing "the components of an agent" and still have no idea how they actually connect. So here's the plan: meet the five parts, then meet the thing that binds them. If the parts are organs, the framework — LangChain being the best-known — is the nervous system that turns a pile of organs into a body that can act.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. The Brain: the LLM
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fh3ijevhz3zsu5wxxpmzi.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fh3ijevhz3zsu5wxxpmzi.png" alt="Illustration of the Brain component, the LLM at the centre of the agent." width="800" height="503"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;At the center sits a large language model, the same family of technology behind ChatGPT and Claude. This is where understanding and judgment live. It reads the request, thinks it through, and decides what should happen next. By a wide margin, it is the smartest thing in the room.&lt;/p&gt;

&lt;p&gt;It also cannot do a thing. Left alone, the model — whether it's OpenAI's &lt;a href="https://huggingface.co/openai" rel="noopener noreferrer"&gt;GPT&lt;/a&gt;, Anthropic's &lt;a href="https://huggingface.co/Anthropic" rel="noopener noreferrer"&gt;Claude&lt;/a&gt;, Google's &lt;a href="https://huggingface.co/google" rel="noopener noreferrer"&gt;Gemini&lt;/a&gt;, Meta's &lt;a href="https://huggingface.co/meta-llama" rel="noopener noreferrer"&gt;Llama&lt;/a&gt;, or &lt;a href="https://huggingface.co/mistralai" rel="noopener noreferrer"&gt;Mistral&lt;/a&gt; — is the brilliant colleague locked in a room with no phone. On each turn it does exactly one thing: it's handed the story so far as text and asked "what next?", and it replies with either a finished answer or a request to use a tool. It never acts. It only decides and describes. Everything else in this article exists to carry those decisions out into the world and bring the results back — and the framework is what does the carrying.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. The Hands: skills and tools
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fcl5j22alqptijb4angue.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fcl5j22alqptijb4angue.png" alt="Illustration of the Hands component: a robotic arm reaching toward tool tiles for search, code, email and databases." width="800" height="503"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Tools are the specific abilities you bolt onto the model: search the web, run code, send an email, query a database. Each is a door from thinking into doing.&lt;/p&gt;

&lt;p&gt;But notice the problem — the model can't open a door, only ask for one. This is the first thing the framework does for you. You write an ordinary function and describe it in plain language; the framework advertises that description to the model as an available tool, and when the model replies &lt;em&gt;"call &lt;code&gt;search_web&lt;/code&gt; with &lt;code&gt;query: ramen near Shibuya&lt;/code&gt;,"&lt;/em&gt; it's the &lt;strong&gt;framework&lt;/strong&gt;, not the model, that runs the real function and feeds the result back. Your tools sit on one side; the model only ever names them; the framework is the hand that reaches between. The reach of an agent is whatever is on that menu — for a sense of how much can be, browse a collection like this &lt;a href="https://github.com/ObiwaleAyomideMoses/ai-agent-tools-catalog" rel="noopener noreferrer"&gt;catalog of AI agent tools&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. The Notebook: memory
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F925yali8c8aaa9iiao39.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F925yali8c8aaa9iiao39.png" alt="Illustration of the Memory component as an open notebook with notes, checkmarks and a bookmark." width="800" height="503"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here's a fact that surprises people: the model remembers nothing between turns. Each call starts cold. So the "story so far" it reads every turn has to be handed to it, fresh, every single time — and holding that story is another of the framework's jobs.&lt;/p&gt;

&lt;p&gt;The framework keeps a running transcript of the task: your request, each tool the model called, each result that came back. Before every turn it re-injects that transcript so the model can pick up where it left off. That's short-term memory, and it's why an agent's second step can build on its first instead of forgetting it. Long-term memory is the same idea stretched across tasks — facts worth keeping, like your preferences, stored outside the conversation and pulled back in when relevant. When an agent "knows" a teammate is vegetarian, the framework fetched that fact and dropped it into the transcript so the model sees it as if it always knew. Without this thread, every turn is déjà vu.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. The Strategist: planning
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fkehm0r1brjfhhpx48gpj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fkehm0r1brjfhhpx48gpj.png" alt="Illustration of the Planning component as a route of stepping-stone cards leading up to a goal flag." width="800" height="503"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Give a capable person a shapeless goal and the thing standing between them and paralysis is a plan. Planning turns "organize the team offsite" into a sequence: find venues, check dates, draft an invite, send it once you've approved.&lt;/p&gt;

&lt;p&gt;In an agent, planning isn't a separate box that fires once. It's that "what next?" decision, made again on every turn — reason a little, pick a tool, read the result, reason again. (You'll see this pattern named ReAct, for &lt;em&gt;reason and act&lt;/em&gt;.) And the reason it can happen repeatedly is the framework: it's the framework that loops back to the model after every tool result and asks "what next?" once more, so the model can adjust — rerouting when the first restaurant turns out to be fully booked, because nothing is hard-coded and the next move is decided fresh each pass. Planning is what turns a pile of tools into a route; the framework is what lets the route be drawn one step at a time.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. The Co-pilot: human in the loop
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Frcgqcw3p762su17o1w8f.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Frcgqcw3p762su17o1w8f.png" alt="Illustration of the Human-in-the-Loop component: a person with a headset, an approval checkmark and a redirect arrow." width="800" height="503"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The last part is the one most often left off the diagram, and the one you'd miss the most: you.&lt;/p&gt;

&lt;p&gt;Its place in the machine is exact. Remember the hand-off — when the model asks for a tool, the framework runs it. Human-in-the-loop is a checkpoint the framework enforces on that step. For anything cheap and reversible, like a search, it runs the tool and moves on. For anything that spends money or can't be undone, like &lt;code&gt;book_venue&lt;/code&gt;, the framework pauses &lt;em&gt;before&lt;/em&gt; executing, surfaces the pending call — "ready to book the $1,200 venue for Thursday, shall I go ahead?" — and waits. Approve and it runs; decline or edit and your reply becomes the next line in the transcript, which the model reads and adapts to. You're not watching from outside. You're a conditional step the framework fires only on the moves that carry weight.&lt;/p&gt;

&lt;h2&gt;
  
  
  The framework: the wiring that makes it an agent
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fy0cu9qxfokjw3mz4lkyh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fy0cu9qxfokjw3mz4lkyh.png" alt="Diagram of a request entering the agent, the model deciding, a tool running, memory threading through every step and a human approving, looping until the goal is done." width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Line the five parts up and you still don't have an agent. They don't touch. A model can't run a tool; a tool can't recall the transcript; the transcript can't decide what to do next; you can't approve a call nobody surfaced to you. Something has to connect them — pass each part's output to the next, and keep the whole thing moving. That something is the framework, and its role comes down to five concrete jobs:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;One voice to the model.&lt;/strong&gt; It wraps whatever LLM you pick behind a single interface, so swapping Claude for Llama doesn't ripple through your code.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A registry of tools it can run.&lt;/strong&gt; It turns your described functions into the menu the model sees, and executes the real function when the model names it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Custody of memory.&lt;/strong&gt; It stores the transcript, fetches long-term facts, and re-feeds the right context every turn.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The loop.&lt;/strong&gt; This is the engine room. It assembles the context, calls the model, reads the reply, runs a tool if asked, appends the result, and goes again — until the model returns an answer instead of a tool call.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Gates for humans.&lt;/strong&gt; It's where the pause lives, stopping before sensitive tools to wait for your yes.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;In practice you &lt;em&gt;declare&lt;/em&gt; the parts and let the framework run the loop. In LangChain-flavored pseudocode, assembling an agent looks about like this — recognizable whether you end up using LangChain, LlamaIndex, or CrewAI, because they're all doing the same thing:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;# 1. THE BRAIN — one interface over any model
&lt;/span&gt;&lt;span class="n"&gt;llm&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;ChatModel&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;claude&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;            &lt;span class="c1"&gt;# swap for gpt / llama; nothing else changes
&lt;/span&gt;
&lt;span class="c1"&gt;# 2. THE HANDS — plain functions; the framework runs them when the model asks
&lt;/span&gt;&lt;span class="nd"&gt;@tool&lt;/span&gt;
&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;search_restaurants&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;area&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;list&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="bp"&gt;...&lt;/span&gt;
&lt;span class="nd"&gt;@tool&lt;/span&gt;
&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;check_calendar&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;people&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;list&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;dict&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="bp"&gt;...&lt;/span&gt;
&lt;span class="nd"&gt;@tool&lt;/span&gt;
&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;book_table&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;place&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;time&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="bp"&gt;...&lt;/span&gt;

&lt;span class="n"&gt;tools&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;search_restaurants&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;check_calendar&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;book_table&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;

&lt;span class="c1"&gt;# 3. THE NOTEBOOK — the framework stores &amp;amp; re-feeds the transcript
&lt;/span&gt;&lt;span class="n"&gt;memory&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;ConversationMemory&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;

&lt;span class="c1"&gt;# 4. THE STRATEGIST + 5. THE CO-PILOT — wired into one runnable loop
&lt;/span&gt;&lt;span class="n"&gt;agent&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;create_agent&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;llm&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;tools&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;memory&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;require_approval&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;book_table&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;   &lt;span class="c1"&gt;# human gate on the irreversible tool
&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;agent&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;run&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Organize a team lunch for six of us next week.&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Look at what you &lt;em&gt;didn't&lt;/em&gt; write: the loop. You never wrote "call the model, parse its reply, run the tool it named, save the result, ask again." That loop is precisely what &lt;code&gt;create_agent&lt;/code&gt; builds and &lt;code&gt;agent.run&lt;/code&gt; executes — the framework's core job. Underneath, it's this small:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;history&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;memory&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;load&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;                    &lt;span class="c1"&gt;# the notebook
&lt;/span&gt;&lt;span class="k"&gt;while&lt;/span&gt; &lt;span class="bp"&gt;True&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;reply&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;llm&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;history&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;tools&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;            &lt;span class="c1"&gt;# brain + strategist: decide
&lt;/span&gt;    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;reply&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;is_answer&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;reply&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;text&lt;/span&gt;                  &lt;span class="c1"&gt;# nothing left to do — stop
&lt;/span&gt;    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;reply&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;tool_call&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;require_approval&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="nf"&gt;wait_for_human&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;reply&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;tool_call&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;    &lt;span class="c1"&gt;# co-pilot: the gate
&lt;/span&gt;    &lt;span class="n"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;run&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;reply&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;tool_call&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;          &lt;span class="c1"&gt;# hands: the framework runs it
&lt;/span&gt;    &lt;span class="n"&gt;history&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;reply&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;tool_call&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;   &lt;span class="c1"&gt;# notebook: remember both
&lt;/span&gt;    &lt;span class="n"&gt;memory&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;save&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;history&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now watch the team lunch flow through it, with the framework as the thing doing the connecting. You hand it the goal; it starts the transcript. It calls the model, which — reading the goal — asks for &lt;code&gt;search_restaurants&lt;/code&gt;; the framework runs that function and appends the options. It calls the model again with the longer transcript; now the model asks for &lt;code&gt;check_calendar&lt;/code&gt;, and while wiring the result back in, memory adds that Priya can't do Mondays, so the model narrows to a workable day. The model settles on a place and asks for &lt;code&gt;book_table&lt;/code&gt; — but that tool is gated, so the framework stops and asks &lt;em&gt;you&lt;/em&gt; first. You say yes; it runs the booking, appends the success, and calls the model one last time. This turn the model returns not a tool call but an answer: booked, Thursday 12:30, vegetarian options sorted. Every arrow in that story was the framework taking one part's output and handing it to the next.&lt;/p&gt;

&lt;h2&gt;
  
  
  Not just LangChain
&lt;/h2&gt;

&lt;p&gt;LangChain is the common entry point, but the same shape shows up everywhere. LangGraph (its graph-based sibling) models the loop as an inspectable, resumable state machine; &lt;a href="https://www.llamaindex.ai" rel="noopener noreferrer"&gt;LlamaIndex&lt;/a&gt; leans toward retrieval and memory; &lt;a href="https://www.crewai.com" rel="noopener noreferrer"&gt;CrewAI&lt;/a&gt; orchestrates crews of cooperating agents; and the model-makers ship their own kits — OpenAI's function calling, Anthropic's tool use — that give you the tool hand-off directly. They differ in flavor and ambition, but under the branding each is doing the five jobs above.&lt;/p&gt;

&lt;p&gt;Which means a new framework stops being intimidating. You can size any of them up with three questions: &lt;strong&gt;where does it keep the transcript, how does it describe tools to the model, and where does it let a human step in?&lt;/strong&gt; Answer those and you know how it connects the parts.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where this leaves you
&lt;/h2&gt;

&lt;p&gt;Nothing here asks the model to be magic. It only produces text — it decides and describes, one turn at a time. Everything that makes an agent feel like it's &lt;em&gt;doing&lt;/em&gt; things is the framework wrapped around that text: advertising tools and running them, carrying the transcript in and out, looping back for the next decision, and pausing at the gates that matter. The model is the engine; the framework is the rest of the car, and the five parts are what it connects.&lt;/p&gt;

&lt;p&gt;So the next agent you meet gets much easier to read. The question stops being "how does the model work" and becomes sharper and more practical: what's on its tool menu, what's in its transcript, and where does it stop to ask?&lt;/p&gt;

&lt;p&gt;If you've built or leaned on one of these, I'm curious which part you think most frameworks get wrong. My money is on the last one.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>beginners</category>
      <category>machinelearning</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Delivery vs Payment (DvP): How CRE Solves the Hardest Problem in Finance</title>
      <dc:creator>obiwale ayomide</dc:creator>
      <pubDate>Tue, 17 Mar 2026 16:12:28 +0000</pubDate>
      <link>https://dev.to/obiwale_ayomide_cdcf8b961/delivery-vs-payment-dvp-how-cre-solves-the-hardest-problem-in-finance-5586</link>
      <guid>https://dev.to/obiwale_ayomide_cdcf8b961/delivery-vs-payment-dvp-how-cre-solves-the-hardest-problem-in-finance-5586</guid>
      <description>&lt;p&gt;Recently, I wrote about&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;a href="https://dev.to/obiwale_ayomide_cdcf8b961/cre-the-missing-coordination-layer-between-traditional-banking-and-blockchain-2ecj"&gt;CRE: The Missing Coordination Layer Between Traditional Banking and Blockchain&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;It's time to go deeper because coordination alone isn’t enough. The real problem has always been settlement.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Problem: Settlement Risk&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;At the core of every financial transaction is a simple requirement:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;When one party delivers an asset, the other must pay.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This is known as Delivery vs Payment (DvP).&lt;br&gt;
&lt;code&gt;Asset transfer ↔ Payment transfer&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Both must happen together or not at all. If they don’t, one party takes on risk.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why DvP Breaks in Modern Systems&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;DvP works well inside a single system. But today’s financial world is fragmented across:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Banks&lt;/li&gt;
&lt;li&gt;Blockchains&lt;/li&gt;
&lt;li&gt;Custodians&lt;/li&gt;
&lt;li&gt;Payment networks&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Now consider this:&lt;br&gt;
&lt;code&gt;Asset → Exists on a blockchain  &lt;br&gt;
Payment → Exists in a bank ledger&lt;/code&gt; &lt;/p&gt;

&lt;p&gt;Two completely different systems.&lt;/p&gt;

&lt;p&gt;The real question becomes:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;How do you guarantee both sides settle atomically across systems that don’t trust each other?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Before CRE: The Workarounds&lt;/strong&gt;&lt;br&gt;
The industry had previously resorted to the following before the emergence of solutions such as Chainlink Runtime Environment (CRE):&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt; Intermediaries: Dependent on intermediaries such as clearing houses and custodians to facilitate trust between two parties&lt;/li&gt;
&lt;li&gt; Time Delays: Time periods such as T+2 reduce risks&lt;/li&gt;
&lt;li&gt; Manual Reconciliation: Systems reconcile transactions after the fact.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;All of these introduce:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Counterparty risk&lt;/li&gt;
&lt;li&gt;Operational complexity&lt;/li&gt;
&lt;li&gt;Capital inefficiency&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Why Blockchains Didn’t Fully Solve This&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Blockchains introduced atomic settlement, but only within their own environment and it works perfectly. &lt;br&gt;
&lt;code&gt;Token A ↔ Token B (same chain)&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;But:&lt;br&gt;
&lt;code&gt;Token (on-chain) ↔ Cash (in a bank)&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;This is broken because blockchains cannot:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Access bank systems&lt;/li&gt;
&lt;li&gt;Trigger external payments&lt;/li&gt;
&lt;li&gt;Guarantee off-chain execution&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Enter CRE: A New Settlement Primitive&lt;/strong&gt;&lt;br&gt;
Chainlink Runtime Environment (CRE) introduces:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Programmable, verifiable workflows across on-chain and off-chain systems&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Instead of forcing everything onto one chain, CRE connects:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Smart contracts → Chainlink Runtime Environment → External systems (banks, APIs, other chains)&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;This approach enables a cross-system atomic settlement&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A Real Example: Cross-System DvP in Action&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Recently,&lt;br&gt;
&lt;a href="https:chain.link" rel="noopener noreferrer"&gt;Chainlink&lt;/a&gt;,&lt;br&gt;
&lt;a href="https://www.jpmorganchase.com/" rel="noopener noreferrer"&gt;JPMorgan Chase&lt;/a&gt; (via Kinexys), and&lt;br&gt;
&lt;a href="https://ondo.finance/" rel="noopener noreferrer"&gt;Ondo Finance&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;executed a cross-chain &lt;strong&gt;Delivery vs Payment transaction&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;This is one of the clearest real-world examples of CRE in action.&lt;/p&gt;

&lt;p&gt;What Was Being Traded&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Asset: Tokenized U.S. Treasuries (OUSG)&lt;/li&gt;
&lt;li&gt;Payment: Bank deposit on Kinexys&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Where each part lived:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Ondo Chain → Asset layer&lt;br&gt;&lt;br&gt;
Kinexys → Bank payment layer&lt;br&gt;&lt;br&gt;
CRE → Coordination + execution layer&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Step-by-Step: How the Transaction Happened&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Step 1: The Intent&lt;br&gt;
A participant wants to buy tokenized U.S. Treasuries (OUSG).&lt;/p&gt;

&lt;p&gt;But:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The asset is on a blockchain&lt;/li&gt;
&lt;li&gt;The money is in a bank&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Step 2: The Risk&lt;br&gt;
Without coordination:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Send money first → risk losing funds&lt;br&gt;&lt;br&gt;
Receive asset first → risk not getting paid &lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;In the absence of atomic settlement, there are many hidden but critical risks that may affect the transaction. When one side of a transaction is executed before the other, a party may have fulfilled their side of the transaction but may not receive anything in return. This is referred to as principal risk. Even if both parties are willing to settle, there may be timing risks due to changes in market conditions or system and participant behavior.&lt;/p&gt;

&lt;p&gt;Step 3: CRE Coordinates the Transaction&lt;br&gt;
Instead of trusting either side, both systems are connected through Chainlink Runtime Environment (CRE)&lt;/p&gt;

&lt;p&gt;Step 4: Conditional Logic Is Enforced&lt;br&gt;
CRE defines the rules:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;IF payment succeeds → release asset&lt;br&gt;&lt;br&gt;
IF asset transfer succeeds → finalize payment&lt;br&gt;&lt;br&gt;
ELSE → abort everything&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The transaction reverts if any of the conditions fail. This is the beauty of atomic transactions.&lt;/p&gt;

&lt;p&gt;Step 5: Parallel Execution&lt;br&gt;
Both systems are triggered simultaneously:&lt;/p&gt;

&lt;p&gt;On Ondo Chain:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Prepare transfer of OUSG tokens&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;On Kinexys:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Prepare transfer of bank deposit&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Step 6: Verification and Consensus&lt;br&gt;
CRE nodes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Monitor both sides&lt;/li&gt;
&lt;li&gt;Verify execution results&lt;/li&gt;
&lt;li&gt;Reach consensus&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Step 7: Atomic Settlement&lt;/p&gt;

&lt;p&gt;Only when both sides are confirmed:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;OUSG tokens → transferred&lt;br&gt;&lt;br&gt;
USD deposit → transferred  &lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;If anything fails:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Everything is rolled back &lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This is more than just a successful transaction, it introduces a new financial primitive:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Cross-System Atomicity&lt;br&gt;
DvP is no longer limited to a single ledger.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Trust-Minimized settlement as trust would only be on protocol.&lt;br&gt;
No need to trust:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The counterparty&lt;/li&gt;
&lt;li&gt;The bank&lt;/li&gt;
&lt;li&gt;The blockchain&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Real-World Asset enablement as Tokenized assets can now settle against:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Bank deposits&lt;/li&gt;
&lt;li&gt;Stablecoins&lt;/li&gt;
&lt;li&gt;Future CBDCs&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;For years, blockchain technology has claimed the promise of "Faster, cheaper, trustless settlement." However, until the problem of cross-system DvP is resolved, the promise is incomplete. Now, with the introduction of CRE, the settlement is not only happening on a particular blockchain but across the entire financial system.&lt;/p&gt;

</description>
      <category>blockchain</category>
      <category>discuss</category>
      <category>softwaredevelopment</category>
    </item>
    <item>
      <title>CRE: The Missing Coordination Layer Between Traditional Banking and Blockchain</title>
      <dc:creator>obiwale ayomide</dc:creator>
      <pubDate>Thu, 05 Mar 2026 00:45:03 +0000</pubDate>
      <link>https://dev.to/obiwale_ayomide_cdcf8b961/cre-the-missing-coordination-layer-between-traditional-banking-and-blockchain-2ecj</link>
      <guid>https://dev.to/obiwale_ayomide_cdcf8b961/cre-the-missing-coordination-layer-between-traditional-banking-and-blockchain-2ecj</guid>
      <description>&lt;p&gt;For years, traditional banking and blockchain have operated in parallel universes.&lt;/p&gt;

&lt;p&gt;Traditional banking runs on structured messaging systems using ISO 20022.&lt;br&gt;
Blockchain runs on smart contracts using decentralized consensus.&lt;br&gt;
Both move money.&lt;br&gt;
Both need trust.&lt;br&gt;
But neither talks to the other.&lt;/p&gt;

&lt;p&gt;CRE (Chainlink Runtime Environment) changes this balance of power.&lt;/p&gt;

&lt;p&gt;CRE is not a blockchain.&lt;br&gt;
It is not a bank.&lt;br&gt;
It is a coordination layer — a programmable execution environment powered by decentralized oracle networks that enables secure communication between off-chain financial systems and on-chain smart contracts.&lt;/p&gt;

&lt;p&gt;CRE doesn’t replace banking.&lt;br&gt;
CRE doesn’t replace blockchain.&lt;br&gt;
CRE makes it possible for the two to coordinate with each other.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Real Problem: Coordination, Not Technology
&lt;/h3&gt;

&lt;p&gt;Traditional finance is a workflow-based business.&lt;/p&gt;

&lt;p&gt;Every single financial transaction in a bank, from a wire transfer to a securities settlement, is a process that follows a specific operational flow:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Instruction received&lt;/li&gt;
&lt;li&gt;Compliance check&lt;/li&gt;
&lt;li&gt;Message formatted (ISO 20022)&lt;/li&gt;
&lt;li&gt;Routed to counterparties&lt;/li&gt;
&lt;li&gt;Ledger updated&lt;/li&gt;
&lt;li&gt;Audit trail created&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Blockchain is an event-based system.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Smart contract executes&lt;/li&gt;
&lt;li&gt;Token is transferred&lt;/li&gt;
&lt;li&gt;Event is emitted&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;However, that event does not automatically trigger a set of compliance checks in a bank.&lt;br&gt;
The event does not automatically generate an ISO 20022 message.&lt;br&gt;
The event does not automatically update an institutional ledger.&lt;/p&gt;

&lt;p&gt;In traditional systems, bridging these two systems together required:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Middleware servers&lt;/li&gt;
&lt;li&gt;Reconciliation&lt;/li&gt;
&lt;li&gt;Batch processing&lt;/li&gt;
&lt;li&gt;Fragile APIs&lt;/li&gt;
&lt;li&gt;Centralized relayers&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;CRE brings something new to the table: workflows.&lt;/p&gt;

&lt;p&gt;Let's consider the example of an international wire transfer.&lt;/p&gt;

&lt;p&gt;From the customer's perspective:&lt;br&gt;
We enter the details, hit send, and the funds arrive.&lt;/p&gt;

&lt;p&gt;Behind the scenes:&lt;/p&gt;

&lt;p&gt;The bank authenticates the user's identity.&lt;/p&gt;

&lt;p&gt;The transaction is checked for sanctions.&lt;/p&gt;

&lt;p&gt;An ISO 20022 message is created.&lt;/p&gt;

&lt;p&gt;The correspondent banks work together to settle the transaction.&lt;/p&gt;

&lt;p&gt;The ledgers are updated.&lt;/p&gt;

&lt;p&gt;The confirmation messages are sent back.&lt;/p&gt;

&lt;p&gt;The audit trails are stored.&lt;/p&gt;

&lt;p&gt;This is not a single operation.&lt;br&gt;
This is a whole workflow, happening across different systems.&lt;/p&gt;

&lt;p&gt;Let's consider replacing one of the banks in the entire workflow with a blockchain network.&lt;/p&gt;

&lt;p&gt;Without CRE:&lt;/p&gt;

&lt;p&gt;The blockchain can't interpret the ISO 20022 messages.&lt;/p&gt;

&lt;p&gt;The bank can't interpret the smart contract events.&lt;/p&gt;

&lt;p&gt;We need to implement a custom backend to translate between the two systems.&lt;/p&gt;

&lt;p&gt;With CRE:&lt;/p&gt;

&lt;p&gt;A banking message can trigger an on-chain event.&lt;/p&gt;

&lt;p&gt;An on-chain event can trigger the automatic generation of an ISO 20022 message.&lt;/p&gt;

&lt;p&gt;Compliance can be integrated into the workflow.&lt;/p&gt;

&lt;p&gt;Reporting can happen in real-time.&lt;/p&gt;

&lt;p&gt;The user experience remains the same.&lt;br&gt;
But in the background, the blockchain has been integrated into the same workflow.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why Major Banks Are Exploring This
&lt;/h3&gt;

&lt;p&gt;Institutions like JPMorgan (through Kinexys), UBS, SWIFT collaborators, and others are not experimenting with blockchain out of curiosity.&lt;/p&gt;

&lt;p&gt;They have strategic reasons.&lt;/p&gt;

&lt;h4&gt;
  
  
  Efficiency &amp;amp; Cost Reduction
&lt;/h4&gt;

&lt;p&gt;Traditional cross-border settlements are slow and layered with intermediaries.&lt;/p&gt;

&lt;p&gt;Blockchain offers:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Near-instant settlement&lt;/li&gt;
&lt;li&gt;Reduced counterparty risk&lt;/li&gt;
&lt;li&gt;Automated reconciliation&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;CRE enhances this by coordinating blockchain settlement with traditional reporting systems, reducing operational overhead.&lt;/p&gt;

&lt;h4&gt;
  
  
  Real-Time Reconciliation
&lt;/h4&gt;

&lt;p&gt;Today, banking systems heavily utilize batch processing and reconciliation systems.&lt;/p&gt;

&lt;p&gt;Blockchain technology allows for deterministic state changes with timestamps.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;CRE facilitates this by ensuring:&lt;/li&gt;
&lt;li&gt;Integration with existing ledger systems&lt;/li&gt;
&lt;li&gt;Generation of structured financial messages&lt;/li&gt;
&lt;li&gt;Record maintenance&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This removes friction from the back-end systems.&lt;/p&gt;

&lt;h4&gt;
  
  
  ISO 20022 Integration
&lt;/h4&gt;

&lt;p&gt;ISO 20022 is the global financial messaging standard.&lt;/p&gt;

&lt;p&gt;It’s the language of modern banking.&lt;/p&gt;

&lt;p&gt;But blockchains don’t natively support this language.&lt;/p&gt;

&lt;p&gt;CRE can:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Translate ISO 20022 instructions into programmable blockchain actions.&lt;/li&gt;
&lt;li&gt;Generate ISO 20022 compliant outputs from on-chain state changes.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That’s important.&lt;br&gt;
It means banks don’t have to abandon their infrastructure to benefit from blockchain.&lt;/p&gt;

&lt;h3&gt;
  
  
  A More Detailed Analogy: The Bank Operations Floor
&lt;/h3&gt;

&lt;p&gt;Imagine the operations floor of a large bank.&lt;/p&gt;

&lt;p&gt;There are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Risk teams&lt;/li&gt;
&lt;li&gt;Compliance teams&lt;/li&gt;
&lt;li&gt;Settlement systems&lt;/li&gt;
&lt;li&gt;Messaging systems&lt;/li&gt;
&lt;li&gt;Ledger systems&lt;/li&gt;
&lt;li&gt;Audit systems&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;When a major transaction happens, all these units coordinate.&lt;/p&gt;

&lt;p&gt;Now imagine a digital “conductor” that:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Receives a financial instruction&lt;/li&gt;
&lt;li&gt;Automatically calls compliance checks&lt;/li&gt;
&lt;li&gt;Formats standardized financial messages&lt;/li&gt;
&lt;li&gt;Routes instructions to the right systems&lt;/li&gt;
&lt;li&gt;Updates ledgers&lt;/li&gt;
&lt;li&gt;Logs immutable records&lt;/li&gt;
&lt;li&gt;Confirms completion&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;CRE acts like that conductor — but across both banking systems and blockchain networks.&lt;/p&gt;

&lt;p&gt;It ensures:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;On-chain actions integrate with traditional workflows.&lt;/li&gt;
&lt;li&gt;Traditional banking messages can trigger programmable execution.&lt;/li&gt;
&lt;li&gt;Everything remains auditable and structured.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  The Deeper Shift: From Transactions to Coordinated Infrastructure
&lt;/h3&gt;

&lt;p&gt;The most significant change is this:&lt;/p&gt;

&lt;p&gt;Blockchains have been transactional.&lt;br&gt;
Banking has been procedural.&lt;br&gt;
CRE makes blockchains procedural.&lt;/p&gt;

&lt;p&gt;Instead of smart contract events, you get institutional workflows.&lt;/p&gt;

&lt;p&gt;Instead of:&lt;br&gt;
“Something happened on chain, now go reconcile it manually.”&lt;/p&gt;

&lt;p&gt;You get:&lt;br&gt;
“Something happened, and the entire institutional workflow happened automatically.”&lt;/p&gt;

&lt;p&gt;That is synergy.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Bigger Vision
&lt;/h3&gt;

&lt;p&gt;This is not about replacing SWIFT.&lt;br&gt;
This is not about replacing banks.&lt;br&gt;
This is not about replacing traditional finance.&lt;/p&gt;

&lt;p&gt;This is about integration.&lt;/p&gt;

&lt;p&gt;CRE enables:&lt;/p&gt;

&lt;p&gt;Structured financial messaging (ISO 20022)&lt;br&gt;
Blockchain programmability&lt;br&gt;
Real-time settlement&lt;br&gt;
Compliance-aware execution&lt;br&gt;
Cross-system coordination&lt;/p&gt;

&lt;p&gt;This is about bridging decentralized execution and institutional operational standards.&lt;/p&gt;

&lt;p&gt;Invisible complexity.&lt;br&gt;
Visible reliability.&lt;/p&gt;

&lt;p&gt;This is why the biggest financial institutions are taking a look.&lt;br&gt;
This is why the conversation around blockchain is shifting from speculation to infrastructure.&lt;/p&gt;

</description>
      <category>blockchain</category>
      <category>defi</category>
      <category>tradefi</category>
      <category>web3</category>
    </item>
    <item>
      <title>Reading Contract State at a Past Block Using Wagmi</title>
      <dc:creator>obiwale ayomide</dc:creator>
      <pubDate>Thu, 08 Jan 2026 16:56:35 +0000</pubDate>
      <link>https://dev.to/obiwale_ayomide_cdcf8b961/reading-contract-state-at-a-past-block-using-wagmi-chainlink-price-feeds-4k7m</link>
      <guid>https://dev.to/obiwale_ayomide_cdcf8b961/reading-contract-state-at-a-past-block-using-wagmi-chainlink-price-feeds-4k7m</guid>
      <description>&lt;p&gt;There was a moment when I needed to answer a deceptively simple question:&lt;/p&gt;

&lt;p&gt;“What was the price of this asset then, not now?”&lt;br&gt;
Not five minutes ago.&lt;br&gt;
Not the current block.&lt;br&gt;
But at a very specific point in the past.&lt;/p&gt;

&lt;p&gt;I was working on a feature that needed historical pricing for an asset. Not off-chain charts, not an indexer snapshot, but the actual on-chain value that existed at a given time. Since the asset used Chainlink price feeds, I assumed this would be straightforward.&lt;/p&gt;

&lt;p&gt;It wasn’t.&lt;/p&gt;

&lt;p&gt;At first, I kept getting the current price no matter what I tried. That’s when I realized something important: most examples show you how to read contract state, but very few show you how to read contract state at a specific block.&lt;/p&gt;

&lt;p&gt;That’s where Wagmi quietly shines.&lt;/p&gt;

&lt;p&gt;The Core Idea&lt;/p&gt;

&lt;p&gt;Ethereum (and EVM chains in general) allow you to query contract state as it existed at any historical block. If a contract method is view or pure, you can read it at a past block without any special indexing infrastructure.&lt;/p&gt;

&lt;p&gt;Wagmi exposes this directly through blockNumber.&lt;/p&gt;

&lt;p&gt;So instead of asking:&lt;br&gt;
“What does the contract return now?”&lt;/p&gt;

&lt;p&gt;You ask:&lt;br&gt;
“What did the contract return at block X?”&lt;/p&gt;

&lt;p&gt;For price feeds, this is gold.&lt;/p&gt;

&lt;p&gt;The Scenario: Chainlink Price at a Past Time&lt;/p&gt;

&lt;p&gt;Chainlink price feeds expose methods like:&lt;br&gt;
latestRoundData()&lt;br&gt;
getRoundData(roundId)&lt;/p&gt;

&lt;p&gt;If you already know the round ID, you can query it directly. But sometimes you don’t. Sometimes all you know is the time.&lt;/p&gt;

&lt;p&gt;A reliable approach is:&lt;/p&gt;

&lt;p&gt;Convert the timestamp you care about into a block number&lt;br&gt;
Read the price feed contract at that block&lt;br&gt;
Let’s focus on step 2 using Wagmi.&lt;br&gt;
Reading a Contract Method at a Specific Block&lt;br&gt;
Wagmi’s readContract (or useReadContract) accepts a blockNumber parameter.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;readContract&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;@wagmi/core&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;parseAbi&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;viem&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;aggregatorAbi&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;parseAbi&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;
  &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;function latestRoundData() view returns (uint80,int256,uint256,uint256,uint80)&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
&lt;span class="p"&gt;])&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;priceFeedAddress&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;0x...&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;blockNumber&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;18&lt;/span&gt;&lt;span class="nx"&gt;_500_000n&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;data&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;readContract&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;address&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;priceFeedAddress&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;abi&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;aggregatorAbi&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;functionName&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;latestRoundData&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;blockNumber&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;})&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;What happens here is subtle but powerful.&lt;/p&gt;

&lt;p&gt;Wagmi asks the RPC node:&lt;/p&gt;

&lt;p&gt;“Pretend the chain is at block 18,500,000. What does this function return?”&lt;/p&gt;

&lt;p&gt;The result is exactly what the Chainlink contract would have returned at that block, not today.&lt;/p&gt;

&lt;p&gt;Why This Works&lt;/p&gt;

&lt;p&gt;Ethereum nodes store historical state. When you specify a blockNumber, the node executes the call against that historical snapshot.&lt;/p&gt;

&lt;p&gt;No subgraph.&lt;br&gt;
No off-chain cache.&lt;br&gt;
No guesswork.&lt;/p&gt;

&lt;p&gt;Just deterministic blockchain state.&lt;/p&gt;

&lt;p&gt;Mapping Time to Block&lt;/p&gt;

&lt;p&gt;You usually don’t know the block number upfront. You know a timestamp.&lt;/p&gt;

&lt;p&gt;Typical approaches:&lt;/p&gt;

&lt;p&gt;Binary search blocks by timestamp using eth_getBlockByNumber&lt;/p&gt;

&lt;p&gt;Use a helper API once, then cache the mapping&lt;/p&gt;

&lt;p&gt;Use an archive node for accuracy&lt;/p&gt;

&lt;p&gt;Once you have the block number, Wagmi does the rest.&lt;/p&gt;

&lt;p&gt;Frontend Example with React&lt;/p&gt;

&lt;p&gt;If you’re using Wagmi hooks in a React app:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;useReadContract&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;wagmi&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;data&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;useReadContract&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;address&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;priceFeedAddress&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;abi&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;aggregatorAbi&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;functionName&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;latestRoundData&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;blockNumber&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;18&lt;/span&gt;&lt;span class="nx"&gt;_500_000n&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;})&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is especially useful for:&lt;/p&gt;

&lt;p&gt;Historical charts&lt;br&gt;
Auditing old positions&lt;br&gt;
Liquidation simulations&lt;br&gt;
“What-if” analytics&lt;br&gt;
Dispute resolution in DeFi&lt;/p&gt;

&lt;p&gt;Important Caveats&lt;/p&gt;

&lt;p&gt;RPC support matters&lt;br&gt;
You need an RPC that supports historical reads. Some free providers prune old state.&lt;/p&gt;

&lt;p&gt;Performance&lt;br&gt;
Historical reads are slightly heavier. Cache results when possible.&lt;/p&gt;

&lt;p&gt;Final Thoughts&lt;br&gt;
Wagmi doesn’t make a big deal out of this feature, but once you realize you can read contract state at any point in time, a lot of problems suddenly become simpler.&lt;/p&gt;

</description>
      <category>ethereum</category>
      <category>react</category>
      <category>tutorial</category>
      <category>web3</category>
    </item>
  </channel>
</rss>
