Skip to content

Latest commit

 

History

History
14 lines (14 loc) · 5.42 KB

bedrockagentruntime.md

File metadata and controls

14 lines (14 loc) · 5.42 KB
  • There is no model inference. Agent answers, RetrieveAndGenerate answers and flow Prompt nodes use the Bedrock mock's deterministic completion; session summaries in agent memory, GenerateQuery SQL (a fixed SELECT with the question as a comment), OptimizePrompt rewrites and Rerank scores are deterministic approximations. Retrieval ranks a knowledge base's text documents (inline text, or text objects read from cloudemu S3 by direct ingestion or an ingestion job) by the share of the query's words they contain; there are no embeddings or chunking, and binary documents (PDF, Word, Excel) are not searched. Metadata filters (every RetrievalFilter operator) apply to a document's inline or .metadata.json attributes; overrideSearchType, implicit filters and reranking inside Retrieve are ignored. An empty knowledge base returns no results.
  • The agent does not plan. It calls an action-group function or API only when the input names it (a function name, with _ read as a space, or an API path), and takes parameters written as name=value or name: value: a function's parameters, an API operation's path, query and header parameters, and its request-body properties. API schemas are read from apiSchema.payload (JSON or YAML) or apiSchema.s3 (cloudemu S3); $ref references are not resolved. A RETURN_CONTROL action group hands the call back with a returnControl event (apiInvocationInput carries requestBody); a Lambda action group runs the Lambda mock with the documented agent event, including requestBody.content.<type>.properties for API calls. From the Lambda's reply it reads the response body, responseState (FAILURE is a DependencyFailedException naming the function; REPROMPT is read as the observation, as there is no model to reprompt), sessionAttributes and promptSessionAttributes (they replace the session's) and knowledgeBasesConfiguration (applied to the rest of the turn). Built-in AMAZON.*/ANTHROPIC.* action groups, code interpretation, collaborators, user confirmation and files (in the request's sessionState or as response events) are not modelled. A new input abandons a pending returnControl.
  • Traces cover orchestration (model input and output, rationale, action-group invocation, observations including the knowledge-base chunks found) plus a guardrail trace when a guardrail intervenes; pre- and post-processing traces appear only when the agent's promptOverrideConfiguration enables those steps. Routing classifiers and custom orchestration are not produced.
  • streamingConfigurations.streamFinalResponse splits the answer into chunks of about 64 bytes at word boundaries; applyGuardrailInterval is not used.
  • Guardrails come from the Bedrock mock, which evaluates only a guardrail's custom denied words.
  • Flows run their definition from the Input node: Output nodes receive the input document, Condition nodes follow their default connection, and every other node passes its input through unchanged (no model, Lambda, Lex or knowledge-base calls, no loops or multi-turn input). The working draft (TSTALIASID) must be prepared. --async-settle keeps a StartFlowExecution Running for two seconds, the only window in which StopFlowExecution succeeds; restored executions read as finished.
  • Session-management sessions expire after one hour idle (EXPIRED) and are never deleted automatically (AWS removes them after 30 days). encryptionKeyArn is stored, not used. A RetrieveAndGenerate sessionId is echoed but carries no conversation.
  • GetDocumentContent serves text documents (inline, or read from S3), through a URL on the emulator that expires after 15 minutes and survives --persist restarts. CheckIngestedDocumentAcl and GetIngestedDocumentAcl are newer than the SDK version cloudemu builds against and are not served.
  • Agent invocations publish AWS/Bedrock/Agents metrics (InvocationCount, TotalTime, the error and throttle counts, ModelInvocationCount, ModelLatency as 0, InputTokenCount, OutputTokenCount); TTFT is not published. Per-invocation CloudWatch Logs delivery needs the CloudWatch Logs vended-delivery API, which cloudemu does not have yet (#1560).
  • A runtime used on its own, without the bedrock-agent control plane, keeps its earlier behavior: it accepts any agent, alias and knowledge-base id and answers with simulated text.
  • Invoking an agent's working draft (TSTALIASID) needs a prepared draft: after CreateAgent or any change to the draft, call PrepareAgent first. AWS does not document the exception for an unprepared draft; the emulator returns a ValidationException.
  • Where AWS does not document the exact message (an alias rejecting invocations, an unprepared agent or flow, a stale returnControl invocationId, a non-SQL knowledge base for GenerateQuery, an S3 external source that can't be read), the emulator returns the documented exception with its own wording.
  • Under --enforce-auth, Bedrock Agent requests are authorized at service level (bedrock:*), and RetrieveAndGenerate reads S3 external sources without checking the caller's s3:GetObject permission; per-operation authorization is #1562.
  • sessionState.conversationHistory seeds the earlier turns of a new session (each user message with the assistant message after it); it is ignored for a session that already has turns. Knowledge-base chunks that share no word with the question are not passed to the model as context. A session that times out is summarized into agent memory when the agent's memory is next read, or when its sessionId is invoked again.