What are context graphs? Why do AI agents need them?

In AI agents, a context graph is the part of agent memory that captures decisions.This post explains why AI agents need to capture decisions, how context graphs capture them, how agents use them, and how agents enhance their capabilities and performance with them.An agent failure caseIt’s the last week of the quarter. A renewal agent is working a $480k account. The customer wants 20% off or they walk. The agent’s instructions state >$100k accounts should not churn, but the agent’s policy caps renewals at 10%. Now what?If a human was handling this, they’ll probably use experience and memory to resolve.Didn’t we do this exact thing with Globex last quarter? It was a similar story. They were threatening to churn, and someone signed off on 20% because the CEO wanted to retain Fortune 500 logos and the risk was worth taking on a $300k account. It worked and Globex renewed shortly after.

.ra-widget-root{
–surface-2:#ffffff;–surface-1:#f7f8fa;–surface-0:#eef1f4;
–text-primary:#1a1a1a;–text-secondary:#5b5f66;–text-muted:#8b9096;
–border:rgba(20,24,31,.10);–border-strong:rgba(20,24,31,.16);
–bg-accent:#e6f1fb;–text-accent:#185fa5;–border-accent:#85b7eb;
–bg-warning:#faeeda;–text-warning:#854f0b;–border-warning:#ef9f27;
–bg-danger:#fcebeb;–text-danger:#a32d2d;–border-danger:#f09595;
–bg-success:#eaf3de;–text-success:#3b6d11;–border-success:#97c459;
–bg-pro:#eeedfe;–text-pro:#534ab7;–border-pro:#afa9ec;
–fill-danger:#a32d2d;
–ra-font:-apple-system,BlinkMacSystemFont,”Segoe UI”,Roboto,Helvetica,Arial,sans-serif;
–ra-mono:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
background:transparent;max-width:720px;margin:0 auto;padding:16px 0;
font-family:var(–ra-font);color:var(–text-primary);line-height:1.5;
-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;
}
.ra-widget-root *{box-sizing:border-box}
.ra-sr{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);border:0}
.ra-stage{display:block;width:100%}
.ra-deal{display:flex;flex-wrap:wrap;gap:2px;border:1px solid var(–border);border-left:3px solid var(–fill-danger);border-radius:12px;background:var(–surface-2);padding:10px 6px;margin-bottom:12px}
.ra-seg{flex:1;min-width:120px;padding:2px 10px}
.ra-seg + .ra-seg{border-left:1px solid var(–border)}
.ra-lab{font-size:11px;color:var(–text-muted);margin-bottom:2px}
.ra-val{font-size:13.5px;font-weight:600;color:var(–text-primary);line-height:1.25}
.ra-val-warn{color:var(–text-warning)}
.ra-val-dang{color:var(–text-danger)}
.ra-panels{display:flex;flex-wrap:wrap;gap:12px;align-items:stretch}
.ra-panel{flex:1;min-width:296px;background:var(–surface-1);border:1px solid var(–border);border-radius:14px;padding:14px;display:flex;flex-direction:column;transition:opacity .5s}
.ra-head{display:flex;align-items:center;gap:8px;font-size:13px;font-weight:600;margin-bottom:10px}
.ra-tag{width:22px;height:22px;border-radius:6px;display:flex;align-items:center;justify-content:center;font-size:15px;flex:none}
.ra-tag-ag{background:var(–bg-pro);color:var(–text-pro)}
.ra-tag-hu{background:var(–bg-accent);color:var(–text-accent)}
.ra-sub{font-size:11px;color:var(–text-muted);font-weight:400}
.ra-chip{display:inline-flex;align-items:center;gap:5px;font-size:11.5px;padding:4px 9px;border-radius:999px;border:1px solid var(–border);background:var(–surface-2);color:var(–text-secondary);line-height:1.2}
.ra-chip i{font-size:13px}
.ra-chip.red{background:var(–bg-danger);color:var(–text-danger);border-color:var(–border-danger)}
.ra-chip.amber{background:var(–bg-warning);color:var(–text-warning);border-color:var(–border-warning)}
.ra-chip.purple{background:var(–bg-pro);color:var(–text-pro);border-color:var(–border-pro)}
.ra-agent-wrap{position:relative;height:90px;display:flex;justify-content:center;margin-bottom:2px}
.ra-agent-svg{height:82px;transform-origin:50% 92%}
.ra-q{position:absolute;top:0;left:calc(50% + 22px);width:22px;height:22px;border-radius:50% 50% 50% 4px;background:var(–bg-warning);color:var(–text-warning);border:1px solid var(–border-warning);display:flex;align-items:center;justify-content:center;font-weight:600;font-size:13px;opacity:0;transform:scale(.6);transition:opacity .3s,transform .3s}
.ra-slot{position:relative;flex:1;min-height:238px}
.ra-mod{position:absolute;inset:0;opacity:0;transform:translateY(10px);transition:opacity .45s,transform .45s;pointer-events:none;display:flex;flex-direction:column;justify-content:center}
.ra-doc{background:var(–surface-2);border:1px solid var(–border);border-radius:10px;padding:8px 10px}
.ra-doc-flag{font-size:11px;color:var(–text-danger);font-weight:600;line-height:1.3;padding-bottom:6px;margin-bottom:6px;border-bottom:1px solid var(–border-danger)}
.ra-doc-h{font-size:11.5px;color:var(–text-secondary);display:flex;gap:6px;align-items:center;padding-bottom:6px;border-bottom:1px solid var(–border);margin-bottom:2px}
.ra-field{display:flex;justify-content:space-between;align-items:center;gap:10px;font-size:12px;padding:5px 0;border-bottom:1px solid var(–border)}
.ra-field:last-child{border-bottom:0}
.ra-fk{color:var(–text-muted)}
.ra-fv{color:var(–text-primary);font-weight:600;text-align:right}
.ra-fv.dang{color:var(–text-danger)}
.ra-fv.warn{color:var(–text-warning)}
.ra-fv.empty{color:var(–text-danger);display:inline-flex;align-items:center;gap:5px;background:var(–bg-danger);border:1px solid var(–border-danger);border-radius:6px;padding:2px 8px;font-weight:600}
.ra-note{font-size:10.5px;color:var(–text-muted);margin-top:6px;display:flex;gap:6px;align-items:flex-start;line-height:1.3}
.ra-mlabel{font-size:11.5px;color:var(–text-secondary);margin-bottom:5px}
.ra-scard{background:var(–surface-2);border:1px solid var(–border);border-radius:10px;padding:7px 9px;margin-bottom:6px}
.ra-scard-h{font-size:11px;color:var(–text-secondary);display:flex;gap:6px;align-items:center;margin-bottom:5px}
.ra-query{font-family:var(–ra-mono);font-size:10.5px;background:var(–surface-1);border:1px solid var(–border);border-radius:6px;padding:4px 7px;color:var(–text-secondary);margin-bottom:5px;display:flex;align-items:center;gap:6px}
.ra-empty{font-size:11px;color:var(–text-danger);display:flex;gap:6px;align-items:center;background:var(–bg-danger);border:1px solid var(–border-danger);border-radius:6px;padding:5px 7px;line-height:1.25}
.ra-empty i{flex:none}
.ra-bullet{font-size:11px;color:var(–text-secondary);display:flex;gap:8px;align-items:center;padding:2px 0}
.ra-bullet::before{content:””;width:4px;height:4px;border-radius:50%;background:var(–text-muted);flex:none}
.ra-miss{margin-top:4px}
.ra-fork{display:flex;flex-direction:column;align-items:center}
.ra-fork-node{margin-bottom:8px}
.ra-branch{display:flex;gap:8px;width:100%}
.ra-bcard{flex:1;display:flex;flex-direction:column;align-items:center;gap:5px;background:var(–surface-2);border:1px solid var(–border);border-radius:10px;padding:8px 7px;text-align:center}
.ra-bcard .arw{font-size:13px;color:var(–text-muted)}
.ra-bsub{font-size:10.5px;color:var(–text-muted);line-height:1.25}
.ra-converge{margin-top:8px;font-size:11.5px;text-align:center;line-height:1.35;color:var(–text-secondary)}
.ra-converge b{font-weight:600;color:var(–text-danger)}
.ra-human-top{display:flex;gap:8px;align-items:flex-start;position:relative;min-height:96px;margin-bottom:8px}
.ra-human-svg{height:84px;flex:none;transform-origin:50% 92%}
.ra-tbub{position:absolute;border-radius:50%;background:var(–bg-accent);border:1px solid var(–border-accent);opacity:0;transition:opacity .4s}
.ra-tb1{width:7px;height:7px;left:68px;top:52px}
.ra-tb2{width:9px;height:9px;left:76px;top:38px}
.ra-cloud{flex:1;position:relative;background:var(–surface-2);border:1px solid var(–border-accent);border-radius:14px;padding:8px 10px;opacity:0;transform:translateY(8px);transition:opacity .5s,transform .5s}
.ra-cloud-h{font-size:11px;font-weight:600;color:var(–text-accent);display:flex;gap:6px;align-items:center;margin-bottom:4px}
.ra-quote{font-size:12px;color:var(–text-primary);line-height:1.32}
.ra-attr{font-size:10.5px;color:var(–text-muted);margin-top:4px}
.ra-puff{position:absolute;border-radius:50%;background:var(–surface-2);border:1px solid var(–border-accent)}
.ra-puff1{width:8px;height:8px;left:-4px;bottom:13px}
.ra-puff2{width:5px;height:5px;left:-9px;bottom:7px}
.ra-zoom{background:var(–surface-2);border:1px solid var(–border);border-radius:10px;padding:8px 10px;margin-bottom:8px;opacity:0;transform:translateY(8px);transition:opacity .5s,transform .5s}
.ra-chead{font-size:11px;color:var(–text-secondary);display:flex;gap:6px;align-items:center;margin-bottom:6px}
.ra-live{width:7px;height:7px;border-radius:50%;background:var(–fill-danger);margin-left:auto}
.ra-wave{display:flex;align-items:flex-end;gap:3px;height:16px;margin-bottom:6px}
.ra-wave span{width:4px;height:100%;background:var(–text-accent);border-radius:2px;transform-origin:bottom;transform:scaleY(.28)}
.ra-cc{background:var(–surface-1);border:1px solid var(–border);border-radius:8px;padding:6px 8px;font-size:11.5px;color:var(–text-primary);line-height:1.35;display:flex;gap:7px;align-items:flex-start}
.ra-cc-badge{font-size:9.5px;font-weight:600;background:var(–bg-accent);color:var(–text-accent);border:1px solid var(–border-accent);border-radius:4px;padding:1px 5px;flex:none;margin-top:1px}
.ra-slack{font-family:’Lato’,var(–ra-font);background:#ffffff;border:1px solid #dddddd;border-radius:10px;overflow:hidden;opacity:0;transform:translateY(8px);transition:opacity .5s,transform .5s}
.ra-sl-head{padding:7px 12px;border-bottom:1px solid #ececec;display:flex;align-items:baseline;gap:7px}
.ra-sl-title{font-size:13px;font-weight:900;color:#1d1c1d;letter-spacing:-.2px}
.ra-sl-sub{font-size:11.5px;color:#616061;font-weight:700}
.ra-sl-list{padding:3px 0}
.ra-sl-msg{display:flex;gap:7px;padding:4px 12px;align-items:flex-start}
.ra-sl-av{width:26px;height:26px;border-radius:7px;flex:none;display:flex;align-items:center;justify-content:center;color:#fff;font-weight:700;font-size:11px;position:relative;line-height:1}
.ra-sl-pres{position:absolute;right:-2px;bottom:-2px;width:9px;height:9px;border-radius:50%;background:#2bac76;border:2px solid #fff}
.ra-sl-body{min-width:0}
.ra-sl-meta{display:flex;align-items:baseline;gap:7px;margin-bottom:0;flex-wrap:wrap}
.ra-sl-name{font-size:13px;font-weight:900;color:#1d1c1d;letter-spacing:-.2px}
.ra-sl-time{font-size:11px;color:#616061;font-weight:400}
.ra-sl-text{font-size:12.5px;color:#1d1c1d;line-height:1.34}
.ra-sl-div{display:flex;align-items:center;gap:9px;padding:2px 12px 5px}
.ra-sl-div-label{font-size:11.5px;font-weight:700;color:#616061;flex:none}
.ra-sl-div::after{content:””;height:1px;background:#e2e2e2;flex:1}
.ra-sl-compose{margin:2px 12px 9px;border:1px solid #b7b9bd;border-radius:16px;display:flex;align-items:center;gap:6px;padding:5px 6px 5px 12px}
.ra-sl-compose-in{flex:1;color:#8d8d8d;font-size:12.5px}
.ra-sl-send{width:20px;height:20px;border-radius:4px;background:#f4f4f4;display:flex;align-items:center;justify-content:center;color:#9a9a9a;font-size:12px;flex:none}
.ra-caption{margin-top:14px;min-height:48px;font-size:13.5px;line-height:1.5;color:var(–text-primary)}
.ra-progress{height:3px;background:var(–border);border-radius:2px;margin-top:10px;overflow:hidden}
.ra-pbar{height:100%;width:0;background:var(–text-accent);border-radius:2px}
.ra-controls{display:flex;align-items:center;gap:12px;margin-top:12px}
.ra-btn{width:32px;height:32px;border-radius:8px;border:1px solid var(–border-strong);background:transparent;color:var(–text-secondary);display:flex;align-items:center;justify-content:center;cursor:pointer;font-size:16px}
.ra-btn:hover{background:var(–surface-1)}
.ra-dots{display:flex;gap:8px;flex:1;flex-wrap:wrap}
.ra-dot{width:9px;height:9px;border-radius:50%;border:1px solid var(–border-strong);background:transparent;cursor:pointer;padding:0;transition:transform .2s}
.ra-dot[aria-current=”true”]{background:var(–text-accent);border-color:var(–text-accent);transform:scale(1.2)}
.ra-num{font-size:11px;color:var(–text-muted);min-width:66px;text-align:right}
.ra-spot-left .ra-r{opacity:.42}
.ra-spot-right .ra-l{opacity:.5}
.ra-h-mem .ra-cloud{opacity:1;transform:none}
.ra-h-mem .ra-tbub{opacity:1}
.ra-h-comms .ra-zoom{opacity:1;transform:none;transition-delay:.05s}
.ra-h-comms .ra-slack{opacity:1;transform:none;transition-delay:.35s}
.ra-a-crm .ra-m-crm{opacity:1;transform:none;pointer-events:auto}
.ra-a-search .ra-m-search{opacity:1;transform:none;pointer-events:auto}
.ra-a-fork .ra-m-fork{opacity:1;transform:none;pointer-events:auto}
.ra-a-crm .ra-q,.ra-a-search .ra-q{opacity:1;transform:none}
@media (prefers-reduced-motion: no-preference){
@keyframes ra-bob{0%,100%{transform:translateY(0)}50%{transform:translateY(-4px)}}
@keyframes ra-wob{0%,100%{transform:rotate(0)}25%{transform:rotate(-4deg)}75%{transform:rotate(4deg)}}
@keyframes ra-wv{0%,100%{transform:scaleY(.28)}50%{transform:scaleY(1)}}
@keyframes ra-pls{0%,100%{opacity:1}50%{opacity:.4}}
@keyframes ra-qb{0%,100%{transform:translateY(0) rotate(-3deg)}50%{transform:translateY(-3px) rotate(3deg)}}
.ra-agent-svg{animation:ra-bob 4s ease-in-out infinite}
.ra-human-svg{animation:ra-bob 4.6s ease-in-out infinite}
.ra-a-crm .ra-agent-svg,.ra-a-search .ra-agent-svg,.ra-a-fork .ra-agent-svg{animation:ra-wob 2.6s ease-in-out infinite}
.ra-wave span{animation:ra-wv 1s ease-in-out infinite}
.ra-wave span:nth-child(2){animation-duration:.8s}
.ra-wave span:nth-child(3){animation-duration:1.2s}
.ra-wave span:nth-child(4){animation-duration:.7s}
.ra-wave span:nth-child(5){animation-duration:1.1s}
.ra-wave span:nth-child(6){animation-duration:.9s}
.ra-wave span:nth-child(7){animation-duration:1.3s}
.ra-live{animation:ra-pls 2s ease-in-out infinite}
.ra-a-crm .ra-q,.ra-a-search .ra-q{animation:ra-qb 1.8s ease-in-out infinite}
}

TimingLast week of Q4
AccountGlobex ($300k)
Customer20% off or they walk
Policy cap10% maximum

Your agent · reads only what’s retained

?

The agent found a different account, Globex, that was given 20% off but does not understand why.
Salesforce · Globex renewal
StageRenewal
Discount on record20%
Policy cap10%
Exception rationaleempty

The record has the number — 20% — but nothing that says why it would be allowed.

The agent goes looking for the why.

Slack search
in:#renewals Globex discount
0 results — thread is older than the 90-day retention window

Call · AI summary
Pricing and renewal terms discussed
Follow-up scheduled for next week
the line about it being “worth the risk” was never captured

The agent must choose

Wait for a human

context in ~24 hours
deal stalls in the last week of Q4

Email: accept at 10%

Globex churns
the F500 logo walks

Either way → the AI agent’s value goes unrealized

A human · reasons from memory + live context

What the rep remembers
“Retain Globex no matter what — they’re Fortune 500.”
— the CEO, at the last all-hands

Live renewal call

CC”Accounts this big are worth the risk — and they usually pay.”

Thread
# renewals

MC

Maya Chen10:42 AM
Globex renewal is up for review — they want 20% off or they’ll walk.

3 replies

DR

Devang Rao10:44 AM
$300k account, and we’ve got a great relationship with their VP — our champion there.

PN

Priya Nair10:45 AM
They’re a Fortune 500 logo. Let’s give them a chance on the discount.

SO

Sam Okafor10:47 AM
Agreed — approve above the cap. I’ll square it with Finance.

Reply…

(function(){
var root=document.currentScript?document.currentScript.closest(‘.ra-widget-root’):null;
if(!root)root=document.querySelector(‘.ra-widget-root’);
var stage=root.querySelector(‘.ra-stage’);
var cap=root.querySelector(‘.ra-caption’);
var dotsWrap=root.querySelector(‘.ra-dots’);
var pp=root.querySelector(‘.ra-pp’);
var replay=root.querySelector(‘.ra-replay’);
var bar=root.querySelector(‘.ra-pbar’);
var num=root.querySelector(‘.ra-num’);
var acts=[
{c:’ra-spot-both’,t:`It’s the last week of Q4. Globex u2014 a Fortune 500 account worth $300k u2014 wants 20% off or they walk. Policy caps discounts at 10%.`},
{c:’ra-spot-right ra-h-mem’,t:`The rep doesn’t open the policy doc. They remember the CEO saying Globex gets retained no matter what u2014 it’s Fortune 500.`},
{c:’ra-spot-right ra-h-mem ra-h-comms’,t:`The live call and the Slack thread back it up: strong rapport with the champion, and accounts this size are worth the risk u2014 they usually pay.`},
{c:’ra-spot-left ra-h-mem ra-h-comms ra-a-crm’,t:`The agent pulls the Salesforce record. It shows a 20% discount against the 10% cap u2014 but no field says why an exception would be justified.`},
{c:’ra-spot-left ra-h-mem ra-h-comms ra-a-search’,t:`So it searches for the why. The Slack thread has rolled past the 90-day retention window, and the call’s AI summary never captured the rationale.`},
{c:’ra-spot-left ra-h-mem ra-h-comms ra-a-fork’,t:`That leaves two moves: wait about 24 hours for a human to rebuild the context, or email an offer at 10% u2014 which loses Globex.`},
{c:’ra-spot-both ra-h-mem ra-h-comms ra-a-fork ra-phase-end’,t:`The rep decided in minutes from memory and live context. The agent can only act on what’s written down and still retained u2014 so its value goes unrealized.`}
];
var dur=[5200,6800,6800,6800,7000,6600,7600];
var cur=0,playing=true,timer=null;
for(var i=0;i

-1){ step–; render(step); } });
next.addEventListener(‘click’,function(){ if(step