Run Agent
Changed onRequest
- The document declares no server URL.
- Authnone declared
Request body
Request body for the /run and /run_sse endpoints.
Contains the multi-part content of a message.
Response
Successful Response
Contains the multi-part content of a message.
Information for various kinds of grounding.
The reason why the turn is complete.
The different activity states of the live session.
Output only.
The reason why the model stopped generating tokens. If empty, the model has not stopped generating.
Usage metadata about the content generation request and response.
This message provides a detailed breakdown of token usage and other relevant metrics. This data type is not supported in Gemini API.
Update of the session resumption state.
Only sent if session_resumption was set in the connection config.
Server will not be able to service client soon.
Voice activity signal.
Audio transcription in Server Content.
Audio transcription in Server Content.
The log probabilities of the tokens generated by the model.
This is useful for understanding the model's confidence in its predictions and for debugging. For example, you can use log probabilities to identify when the model is making a less confident prediction or to explore alternative responses that the model considered. A low log probability can also indicate that the model is "hallucinating" or generating factually incorrect information.
Metadata for context cache associated with LLM responses.
This class stores cache identification, usage tracking, and lifecycle information for a particular cache instance. It can be in two states:
- Active cache state: cache_name is set, all fields populated, except created_at when ADK did not create the cache
- Fingerprint-only state: cache_name is None, only fingerprint and contents_count are set for prefix matching
Token counts (cached and total) are available in the LlmResponse.usage_metadata and should be accessed from there to avoid duplication. Cache-creation (write) token counts, when reported by the provider, are available on LlmResponse.cache_creation_token_count.
Attributes: cache_name: The full resource name of the cached content (e.g., 'projects/123/locations/us-central1/cachedContents/456'). None when no active cache exists (fingerprint-only state). expire_time: Unix timestamp when the cache expires. None when no active cache exists. fingerprint: Hash of cacheable contents (instruction + tools + contents). Always present for prefix matching. invocations_used: Number of invocations this cache has been used for. None when no active cache exists. contents_count: Number of contents. When active cache exists, this is the count of cached contents. When no active cache exists, this is the count of the cacheable content prefix used for fingerprinting. created_at: Unix timestamp when ADK created the cache. None when no active cache exists, or when the active cache was created outside ADK. ADK only deletes caches it created.
Citation information when the model quotes another source.
Represents the actions attached to an event.
Workflow node metadata attached to an Event.
Changes
- warning
added the new
ESCALATIONenum value to theitems/finishReason/anyOf[subschema #1: FinishReason]response property for the response status - warning
added the new
MALFORMED_RESPONSEenum value to theitems/finishReason/anyOf[subschema #1: FinishReason]response property for the response status - warning
added the new
MISSING_THOUGHT_SIGNATUREenum value to theitems/finishReason/anyOf[subschema #1: FinishReason]response property for the response status
32 more changes in this revision
- warning