ReqManagedAgents.Providers.BedrockAgentCore (ReqManagedAgents v0.8.0)

Copy Markdown View Source

ReqManagedAgents.Provider for the Bedrock AgentCore backend — :request_response mode. Each turn is one InvokeHarness call; resume re-sends the assistant toolUse + user toolResult delta (the harness does not persist the uncommitted tool-use turn). Composes the existing AgentCore.{Client, Converse} modules. Decoded events are additionally delivered live to the session as {:provider_event, ev} messages while a turn streams. The provision spec may carry opaque environment/environment_variables maps that pass through to CreateHarness verbatim (filesystem mounts, custom containers, env vars — never interpreted by this library).

Summary

Functions

Assembles the AgentCore harness-creation spec from an Agent.Spec-shaped spec map and provisioning opts. Validates opts[:execution_role_arn] BEFORE it ever reaches CreateHarness — a blank/missing value used to pass straight through (Keyword.fetch!/2 only guards the key being absent, not a present-but-blank value) and surface as a cryptic AWS HTTP 400 "Value null at 'executionRoleArn'" (GitHub #64).

Functions

build_spec(spec, opts)

@spec build_spec(
  map(),
  keyword()
) :: {:ok, map()} | {:error, term()}

Assembles the AgentCore harness-creation spec from an Agent.Spec-shaped spec map and provisioning opts. Validates opts[:execution_role_arn] BEFORE it ever reaches CreateHarness — a blank/missing value used to pass straight through (Keyword.fetch!/2 only guards the key being absent, not a present-but-blank value) and surface as a cryptic AWS HTTP 400 "Value null at 'executionRoleArn'" (GitHub #64).