Expand description
gadk-session: sessions, events, and the in-memory session service.
Modules§
- compaction
- Context compaction: summarize older session events so an agent’s prompt stays small as its conversation grows.
- state_
util - Helpers every
crate::SessionServiceimplementation shares: state-delta handling, the required-field check text and RFC 3339 time formatting. - toolauth
- adk-python’s auth data model in its wire format: how a
resource expects to be authenticated (
Scheme), a credential a tool was configured with or obtained (Credential), and the two together with the key the credential is stored under (Config). When a tool needs the end user’s consent, ADK sends aConfigto the client in anadk_request_credentialcall, so these types write and read the same JSON as adk-python and ADK Web.
Structs§
- Create
Request - A request to create a session.
- Delete
Request - A request to delete a session.
- Event
- An interaction in a conversation between agents and users.
- Event
Actions - The actions attached to an event.
- Event
Compaction - Records that a contiguous range of events has been replaced by one piece of content, typically a model-generated summary. Both bounds are inclusive.
- Event
Ref - Identifies a stored event by fields that survive a storage round trip.
- GetRequest
- A request to get a session.
- InMemory
Session Service - An in-memory
SessionService. Thread-safe. - List
Request - A request to list sessions.
- Node
Info - Per-event metadata identifying the workflow node that emitted it.
- Request
Input - A single human-in-the-loop prompt emitted by a workflow node.
- Tool
Confirmation - The state and details of a user confirmation request for a tool execution.
Enums§
- Session
Error - Errors returned by
crate::SessionService,crate::Sessionandcrate::State.
Constants§
- KEY_
PREFIX_ APP - Prefix for app-level state keys, shared across all users and sessions of an app.
- KEY_
PREFIX_ TEMP - Prefix for temporary state keys, discarded after the current invocation.
- KEY_
PREFIX_ USER - Prefix for user-level state keys, shared across all sessions of a user within an app.
Traits§
- Readonly
State - A read-only view of a key-value store of JSON values.
- Session
- A series of interactions between a user and agents.
- Session
Service - A session storage service.
- State
- A key-value store of JSON values: read, write and list the state of a session.
Functions§
- compare_
by_ last_ update - The order
SessionService::listdocuments: last update time ascending, ties by user ID, then session ID. Use it with a stable sort. - zero_
time - The zero time,
0001-01-01T00:00:00Z.