# `ReqManagedAgents.AgentCore`
[🔗](https://github.com/cash-mckeeman/req_managed_agents/blob/v0.13.0/req_managed_agents/lib/req_managed_agents/agent_core.ex#L1)

Bedrock AgentCore entry point.

The per-turn invoke/resume loop now lives in the unified `ReqManagedAgents.Session` driving
the `ReqManagedAgents.Providers.BedrockAgentCore` provider (`:request_response` mode); this is
a thin compatibility shim. The SigV4-signed control-plane / data-plane wire client is
`ReqManagedAgents.Providers.BedrockAgentCore.Client`.

# `invoke_to_completion`

```elixir
@spec invoke_to_completion(keyword()) :: {:ok, map()} | {:error, term()}
```

Drive a Bedrock AgentCore Harness to completion via the unified Session. Returns
`{:ok, %{terminal, stop_reason, events}}` on a clean exit, or `{:error, reason}` on timeout,
a surfaced `{:harness_stream_error, _, _}`, `:early_termination`, or a client error.

Required opts: `:harness_arn`, `:runtime_session_id`, `:handler`. Optional: `:model`,
`:prompt`, `:context`, `:timeout`, `:max_turns`, `:endpoint_name` (the harness endpoint to
invoke, sent as `InvokeHarness`'s `qualifier`; defaults to the service's own `DEFAULT`),
`:telemetry_metadata` (and `:client` / `:invoke_fun` for tests).

---

*Consult [api-reference.md](api-reference.md) for complete listing*
