Skip to content
Ahura OS
Get $10 free
All services
Remember

Ahura Memory

Fast working memory for agents.

A key/value store built for the hot path. Agents read and write small pieces of state in a single call, with an expiry on every key so memory never piles up unnoticed.

What it does

  • Instant reads and writes

    Single-key operations designed for the loop an agent runs on every step.

  • Expiry built in

    Set a time-to-live per key. Short-term scratch space cleans itself up.

  • Atomic counters

    Increment and compare-and-set so several agents can share state safely.

  • Scoped to a partition

    Memory belongs to a partition, so it is isolated, metered and freezable with everything else.

An agent calls it like this

{ "tool": "memory.set", "key": "alpha/plan", "value": { "step": 3 }, "ttl": 3600 }

Interactive simulation

Try Ahura Memory

Press Run to send the call. The dashboard shows what it would use in a partition. Simulated: nothing is actually executed.

ahura mcp · ptn_demo_7f3a

# Save the plan with an hour to live.

→ POST /mcp

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "memory.set",
    "arguments": {
      "key": "alpha/plan",
      "value": {
        "step": 3,
        "goal": "summarise Q3"
      },
      "ttl": 3600
    }
  }
}

# Count a call atomically.

→ POST /mcp

{
  "jsonrpc": "2.0",
  "id": 2,
  "method": "tools/call",
  "params": {
    "name": "memory.incr",
    "arguments": {
      "key": "alpha/tool_calls",
      "by": 1
    }
  }
}

# Read it back on the next turn.

→ POST /mcp

{
  "jsonrpc": "2.0",
  "id": 3,
  "method": "tools/call",
  "params": {
    "name": "memory.get",
    "arguments": {
      "key": "alpha/plan"
    }
  }
}

Ready. Press Run.

ptn_demo_7f3a

Partition · N. Virginia · created just now

Simulated
Activeus-eastRetention hold
Run time
0.0s
0 calls
Size
2.3MB
0.00 ACU used

Services in this partition

  • Memory

    0 calls · 0.00 ACU

Spend by service

Ledger

  • No usage yet.

Why it matters

Where Ahura Memory beats a self-run cache.

Agents need somewhere quick to put what they are thinking. Running that yourself means a server, a security review and a bill before the first key is stored.

A cache or database you run

  • Provision, size and patch an instance, then keep it running for every agent whether or not it is busy.
  • Build your own expiry, locking and counter logic, and test it under concurrency.
  • One shared store, so one careless agent can read or clobber another’s keys.
  • A fixed monthly cost that is highest exactly when you are doing the least.

Ahura Memory

  • Nothing to provision. The first call creates the key.
  • Expiry, compare-and-set, create-if-absent and atomic counters are built in and already proven under concurrency.
  • Every key lives in one agent’s partition and cannot be seen from another.
  • Pay per call. An idle partition costs almost nothing.
  • Setup

    Minutes, with no infrastructure.

  • Speed

    Single-digit-millisecond key operations on the hot path.

  • Safety

    Partition isolation and atomic operations by default.

  • Cost

    Billed per call, not per server-month.

Memory is for small, hot state. Use Ahura Store for large files and Ahura NoSQL when you need to query records by field.

In depth

What Ahura Memory can do.

  • Strongly consistent by default

    A read always returns the latest write. Nothing to reason about except your own logic.

  • Compare-and-set

    Every key carries a version. Write only if the version still matches, so two agents never silently overwrite each other.

  • Create-if-absent

    Claim a key only if nobody else has. The building block for locks, leader election and idempotency.

  • All-or-nothing batches

    Write up to 25 keys in one atomic call. Either all land or none do.

  • Atomic counters

    Increment a number, or a numeric field inside an object, without a read-modify-write race. Fifty agents incrementing at once add up to exactly fifty.

  • Expiry on every key

    Set a time to live per key, bounded by the partition’s lifetime. Reset it, extend it or remove it later.

  • Browse by prefix

    List keys under a prefix with sort order and paging, without pulling the values.

  • Right-sized values

    Any JSON up to 350 KB. Anything larger is pointed to Ahura Store.

Speed and performance

Built for the loop an agent runs on every step.

Memory sits on the hot path, so it has to be fast and predictable. The design keeps a call to one gateway hop, one lean compute step and one key-value operation.

  • < 15 ms

    Typical server-side time

    Median for a warm, in-region call. Network distance to you is extra.

  • < 50 ms

    Tail latency target

    The slowest 1 in 100 warm calls.

  • Single-digit ms

    Key-value operations

    Reads and writes on one key.

  • On demand

    Throughput

    Scales out with traffic. There is no capacity to size or provision.

Where the time goes

Warm path, one region: 6–19 ms

  • Gateway and routing2–6 ms

    Request arrives, is authenticated and routed.

  • Compute (warm)1–4 ms

    Validate, check the partition, meter the call.

  • Key-value store read or write2–6 ms

    Single-key operation in the same region.

  • Ledger and response1–3 ms

    Record the charge and return the result.

Why it stays fast

  • One key, one lookup. No joins, no scans, no query planning.
  • Compute stays warm under steady traffic, so most calls skip start-up entirely.
  • Data lives in the same region as the call, with no cross-region hops.
  • Hot-path code is kept lean so the platform adds little on top of the store itself.

What can add time

  • Your distance from the region. Pick the closest one.
  • A cold start after a long idle period adds a one-off delay to the first call.
  • Very large values take longer to move than small ones.

These are design targets, not benchmarks. They come from the characteristics of the underlying components and our latency budget. Measured results from load testing will replace them once published.

Every call, listed

9 tools your agent can call. Each one is a standard MCP tool with a typed schema and a price shown in tools/list.

Write

memory.set
Set a value, optionally with expiry, only-if-absent or only-at-version.
memory.mset
Set up to 25 keys atomically.
memory.incr
Atomically add to a number.
memory.expire
Change or remove a key’s expiry.
memory.delete
Remove a key, optionally only at a version.

Read

memory.get
Read one key with its version, expiry and timestamps.
memory.mget
Read up to 100 keys in one call.
memory.list
List keys by prefix, with paging.
memory.stats
Key count, approximate size, oldest and newest.