Skip to content

Type definitions#

Index > AgentsforBedrockRuntime > Type definitions

Auto-generated documentation for AgentsforBedrockRuntime type annotations stubs module types-aiobotocore-bedrock-agent-runtime.

AccessDeniedExceptionTypeDef#

# AccessDeniedExceptionTypeDef definition

class AccessDeniedExceptionTypeDef(TypedDict):
    message: NotRequired[str],

ParameterTypeDef#

# ParameterTypeDef definition

class ParameterTypeDef(TypedDict):
    name: NotRequired[str],
    type: NotRequired[str],
    value: NotRequired[str],

ActionGroupInvocationOutputTypeDef#

# ActionGroupInvocationOutputTypeDef definition

class ActionGroupInvocationOutputTypeDef(TypedDict):
    text: NotRequired[str],

BadGatewayExceptionTypeDef#

# BadGatewayExceptionTypeDef definition

class BadGatewayExceptionTypeDef(TypedDict):
    message: NotRequired[str],
    resourceName: NotRequired[str],

ConflictExceptionTypeDef#

# ConflictExceptionTypeDef definition

class ConflictExceptionTypeDef(TypedDict):
    message: NotRequired[str],

DependencyFailedExceptionTypeDef#

# DependencyFailedExceptionTypeDef definition

class DependencyFailedExceptionTypeDef(TypedDict):
    message: NotRequired[str],
    resourceName: NotRequired[str],

FailureTraceTypeDef#

# FailureTraceTypeDef definition

class FailureTraceTypeDef(TypedDict):
    traceId: NotRequired[str],
    failureReason: NotRequired[str],

FinalResponseTypeDef#

# FinalResponseTypeDef definition

class FinalResponseTypeDef(TypedDict):
    text: NotRequired[str],

InferenceConfigurationTypeDef#

# InferenceConfigurationTypeDef definition

class InferenceConfigurationTypeDef(TypedDict):
    temperature: NotRequired[float],
    topP: NotRequired[float],
    topK: NotRequired[int],
    maximumLength: NotRequired[int],
    stopSequences: NotRequired[List[str]],

InternalServerExceptionTypeDef#

# InternalServerExceptionTypeDef definition

class InternalServerExceptionTypeDef(TypedDict):
    message: NotRequired[str],

KnowledgeBaseLookupInputTypeDef#

# KnowledgeBaseLookupInputTypeDef definition

class KnowledgeBaseLookupInputTypeDef(TypedDict):
    text: NotRequired[str],
    knowledgeBaseId: NotRequired[str],

SessionStateTypeDef#

# SessionStateTypeDef definition

class SessionStateTypeDef(TypedDict):
    sessionAttributes: NotRequired[Mapping[str, str]],
    promptSessionAttributes: NotRequired[Mapping[str, str]],

ResponseMetadataTypeDef#

# ResponseMetadataTypeDef definition

class ResponseMetadataTypeDef(TypedDict):
    RequestId: str,
    HostId: str,
    HTTPStatusCode: int,
    HTTPHeaders: Dict[str, str],
    RetryAttempts: int,

KnowledgeBaseQueryTypeDef#

# KnowledgeBaseQueryTypeDef definition

class KnowledgeBaseQueryTypeDef(TypedDict):
    text: str,

KnowledgeBaseVectorSearchConfigurationTypeDef#

# KnowledgeBaseVectorSearchConfigurationTypeDef definition

class KnowledgeBaseVectorSearchConfigurationTypeDef(TypedDict):
    numberOfResults: int,

RetrievalResultContentTypeDef#

# RetrievalResultContentTypeDef definition

class RetrievalResultContentTypeDef(TypedDict):
    text: str,

KnowledgeBaseRetrieveAndGenerateConfigurationTypeDef#

# KnowledgeBaseRetrieveAndGenerateConfigurationTypeDef definition

class KnowledgeBaseRetrieveAndGenerateConfigurationTypeDef(TypedDict):
    knowledgeBaseId: str,
    modelArn: str,

RepromptResponseTypeDef#

# RepromptResponseTypeDef definition

class RepromptResponseTypeDef(TypedDict):
    text: NotRequired[str],
    source: NotRequired[SourceType],  # (1)
  1. See SourceType

RationaleTypeDef#

# RationaleTypeDef definition

class RationaleTypeDef(TypedDict):
    traceId: NotRequired[str],
    text: NotRequired[str],

PaginatorConfigTypeDef#

# PaginatorConfigTypeDef definition

class PaginatorConfigTypeDef(TypedDict):
    MaxItems: NotRequired[int],
    PageSize: NotRequired[int],
    StartingToken: NotRequired[str],

PostProcessingParsedResponseTypeDef#

# PostProcessingParsedResponseTypeDef definition

class PostProcessingParsedResponseTypeDef(TypedDict):
    text: NotRequired[str],

PreProcessingParsedResponseTypeDef#

# PreProcessingParsedResponseTypeDef definition

class PreProcessingParsedResponseTypeDef(TypedDict):
    rationale: NotRequired[str],
    isValid: NotRequired[bool],

ResourceNotFoundExceptionTypeDef#

# ResourceNotFoundExceptionTypeDef definition

class ResourceNotFoundExceptionTypeDef(TypedDict):
    message: NotRequired[str],

ServiceQuotaExceededExceptionTypeDef#

# ServiceQuotaExceededExceptionTypeDef definition

class ServiceQuotaExceededExceptionTypeDef(TypedDict):
    message: NotRequired[str],

ThrottlingExceptionTypeDef#

# ThrottlingExceptionTypeDef definition

class ThrottlingExceptionTypeDef(TypedDict):
    message: NotRequired[str],

ValidationExceptionTypeDef#

# ValidationExceptionTypeDef definition

class ValidationExceptionTypeDef(TypedDict):
    message: NotRequired[str],

RetrievalResultS3LocationTypeDef#

# RetrievalResultS3LocationTypeDef definition

class RetrievalResultS3LocationTypeDef(TypedDict):
    uri: NotRequired[str],

RetrieveAndGenerateInputTypeDef#

# RetrieveAndGenerateInputTypeDef definition

class RetrieveAndGenerateInputTypeDef(TypedDict):
    text: str,

RetrieveAndGenerateOutputTypeDef#

# RetrieveAndGenerateOutputTypeDef definition

class RetrieveAndGenerateOutputTypeDef(TypedDict):
    text: str,

RetrieveAndGenerateSessionConfigurationTypeDef#

# RetrieveAndGenerateSessionConfigurationTypeDef definition

class RetrieveAndGenerateSessionConfigurationTypeDef(TypedDict):
    kmsKeyArn: str,

SpanTypeDef#

# SpanTypeDef definition

class SpanTypeDef(TypedDict):
    start: NotRequired[int],
    end: NotRequired[int],

RequestBodyTypeDef#

# RequestBodyTypeDef definition

class RequestBodyTypeDef(TypedDict):
    content: NotRequired[Dict[str, List[ParameterTypeDef]]],  # (1)
  1. See ParameterTypeDef

ModelInvocationInputTypeDef#

# ModelInvocationInputTypeDef definition

class ModelInvocationInputTypeDef(TypedDict):
    traceId: NotRequired[str],
    text: NotRequired[str],
    type: NotRequired[PromptTypeType],  # (1)
    inferenceConfiguration: NotRequired[InferenceConfigurationTypeDef],  # (2)
    overrideLambda: NotRequired[str],
    promptCreationMode: NotRequired[CreationModeType],  # (3)
    parserMode: NotRequired[CreationModeType],  # (3)
  1. See PromptTypeType
  2. See InferenceConfigurationTypeDef
  3. See CreationModeType
  4. See CreationModeType

InvokeAgentRequestRequestTypeDef#

# InvokeAgentRequestRequestTypeDef definition

class InvokeAgentRequestRequestTypeDef(TypedDict):
    agentId: str,
    agentAliasId: str,
    sessionId: str,
    inputText: str,
    sessionState: NotRequired[SessionStateTypeDef],  # (1)
    endSession: NotRequired[bool],
    enableTrace: NotRequired[bool],
  1. See SessionStateTypeDef

KnowledgeBaseRetrievalConfigurationTypeDef#

# KnowledgeBaseRetrievalConfigurationTypeDef definition

class KnowledgeBaseRetrievalConfigurationTypeDef(TypedDict):
    vectorSearchConfiguration: KnowledgeBaseVectorSearchConfigurationTypeDef,  # (1)
  1. See KnowledgeBaseVectorSearchConfigurationTypeDef

RetrieveAndGenerateConfigurationTypeDef#

# RetrieveAndGenerateConfigurationTypeDef definition

class RetrieveAndGenerateConfigurationTypeDef(TypedDict):
    type: RetrieveAndGenerateTypeType,  # (1)
    knowledgeBaseConfiguration: NotRequired[KnowledgeBaseRetrieveAndGenerateConfigurationTypeDef],  # (2)
  1. See RetrieveAndGenerateTypeType
  2. See KnowledgeBaseRetrieveAndGenerateConfigurationTypeDef

PostProcessingModelInvocationOutputTypeDef#

# PostProcessingModelInvocationOutputTypeDef definition

class PostProcessingModelInvocationOutputTypeDef(TypedDict):
    traceId: NotRequired[str],
    parsedResponse: NotRequired[PostProcessingParsedResponseTypeDef],  # (1)
  1. See PostProcessingParsedResponseTypeDef

PreProcessingModelInvocationOutputTypeDef#

# PreProcessingModelInvocationOutputTypeDef definition

class PreProcessingModelInvocationOutputTypeDef(TypedDict):
    traceId: NotRequired[str],
    parsedResponse: NotRequired[PreProcessingParsedResponseTypeDef],  # (1)
  1. See PreProcessingParsedResponseTypeDef

RetrievalResultLocationTypeDef#

# RetrievalResultLocationTypeDef definition

class RetrievalResultLocationTypeDef(TypedDict):
    type: RetrievalResultLocationTypeType,  # (1)
    s3Location: NotRequired[RetrievalResultS3LocationTypeDef],  # (2)
  1. See RetrievalResultLocationTypeType
  2. See RetrievalResultS3LocationTypeDef

TextResponsePartTypeDef#

# TextResponsePartTypeDef definition

class TextResponsePartTypeDef(TypedDict):
    text: NotRequired[str],
    span: NotRequired[SpanTypeDef],  # (1)
  1. See SpanTypeDef

ActionGroupInvocationInputTypeDef#

# ActionGroupInvocationInputTypeDef definition

class ActionGroupInvocationInputTypeDef(TypedDict):
    actionGroupName: NotRequired[str],
    verb: NotRequired[str],
    apiPath: NotRequired[str],
    parameters: NotRequired[List[ParameterTypeDef]],  # (1)
    requestBody: NotRequired[RequestBodyTypeDef],  # (2)
  1. See ParameterTypeDef
  2. See RequestBodyTypeDef

RetrieveRequestRequestTypeDef#

# RetrieveRequestRequestTypeDef definition

class RetrieveRequestRequestTypeDef(TypedDict):
    knowledgeBaseId: str,
    retrievalQuery: KnowledgeBaseQueryTypeDef,  # (1)
    retrievalConfiguration: NotRequired[KnowledgeBaseRetrievalConfigurationTypeDef],  # (2)
    nextToken: NotRequired[str],
  1. See KnowledgeBaseQueryTypeDef
  2. See KnowledgeBaseRetrievalConfigurationTypeDef

RetrieveRequestRetrievePaginateTypeDef#

# RetrieveRequestRetrievePaginateTypeDef definition

class RetrieveRequestRetrievePaginateTypeDef(TypedDict):
    knowledgeBaseId: str,
    retrievalQuery: KnowledgeBaseQueryTypeDef,  # (1)
    retrievalConfiguration: NotRequired[KnowledgeBaseRetrievalConfigurationTypeDef],  # (2)
    PaginationConfig: NotRequired[PaginatorConfigTypeDef],  # (3)
  1. See KnowledgeBaseQueryTypeDef
  2. See KnowledgeBaseRetrievalConfigurationTypeDef
  3. See PaginatorConfigTypeDef

RetrieveAndGenerateRequestRequestTypeDef#

# RetrieveAndGenerateRequestRequestTypeDef definition

class RetrieveAndGenerateRequestRequestTypeDef(TypedDict):
    input: RetrieveAndGenerateInputTypeDef,  # (1)
    sessionId: NotRequired[str],
    retrieveAndGenerateConfiguration: NotRequired[RetrieveAndGenerateConfigurationTypeDef],  # (2)
    sessionConfiguration: NotRequired[RetrieveAndGenerateSessionConfigurationTypeDef],  # (3)
  1. See RetrieveAndGenerateInputTypeDef
  2. See RetrieveAndGenerateConfigurationTypeDef
  3. See RetrieveAndGenerateSessionConfigurationTypeDef

PostProcessingTraceTypeDef#

# PostProcessingTraceTypeDef definition

class PostProcessingTraceTypeDef(TypedDict):
    modelInvocationInput: NotRequired[ModelInvocationInputTypeDef],  # (1)
    modelInvocationOutput: NotRequired[PostProcessingModelInvocationOutputTypeDef],  # (2)
  1. See ModelInvocationInputTypeDef
  2. See PostProcessingModelInvocationOutputTypeDef

PreProcessingTraceTypeDef#

# PreProcessingTraceTypeDef definition

class PreProcessingTraceTypeDef(TypedDict):
    modelInvocationInput: NotRequired[ModelInvocationInputTypeDef],  # (1)
    modelInvocationOutput: NotRequired[PreProcessingModelInvocationOutputTypeDef],  # (2)
  1. See ModelInvocationInputTypeDef
  2. See PreProcessingModelInvocationOutputTypeDef

KnowledgeBaseRetrievalResultTypeDef#

# KnowledgeBaseRetrievalResultTypeDef definition

class KnowledgeBaseRetrievalResultTypeDef(TypedDict):
    content: RetrievalResultContentTypeDef,  # (1)
    location: NotRequired[RetrievalResultLocationTypeDef],  # (2)
    score: NotRequired[float],
  1. See RetrievalResultContentTypeDef
  2. See RetrievalResultLocationTypeDef

RetrievedReferenceTypeDef#

# RetrievedReferenceTypeDef definition

class RetrievedReferenceTypeDef(TypedDict):
    content: NotRequired[RetrievalResultContentTypeDef],  # (1)
    location: NotRequired[RetrievalResultLocationTypeDef],  # (2)
  1. See RetrievalResultContentTypeDef
  2. See RetrievalResultLocationTypeDef

GeneratedResponsePartTypeDef#

# GeneratedResponsePartTypeDef definition

class GeneratedResponsePartTypeDef(TypedDict):
    textResponsePart: NotRequired[TextResponsePartTypeDef],  # (1)
  1. See TextResponsePartTypeDef

InvocationInputTypeDef#

# InvocationInputTypeDef definition

class InvocationInputTypeDef(TypedDict):
    traceId: NotRequired[str],
    invocationType: NotRequired[InvocationTypeType],  # (1)
    actionGroupInvocationInput: NotRequired[ActionGroupInvocationInputTypeDef],  # (2)
    knowledgeBaseLookupInput: NotRequired[KnowledgeBaseLookupInputTypeDef],  # (3)
  1. See InvocationTypeType
  2. See ActionGroupInvocationInputTypeDef
  3. See KnowledgeBaseLookupInputTypeDef

RetrieveResponseTypeDef#

# RetrieveResponseTypeDef definition

class RetrieveResponseTypeDef(TypedDict):
    retrievalResults: List[KnowledgeBaseRetrievalResultTypeDef],  # (1)
    nextToken: str,
    ResponseMetadata: ResponseMetadataTypeDef,  # (2)
  1. See KnowledgeBaseRetrievalResultTypeDef
  2. See ResponseMetadataTypeDef

KnowledgeBaseLookupOutputTypeDef#

# KnowledgeBaseLookupOutputTypeDef definition

class KnowledgeBaseLookupOutputTypeDef(TypedDict):
    retrievedReferences: NotRequired[List[RetrievedReferenceTypeDef]],  # (1)
  1. See RetrievedReferenceTypeDef

CitationTypeDef#

# CitationTypeDef definition

class CitationTypeDef(TypedDict):
    generatedResponsePart: NotRequired[GeneratedResponsePartTypeDef],  # (1)
    retrievedReferences: NotRequired[List[RetrievedReferenceTypeDef]],  # (2)
  1. See GeneratedResponsePartTypeDef
  2. See RetrievedReferenceTypeDef

ObservationTypeDef#

# ObservationTypeDef definition

class ObservationTypeDef(TypedDict):
    traceId: NotRequired[str],
    type: NotRequired[TypeType],  # (1)
    actionGroupInvocationOutput: NotRequired[ActionGroupInvocationOutputTypeDef],  # (2)
    knowledgeBaseLookupOutput: NotRequired[KnowledgeBaseLookupOutputTypeDef],  # (3)
    finalResponse: NotRequired[FinalResponseTypeDef],  # (4)
    repromptResponse: NotRequired[RepromptResponseTypeDef],  # (5)
  1. See TypeType
  2. See ActionGroupInvocationOutputTypeDef
  3. See KnowledgeBaseLookupOutputTypeDef
  4. See FinalResponseTypeDef
  5. See RepromptResponseTypeDef

AttributionTypeDef#

# AttributionTypeDef definition

class AttributionTypeDef(TypedDict):
    citations: NotRequired[List[CitationTypeDef]],  # (1)
  1. See CitationTypeDef

RetrieveAndGenerateResponseTypeDef#

# RetrieveAndGenerateResponseTypeDef definition

class RetrieveAndGenerateResponseTypeDef(TypedDict):
    sessionId: str,
    output: RetrieveAndGenerateOutputTypeDef,  # (1)
    citations: List[CitationTypeDef],  # (2)
    ResponseMetadata: ResponseMetadataTypeDef,  # (3)
  1. See RetrieveAndGenerateOutputTypeDef
  2. See CitationTypeDef
  3. See ResponseMetadataTypeDef

OrchestrationTraceTypeDef#

# OrchestrationTraceTypeDef definition

class OrchestrationTraceTypeDef(TypedDict):
    rationale: NotRequired[RationaleTypeDef],  # (1)
    invocationInput: NotRequired[InvocationInputTypeDef],  # (2)
    observation: NotRequired[ObservationTypeDef],  # (3)
    modelInvocationInput: NotRequired[ModelInvocationInputTypeDef],  # (4)
  1. See RationaleTypeDef
  2. See InvocationInputTypeDef
  3. See ObservationTypeDef
  4. See ModelInvocationInputTypeDef

PayloadPartTypeDef#

# PayloadPartTypeDef definition

class PayloadPartTypeDef(TypedDict):
    bytes: NotRequired[bytes],
    attribution: NotRequired[AttributionTypeDef],  # (1)
  1. See AttributionTypeDef

TraceTypeDef#

# TraceTypeDef definition

class TraceTypeDef(TypedDict):
    preProcessingTrace: NotRequired[PreProcessingTraceTypeDef],  # (1)
    orchestrationTrace: NotRequired[OrchestrationTraceTypeDef],  # (2)
    postProcessingTrace: NotRequired[PostProcessingTraceTypeDef],  # (3)
    failureTrace: NotRequired[FailureTraceTypeDef],  # (4)
  1. See PreProcessingTraceTypeDef
  2. See OrchestrationTraceTypeDef
  3. See PostProcessingTraceTypeDef
  4. See FailureTraceTypeDef

TracePartTypeDef#

# TracePartTypeDef definition

class TracePartTypeDef(TypedDict):
    agentId: NotRequired[str],
    agentAliasId: NotRequired[str],
    sessionId: NotRequired[str],
    trace: NotRequired[TraceTypeDef],  # (1)
  1. See TraceTypeDef

ResponseStreamTypeDef#

# ResponseStreamTypeDef definition

class ResponseStreamTypeDef(TypedDict):
    chunk: NotRequired[PayloadPartTypeDef],  # (1)
    trace: NotRequired[TracePartTypeDef],  # (2)
    internalServerException: NotRequired[InternalServerExceptionTypeDef],  # (3)
    validationException: NotRequired[ValidationExceptionTypeDef],  # (4)
    resourceNotFoundException: NotRequired[ResourceNotFoundExceptionTypeDef],  # (5)
    serviceQuotaExceededException: NotRequired[ServiceQuotaExceededExceptionTypeDef],  # (6)
    throttlingException: NotRequired[ThrottlingExceptionTypeDef],  # (7)
    accessDeniedException: NotRequired[AccessDeniedExceptionTypeDef],  # (8)
    conflictException: NotRequired[ConflictExceptionTypeDef],  # (9)
    dependencyFailedException: NotRequired[DependencyFailedExceptionTypeDef],  # (10)
    badGatewayException: NotRequired[BadGatewayExceptionTypeDef],  # (11)
  1. See PayloadPartTypeDef
  2. See TracePartTypeDef
  3. See InternalServerExceptionTypeDef
  4. See ValidationExceptionTypeDef
  5. See ResourceNotFoundExceptionTypeDef
  6. See ServiceQuotaExceededExceptionTypeDef
  7. See ThrottlingExceptionTypeDef
  8. See AccessDeniedExceptionTypeDef
  9. See ConflictExceptionTypeDef
  10. See DependencyFailedExceptionTypeDef
  11. See BadGatewayExceptionTypeDef

InvokeAgentResponseTypeDef#

# InvokeAgentResponseTypeDef definition

class InvokeAgentResponseTypeDef(TypedDict):
    completion: AioEventStream[ResponseStreamTypeDef],  # (1)
    contentType: str,
    sessionId: str,
    ResponseMetadata: ResponseMetadataTypeDef,  # (2)
  1. See ResponseStreamTypeDef
  2. See ResponseMetadataTypeDef