Skip to content

Ask the HotKV docs

Answers come only from these docs and can be wrong; check the linked pages before you rely on them.

AMEM.EPIS.STATS

Last updated
AMEM.EPIS.STATS agent_id
Group
Agent memory
Complexity
O(1)
Arity
2 (exactly, counting the command name)
Flags
read-only, fast
Keys
first 1, last 1, step 1
HotKV Cloud
Performance and Scale
On-Premise
requires the agent-memory license feature

Agent memory gives AI agents four kinds of memory. Episodic memory is an append-only log of timestamped events per agent, which you can query by event type and time range. AMEM.EPIS.STATS summarises an agent’s log. For an agent with no events, every field is zero.

The reply is a flat array of alternating field names and values in both RESP2 and RESP3 (it is not sent as a RESP3 map). The fields, in order:

Field Type Meaning
total_events Integer Events in the log.
oldest_ts Integer Timestamp of the first event, in nanoseconds since the Unix epoch.
newest_ts Integer Timestamp of the last event.

Errors:

  • ERR wrong number of arguments for 'amem.epis.stats' command if the argument count is wrong.
  • NOLICENSE agent-memory requires a HotKV license. Contact sales@hotkv.com if your license does not include the agent-memory feature.
127.0.0.1:6379> AMEM.EPIS.STATS agent-42
1) "total_events"
2) (integer) 2
3) "oldest_ts"
4) (integer) 1790985600023456789
5) "newest_ts"
6) (integer) 1790985600123456789

HotKV-only command. Redis and Valkey have no equivalent.

AMEM.EPIS.LOG, AMEM.EPIS.QUERY, AMEM.EPIS.CLEAR, AI features guide