Skip to main content

Crate gadk_session

Crate gadk_session 

Source
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::SessionService implementation 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 a Config to the client in an adk_request_credential call, so these types write and read the same JSON as adk-python and ADK Web.

Structs§

CreateRequest
A request to create a session.
DeleteRequest
A request to delete a session.
Event
An interaction in a conversation between agents and users.
EventActions
The actions attached to an event.
EventCompaction
Records that a contiguous range of events has been replaced by one piece of content, typically a model-generated summary. Both bounds are inclusive.
EventRef
Identifies a stored event by fields that survive a storage round trip.
GetRequest
A request to get a session.
InMemorySessionService
An in-memory SessionService. Thread-safe.
ListRequest
A request to list sessions.
NodeInfo
Per-event metadata identifying the workflow node that emitted it.
RequestInput
A single human-in-the-loop prompt emitted by a workflow node.
ToolConfirmation
The state and details of a user confirmation request for a tool execution.

Enums§

SessionError
Errors returned by crate::SessionService, crate::Session and crate::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§

ReadonlyState
A read-only view of a key-value store of JSON values.
Session
A series of interactions between a user and agents.
SessionService
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::list documents: 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.