Skip to content

// blog › aws

AWS · AI

Neptune Graph Sessions: a graph per agent that scales to zero

On this page
  1. The problem: agent memory is bursty, and graphs were priced for steady work
  2. What Neptune Graph Sessions are
  3. Capacity and cost, as AWS states them
  4. Designing it: one graph per user, and a directory
  5. How to draw it
  6. When to use it, and when not
key takeaways
  • A graph session is a Neptune Analytics graph whose compute runs only while it is working. Data and vector indexes are kept while it is stopped.
  • You pick a starting size of 4 or 8 s-NCU. One s-NCU is 1 GiB of memory and 0.25 vCPU, and compute is billed per second while the session runs.
  • On a diagram, memory stops being one shared database. It becomes a set of small graphs, one per user or agent, plus something that knows which graph belongs to whom.
  • The first query after an idle spell waits for the session to start. Plan timeouts and retries for that wait.
  • Default quotas are 25 sessions and 10 running at once per Region, both adjustable. Check them against your user count.

Amazon Neptune Graph Sessions are small Neptune Analytics graphs meant to be handed to one agent, one user or one task. Each one stops after 15 minutes without traffic, costs only storage while it is stopped, and starts again in under 20 seconds when the next query arrives. It was one of the launches in {{link:post:aws-agent-plumbing-before-reinvent-2026}}, the week before re:Invent 2026. This post covers what it is, why a graph suits agent memory, and how to draw it.

diagramNeptune Graph Sessions as per-user agent memoryOpen this diagram in archhyOpens in a new tab in the editor, ready to change. No account needed.See it in the diagram library →

The problem: agent memory is bursty, and graphs were priced for steady work

Agent memory is used in bursts. A user talks to an assistant for ten minutes, then not again until tomorrow. In between, the memory does nothing.

A graph is a natural shape for that memory. People, projects, decisions and documents are entities, and the useful part is how they connect. AWS's Neptune page describes graphs as long-term memory for agentic AI applications. But a provisioned Neptune Analytics graph starts at 16 m-NCU and its compute is billed for as long as it runs. Giving every user their own provisioned graph means paying for a lot of idle compute. Sharing one big graph means isolating users inside it yourself.

What Neptune Graph Sessions are

A graph session is not a new database. It is a graph type in Neptune Analytics, chosen with the computeConfiguration parameter when you create a graph (graphSession rather than provisionedGraph). Same engine, APIs and IAM permissions; you query it with openCypher.

A session is Running or Stopped, and moves between the two on its own:

  • Running: it serves queries; you pay compute and storage.
  • Stopped: after 15 minutes with no traffic it stops on its own. There is no compute charge, only storage for the data it keeps.
  • Starting: a query to a stopped session starts it again in under 20 seconds, with the graph, vector indexes and configuration as they were.

Creating a session takes about 30 seconds, and creating, starting and stopping cost nothing.

Capacity and cost, as AWS states them

You choose a starting size of 4 or 8 s-NCU with the minMemory parameter. The starting size is also the least you are billed for while the session runs. Memory can grow to about twice that, and the charge follows the memory used. CPU can burst to about twice the starting vCPU at no extra charge: 1 to 2 vCPU for 4 s-NCU, 2 to 4 vCPU for 8 s-NCU.

At the burst limit the session is throttled. To grow, move it to 8 s-NCU or convert it to a provisioned graph with UpdateGraph.

Storage is billed per GB-month while the session is running or stopped, with a 1 GB minimum per session. Database Savings Plans apply to session compute. AWS does not list per-unit prices in the announcement; check the Neptune pricing page for your Region.

Throughput is about 40 requests per second and up to 150 concurrent connections at 4 vCPU, the most an 8 s-NCU session reaches. Sessions are in ten Regions at the time of writing; the Neptune Analytics limits page lists them.

Designing it: one graph per user, and a directory

The pattern in the diagram gives each user their own graph session. The agent changes little; what changes is everything around its memory.

  1. A directory. Something has to know which graph belongs to which user. A small table, here DynamoDB, maps a user to a graph id. This is our choice, not something AWS prescribes.
  2. A session manager. When a new user arrives, a function calls CreateGraph with the session configuration and records the graph id. It also deletes sessions for users who have left, the only way to end storage charges.
  3. The agent reads and writes its user's graph. Before calling the model, it queries the relevant entities and relationships, plus vector search if the graph has an index. Afterwards it writes back what it learnt.
  4. Optional seed data. Batch load can fill a session from files in Amazon S3. Import tasks and export tasks are for provisioned graphs; AWS says session support for export is coming soon.

Two details decide whether this works in practice:

  • The first query waits. A stopped session takes under 20 seconds to start, and Neptune Analytics rejects queries that an AWS SDK retries automatically after a connection timeout. AWS's advice is to allow at least 20 seconds in your client timeout, retry in your own code, or send a light query first to wake the session.
  • The agent needs permission to wake it. Automatic start only happens if the caller has neptune-graph:StartGraph as well as the query permissions, and the account is within the Max Active Graph Sessions quota.

How to draw it

  • Draw the memory as a group of graph cards inside a boundary labelled "one graph per user", not a single database box. Mark at least one as stopped, because that is their normal state.
  • Label the arrow from the agent to a stopped graph with its real behaviour: the first query starts it, in under 20 seconds.
  • Add the directory and the session manager. They hold the lifecycle: create, look up, delete.
  • Put CloudWatch beside the graphs: sessions send metrics only while running, so a quiet dashboard may mean a stopped graph.

When to use it, and when not

AWS names the fits: agentic workloads, per-tenant graphs, short-lived analytics over data loaded from S3, unpredictable load, and development and testing. The common thread is intermittent use.

Choose a provisioned graph instead when the graph runs most of the day, needs more memory than an 8 s-NCU session can give, or cannot wait for compute to start before a query. AWS is direct about this: a session that runs nearly all the time can cost more than a small provisioned graph. Sessions do not support replicas or snapshots, and CloudFormation support is listed as coming soon.

Check the quotas against your user count too. With a default of 25 sessions per Region, one graph per user suits a small product until you request an increase.

Frequently asked questions

What are Amazon Neptune Graph Sessions?

A graph type in Neptune Analytics whose compute runs only while it is working. A session stops after 15 minutes with no traffic, keeps its data, and starts again in under 20 seconds when a query arrives. You query it with openCypher.

How big can a graph session be?

You choose a starting size of 4 or 8 s-NCU, where one s-NCU is 1 GiB of memory and 0.25 vCPU. Memory can grow to about twice the starting size. For more, AWS says to convert the session to a provisioned graph with UpdateGraph.

Do I pay anything while a session is stopped?

Only storage for the data it keeps, billed per GB-month with a 1 GB minimum per session. Compute is billed per second only while it runs. Deleting the session ends both charges.

Why did my first query after a break time out?

The first query to a stopped session waits for it to start, which takes under 20 seconds, and Neptune Analytics rejects automatic SDK retries after a connection timeout. Allow at least 20 seconds, retry in your own code, or send a light query first.

Is Graph Sessions the same as Neptune Serverless?

No. Neptune Serverless is a capacity setting for Neptune Database, the transactional graph database. Graph Sessions is a graph type in Neptune Analytics.

based on The AWS What's New announcement of Neptune Graph Sessions (27 November 2026), the Neptune Analytics User Guide's pages on graph sessions, and the Amazon Neptune pricing and product pages.