Skip to main content

Module id

Module id 

Source
Expand description

Non-cryptographic random identifiers, process-local run counters, and caller-supplied conversation keys. Do not use generated IDs as secrets.

let id = rig_core::id::generate();
assert_eq!(id.len(), 21);

Structs§

ConversationId
Caller-supplied key scoping ConversationMemory and provider conversation state across runs. Wraps the string without validation.
ParseIdError
Error from parsing a counter id: the text was not a non-zero decimal u64.
RunId
Process-local run identifier shared by that run’s hook events. Not secret; add a host or session scope for cross-process correlation.

Functions§

generate
Generate a 21-character URL-safe random identifier. Not cryptographically secure; collisions are possible.