SigV4-signed REST client for AWS AgentCore (bedrock-agentcore). Covers the
control-plane harness lifecycle (create_harness/get_harness/delete_harness),
the AgentCore Identity token-vault (create_api_key_credential_provider), and the
data-plane invoke_harness (returns a decoded vnd.amazon.eventstream).
Infra-agnostic: it knows AgentCore's model-config surface, nothing about what
sits behind a liteLlmModelConfig.apiBase. Build with new/1; pass as the
first arg to every call. Transport is injectable via :req_options for tests.
Summary
Functions
Data-plane InvokeHarness. Sends messages with harnessArn in the query
string and the required X-Amzn-Bedrock-AgentCore-Runtime-Session-Id header.
Returns the decoded event-stream maps. Resume is just another call with the
resume messages (the profile assembles them).
ListHarnesses (control plane). Returns the decoded body
%{"harnesses" => [%{"harnessName", "harnessId", "arn", "status", ...}], "nextToken" => ...}.
Used to recover an existing harness by name (idempotent provisioning) when a
CreateHarness collides with a previously-created harness of the same name.
Types
Functions
Data-plane InvokeHarness. Sends messages with harnessArn in the query
string and the required X-Amzn-Bedrock-AgentCore-Runtime-Session-Id header.
Returns the decoded event-stream maps. Resume is just another call with the
resume messages (the profile assembles them).
Note: AWS requires runtimeSessionId to be at least 33 characters long
(pattern [a-zA-Z0-9][a-zA-Z0-9-_]*, max 100). The client passes it through
as-is — the caller is responsible for supplying a conforming value.
ListHarnesses (control plane). Returns the decoded body
%{"harnesses" => [%{"harnessName", "harnessId", "arn", "status", ...}], "nextToken" => ...}.
Used to recover an existing harness by name (idempotent provisioning) when a
CreateHarness collides with a previously-created harness of the same name.