Skip to content

Instantly share code, notes, and snippets.

View johnymontana's full-sized avatar
🤠
I'm very normal

William Lyon johnymontana

🤠
I'm very normal
View GitHub Profile
@johnymontana
johnymontana / nams_tour_blog.md
Created May 29, 2026 23:01
NAMS Tour Blog Post

A Tour of the Neo4j Agent Memory Service (NAMS)

We've been quietly building a graph-native memory layer for AI agents, and it's now far enough along to show. This is a walkthrough of the NAMS console — tab by tab — so you can see exactly what an agent's memory looks like when it lives in a graph.


Most agents you build today are amnesiacs. They run a chain of reasoning, return an answer, and forget the whole thing the moment the request ends. The usual patch — stuff transcripts into the context window, bolt on a vector store, write glue code to decide what to retrieve — works until the conversation gets long, the facts start to contradict each other, and you realize your "memory" is just a pile of text chunks ranked by cosine similarity.

The Neo4j Agent Memory Service (NAMS) is our take on a better foundation: persistent, structured memory for LLM agents, delivered as a managed cloud service. You call a REST API or connect an MCP client; NAMS handles storage, entity extraction, deduplication, e

Introducing Create Context Graph: AI Agents With Graph Memory, Scaffolded In Seconds

A new Neo4j Labs CLI that turns four commands into a full‑stack agent app — with a knowledge graph, decision traces, streaming chat, and a graph visualization built in.


📸 [HERO IMAGE PLACEHOLDER] Screenshot of the create-context-graph.dev landing page hero, or a side-by-side of the terminal running uvx create-context-graph next to the running web app showing chat + graph viz. Capture from https://create-context-graph.dev/.


@johnymontana
johnymontana / main.py
Created March 11, 2026 23:46
LangFlow Custom Component for Neo4j Agent Memory Integration
"""
neo4j-agent-memory + LangFlow Integration
==========================================
Demonstrates Reasoning Memory: every tool call the agent makes is stored
as a graph node in Neo4j, giving you a full, queryable audit trail.
SETUP
-----
pip install neo4j-agent-memory langchain langchain-ollama langflow neo4j
@johnymontana
johnymontana / 0_import.cypher
Last active April 12, 2023 15:33
NICAR 2023 Neo4j Workshop
CREATE CONSTRAINT IF NOT EXISTS FOR (n:Parcel) REQUIRE n.neo4jImportId IS UNIQUE;
CREATE CONSTRAINT IF NOT EXISTS FOR (n:Subject) REQUIRE n.neo4jImportId IS UNIQUE;
CREATE CONSTRAINT IF NOT EXISTS FOR (n:Bill) REQUIRE n.neo4jImportId IS UNIQUE;
CREATE CONSTRAINT IF NOT EXISTS FOR (n:Committee) REQUIRE n.neo4jImportId IS UNIQUE;
CREATE CONSTRAINT IF NOT EXISTS FOR (n:Legislator) REQUIRE n.neo4jImportId IS UNIQUE;
CREATE CONSTRAINT IF NOT EXISTS FOR (n:Trip) REQUIRE n.neo4jImportId IS UNIQUE;
CREATE CONSTRAINT IF NOT EXISTS FOR (n:Organization) REQUIRE n.neo4jImportId IS UNIQUE;
CREATE CONSTRAINT IF NOT EXISTS FOR (n:Destination) REQUIRE n.neo4jImportId IS UNIQUE;
CALL apoc.import.json("https://cdn.neo4jlabs.com/data/landgraph/landgraph.json");
@johnymontana
johnymontana / cla.json
Last active August 14, 2019 16:45
CLA contributors
[
"lyonwj",
"johnymontana"
]
type Movie {
_id: Long!
countries: [String]
imdbId: String!
imdbRating: Float
imdbVotes: Int
languages: [String]
movieId: String!
plot: String
poster: String
type Legislator {
bioguideID: String!
birthday: String!
currentParty: String!
district: String
fecIDs: String!
firstName: String!
gender: String!
govtrackID: String!
lastName: String!
import { makeAugmentedSchema, inferSchema } from 'neo4j-graphql-js';
import { ApolloServer } from 'apollo-server';
import { v1 as neo4j } from 'neo4j-driver';
// Create Neo4j driver instance
const driver = neo4j.driver(
process.env.NEO4J_URI || 'bolt://localhost:7687',
neo4j.auth.basic(
process.env.NEO4J_USER || 'neo4j',
process.env.NEO4J_PASSWORD || 'letmein'
@johnymontana
johnymontana / AttendeeGraph.js
Created April 10, 2019 15:30
El Grapho Experiments
import React from "react";
import { Component } from "react";
import { withStyles } from "@material-ui/core/styles";
import neo4j from "neo4j-driver/lib/browser/neo4j-web";
import ElGrapho from "elgrapho";
const styles = theme => ({
});
CREATE CONSTRAINT ON (c:Company) ASSERT c.companyNumber IS UNIQUE;
CREATE CONSTRAINT ON (p:Person) ASSERT (p.birthMonth, p.birthYear, p.name ) IS NODE KEY;
CREATE CONSTRAINT ON (p:Property) ASSERT p.titleNumber IS UNIQUE;
LOAD CSV WITH HEADERS FROM "file:///data/PSCAmericans.csv" AS row
MERGE (c:Company {companyNumber: row.company_number})
MERGE (p:Person {name: row.`data.name`, birthYear: row.`data.date_of_birth.year`, birthMonth: row.`data.date_of_birth.month`})
ON CREATE SET p.nationality = row.`data.nationality`,
p.countryOfResidence = row.`data.country_of_residence`
// TODO: Address