AMEM.EPIS.STATS
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.
Return value
Section titled “Return value”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' commandif the argument count is wrong.NOLICENSE agent-memory requires a HotKV license. Contact sales@hotkv.comif your license does not include theagent-memoryfeature.
Examples
Section titled “Examples”127.0.0.1:6379> AMEM.EPIS.STATS agent-421) "total_events"2) (integer) 23) "oldest_ts"4) (integer) 17909856000234567895) "newest_ts"6) (integer) 1790985600123456789Compatibility
Section titled “Compatibility”HotKV-only command. Redis and Valkey have no equivalent.
See also
Section titled “See also”AMEM.EPIS.LOG, AMEM.EPIS.QUERY, AMEM.EPIS.CLEAR, AI features guide
Was this page helpful?
Thanks for the feedback.