Make Your AI Agents Predictable With Graph Engineering

Zach Blumenfeld, Neo4j20:36 · Nov 2026 · 7,047 views
Thumbnail for Make Your AI Agents Predictable With Graph Engineering Watch on YouTube
TL;DR
  1. 1

    Graph engineering defines agent work as an explicit graph whose nodes perform work and whose edges route state.

  2. 2

    Context graphs and procedural graphs let teams store decision traces, compile skills, and move agent logic between runtimes.

  3. 3

    Compiling loan-approval procedures into execution scripts made the demo faster, cheaper, and more consistent than leaving routing to the agent.

Summary

Zachary Blumenfeld describes graph engineering as designing agent work as an explicit graph. Execution graphs route work at runtime, context graphs store conversations, entities, decisions, and other traces, and procedural graphs encode the steps of a skill. He focuses on context and procedural graphs because they can sit in a knowledge layer beside data and move between agent runtimes. At Neo4j, this layer connects systems such as Databricks, BigQuery, Snowflake, and documentation with graph-based agent memory. Blumenfeld shows how written skills and past decision traces can be compiled into graph-shaped skills with scripts, assets, policy documentation, and explicit routing. His loan-approval demo applies hard policy rules, a decision model, human escalation, report writing, and report checks. Persisted runs let teams inspect branches, approvals, denials, and failures. In his demo, moving routing into procedures reduced runtime and allowed use of a simpler model, though he presents the results as a demonstration rather than formal research.

Key ideas
00:01

Graph engineering makes agent work explicit

Blumenfeld defines graph engineering as designing agent work as an explicit graph. Nodes do work, while edges route state between them. He separates three forms: execution graphs with routers and agents, context graphs containing decision traces and links to domain data, and procedural graphs that describe how a task should be performed. A procedural graph can include tool calls, decision models, agent steps, escalation, and validation. His focus is on context and procedural graphs because they can express the logic around an agent without tying it to one runtime.

03:00

Graphs constrain agent paths and make decisions auditable

Blumenfeld gives predictability, governance, and portability as the practical benefits of graph engineering. A graph can constrain the path an agent takes and help keep its answer accurate for the task. It also lets a team control, guide, and audit the agent's work. He describes portability as storing the graph outside the runtime, then moving it between different runtimes through a knowledge layer. This layer can connect systems of record and documentation to standard protocols and artifacts that different agents can use.

04:22

A knowledge layer connects data sources to agent runtimes

Neo4j's proposed knowledge layer sits between systems such as Databricks, BigQuery, and Snowflake, along with documentation and Markdown files in tools such as Obsidian. Blumenfeld describes the Neo4j database and analytics layer underneath additional AI and memory tooling. Data from multiple sources is loaded into the database, while the surrounding graph AI tools load data in and out. The goal is to keep graph-based knowledge and agent logic available to different runtimes.

05:55

Context graphs combine conversation memory with decisions

The context graph Blumenfeld describes includes short-term memory such as conversation history, long-term memory made from extracted entities and source data, and reasoning or decision traces. These traces preserve how a result was reached. A graph can connect a compiled skill back to past decisions and related data. Blumenfeld says this provides provenance for each step, with versioning, tracking, and governance that can help teams assess drift and understand where tool calls came from.

06:34

Written skills can be compiled into graph-shaped procedures

Blumenfeld describes a process for taking a written skill, often an SKILL.md file with scripts, references, and assets, and turning it into a graph. The graph contains nodes for decisions, routing points, and scripts that must run. Prose instructions can be turned into more deterministic scripts, then the agent can be made to follow the resulting graph. He says this approach improved task reward and performance in earlier work across difficult tasks in fields including physics, computer science, and security, while noting that he is updating that work for newer models.

08:08

Past decision traces can produce portable skills

The same approach can start with a context graph rather than a written skill. Past decisions and memory traces can be distilled into a skill that remains connected to the original data and decisions. Blumenfeld describes the resulting artifact as portable because an agent harness that can accept the skill can run the graph logic. In the Neo4j agent memory service, people can inspect, edit, and change the graph. This gives the procedure a history instead of leaving it as isolated prompt text.

10:47

The loan demo moves policy routing out of the agent

The demo uses a loan-approval process for Rosa's Bakery. The graph combines an uploaded business-plan PDF with data from Databricks, past transactions, lending policies, and previous decisions. The initial agent can resolve related data, follow policies, and produce an audit trail, but repeated runs can take different paths. Blumenfeld compiles successful runs into a graph-shaped skill in YAML, with scripts, assets, policy documentation, and instructions. A CLI then runs the procedure programmatically instead of asking the agent to choose every routing step.

17:30

Persisted runs expose branches and support governance

The compiled loan procedure checks hard policy rules, routes unresolved cases to a decision model such as Jév or TypeSafe, writes a report, and can send a case to human review. A later check and lint step reviews the report. Each run can be persisted in the graph with its individual steps. Blumenfeld's inspector shows statuses, approvals, denials, and the branches taken. Because the branches are stored beside the data, teams can also query which branches were taken or never taken.

19:09

Procedures reduce routing work and allow smaller models

Blumenfeld compares running the loan task directly on the graph with running it through the compiled procedure. He says the direct run with Fable took about 2.7 minutes and was correct nearly every time. Using the procedure nearly cut the time in half, and using Haiku after moving routing into execution scripts reduced model time further. He also describes a wall-clock comparison of about two minutes against about seven and a half minutes, while stressing that this was a demo rather than a formal research proposal.

"All we're doing here is basically giving it a CLI to run this programmatic skill that we compiled from documentation or in this case from our memory graph."18:45
Who should watch
  • You are building agents that must follow policies or repeat a controlled process across different runtimes.
  • Your agent's reasoning traces, tool calls, and branch choices are hard to inspect after a run.
  • You want to turn existing skills or past decisions into procedures that can use smaller models and reduce runtime work.