# US 2026/0310991 A1 · Memory for computer-based agents including knowledge graph-based long-term memory storage

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2026/0310991 A1
- Document ID: US20260310991A1
- Status: Published application
- Kind: A1
- Application number: 19/255,565
- Filed: 2025-06-30
- Published: 2026-10-08
- Earliest claimed: 2025-04-03
- Assignees: Palantir Technologies Inc.
- Applicants: Palantir Technologies Inc.
- Inventors: Mazin Abdulmahmood; Palvinder Sander
- Web page: https://patentgrep.com/patent/US20260310991A1

## CPC

- G06N 5/022: Knowledge engineering; Knowledge acquisition
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS

## Abstract

Computer-implemented methods and systems including an agent service and a long-term memory store service that communicates with a long-term memory store comprising a knowledge graph, and that services long-term memory storage and retrieval requests from the agent service. Long-term memory retrieval requests include a query and memory types, and are serviced through determining a resulting set of nodes from the knowledge graph and aggregating associated memory content. Long-term memory storage requests include memory content and memory types, and are serviced through determining related nodes and relationships, and adding a new node with the memory content and new edges to the related nodes based on the determined relationships.

## Claims

### Claim 1

A computer-implemented method, performed by one or more hardware computer processors executing program instructions, comprising:
receiving, by a long-term memory store service, and from an agent, a long-term memory storage request, wherein the long-term memory storage request includes at least: memory content, and indications of one or more memory types; and
executing, by the long-term memory store service, the long-term memory storage request, wherein executing the long-term memory storage request includes:
extracting, from the memory content, one or more entities;
accessing a knowledge graph, wherein the knowledge graph comprises nodes storing memory content, and wherein the knowledge graph further comprises edges connecting related nodes and storing relationships among the memory content associated with the related nodes;
determining a candidate set of nodes from the knowledge graph based on the one or more memory types and the one or more entities;
determining, from the candidate set of nodes:
any related nodes having a relationship with the memory content; and
relationships between the memory content and the respective related nodes; and
adding, to the knowledge graph:
a new node storing the memory content; and
for any determined relationships, new edges connecting the new node with the respective related nodes, wherein the new edges store the respective determined relationships.

### Claim 2 (depends on 1)

The computer-implemented method of claim 1, wherein extracting the one or more entities includes:
prompting a large language model (“LLM”) with the memory content and requesting a listing of the one or more entities.

### Claim 3 (depends on 2)

The computer-implemented method of claim 2, wherein:
the long-term memory storage request further includes: one or more tags; and
executing the long-term memory storage request includes:
adding, to the knowledge graph:
the one or more tags associated with the new node.

### Claim 4 (depends on 3)

The computer-implemented method of claim 3, wherein determining the candidate set of nodes is further based on the one or more tags.

### Claim 5 (depends on 4)

The computer-implemented method of claim 4, wherein determining related nodes is based at least in part on the one or more tags.

### Claim 6 (depends on 5)

The computer-implemented method of claim 5, wherein executing the long-term memory storage request includes:
extracting, from the memory content, one or more extracted tags; and
adding, to the knowledge graph:
the one or more extracted tags associated with the new node.

### Claim 7 (depends on 6)

The computer-implemented method of claim 6, wherein determining the candidate set of nodes is further based on the one or more extracted tags.

### Claim 8 (depends on 7)

The computer-implemented method of claim 7, wherein determining related nodes is based at least in part on the one or more extracted tags.

### Claim 9 (depends on 8)

The computer-implemented method of claim 8, wherein:
the long-term memory storage request further includes: an importance indicator; and
executing the long-term memory storage request includes:
adding, to the knowledge graph:
the importance indicator associated with the new node.

### Claim 10 (depends on 9)

The computer-implemented method of claim 9, wherein a relationship of the relationships includes at least one of: implements, extends, requires, or defines.

### Claim 11 (depends on 10)

The computer-implemented method of claim 10, wherein determining any related nodes and relationships includes:
prompting a large language model (“LLM”) with the memory content and memory contents of the nodes of the candidate set of nodes, and requesting a listing of the related nodes and the relationships between the memory content and the respective related nodes.

### Claim 12 (depends on 11)

The computer-implemented method of claim 11, wherein determining the candidate set of nodes from the knowledge graph includes:
determining a filtered set of nodes from the knowledge graph based on the one or more memory types;
determining a selected set of nodes from the filtered set of nodes based on the memory content;
determining a resulting set of nodes based on the selected set of nodes and relationships of nodes of the selected set of nodes with other nodes of the knowledge graph; and
designating the resulting set of nodes as the candidate set of nodes.

### Claim 13 (depends on 12)

The computer-implemented method of claim 12, wherein the candidate set of nodes is limited to a particular quantity of nodes.

### Claim 14 (depends on 13)

The computer-implemented method of claim 13 further comprising:
compacting the knowledge graph.

### Claim 15 (depends on 14)

The computer-implemented method of claim 14, wherein compacting the knowledge graph includes:
clustering the nodes of the knowledge graph based on at least one of: memory content of the nodes, vectors or embeddings representative of memory content of the nodes, memory types of the nodes, tags of the nodes, or edge/relationships connects to the nodes;
replacing the clusters of the nodes with respective new nodes representative of the respective clusters and storing memory content based on the memory content of the nodes of the respective clusters;
de-duplicating based on prompting a large language model (“LLM”) with memory content or other information associated with the nodes of the knowledge graph; and
de-duplicating based on user input or user feedback.

### Claim 16 (depends on 15)

The computer-implemented method of claim 15 further comprising:
generating, by the agent, the long-term memory storage request, wherein generating the long-term memory storage request includes:
generating a prompt for a large language model (“LLM”) including at least: a portion of a short-term memory generated at least in part by performance of a computational task by the agent, and a request to generate the long-term memory storage request including at least the memory content and the indications of one or more memory types;
providing the prompt to the LLM; and
receiving a response from the LLM that is responsive to the prompt, wherein the response includes the long-term memory storage request.

### Claim 17 (depends on 15)

The computer-implemented method of claim 15 further comprising:
providing, by the long-term memory store service, an indication that the long-term memory storage request is complete; and
receiving, by the agent, the indication that the long-term memory storage request is complete.

### Claim 18 (depends on 17)

The computer-implemented method of claim 17, wherein the long-term memory store service provides long-term memory storage and retrieval services for a plurality of agents and enables cross-agent sharing of long-term memory.

### Claim 19 (depends on 1)

A system comprising:
one or more computer-readable storage mediums configured to store program instructions; and
one or more processors configured to execute the program instructions to cause the system to perform the computer-implemented method of claim 1.

### Claim 20 (depends on 1)

One or more computer-readable storage mediums configured to store program instructions, the program instructions executable by one or more processors to cause the one or more processors to perform the computer-implemented method of claim 1.
