> ## Documentation Index
> Fetch the complete documentation index at: https://gateway.forceaisecurity.com/llms.txt
> Use this file to discover all available pages before exploring further.

# AWS Bedrock AgentCore (A2A)

> Register a Bedrock AgentCore runtime in the ForceAI Gateway over native A2A with AWS SigV4.

Amazon Bedrock AgentCore Runtime is itself an A2A server. The gateway invokes it natively over JSON-RPC and signs each call with AWS SigV4, so onboarding is just the runtime ARN plus AWS credentials on the gateway. There is no per-request model bridge; the runtime speaks A2A directly

## Prerequisites (AWS side)

<Steps>
  <Step title="A deployed AgentCore runtime">
    Deploy your agent to Bedrock AgentCore and copy its runtime ARN from the AWS Bedrock console under AgentCore. It looks like `arn:aws:bedrock-agentcore:<region>:<account>:runtime/<id>`
  </Step>

  <Step title="AWS credentials on the gateway">
    The gateway signs with SigV4 using the credentials of your Bedrock provider. Configure `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, and `AWS_REGION_NAME` on the gateway, or attach an IAM role, with permission to invoke the runtime. The region is derived from the ARN
  </Step>
</Steps>

<Note>
  Auth is AWS SigV4 by default (service `bedrock-agentcore`). If your runtime is fronted by a Cognito or JWT authorizer instead, supply a bearer token as `api_key` in `forceai_params` and the gateway sends `Authorization: Bearer <token>` rather than signing
</Note>

## Register the agent

The only backend-specific input is the runtime ARN, filled into the model template `bedrock/agentcore/{agent_runtime_arn}`. Credentials are inherited from the Bedrock provider

```bash theme={null}
curl -X POST https://YOUR_GATEWAY_DOMAIN/v1/agents \
  -H "Authorization: Bearer $ADMIN_KEY" -H "Content-Type: application/json" \
  -d '{
    "agent_name": "forceai-echo-agentcore",
    "agent_card_params": {
      "protocolVersion": "0.3", "name": "AgentCore Echo",
      "description": "Bedrock AgentCore runtime over A2A",
      "url": "https://bedrock-agentcore.us-east-1.amazonaws.com/",
      "capabilities": { "streaming": false },
      "defaultInputModes": ["text"], "defaultOutputModes": ["text"],
      "skills": [{ "id": "echo", "name": "Echo", "description": "echoes text", "tags": ["demo"] }]
    },
    "forceai_params": {
      "model": "bedrock/agentcore/arn:aws:bedrock-agentcore:us-east-1:123456789012:runtime/my-agent-runtime",
      "custom_llm_provider": "bedrock"
    }
  }'
```

Or in the dashboard: **Agentic -> Agents -> Add New Agent**, pick **Bedrock AgentCore**, and paste the runtime ARN

### Fields

<ParamField path="model" type="string" required>
  `bedrock/agentcore/<runtime ARN>`. The ARN is the only backend-specific value
</ParamField>

<ParamField path="custom_llm_provider" type="string" required>
  `bedrock`. AWS credentials are inherited from the Bedrock provider
</ParamField>

<ParamField path="aws_access_key_id / aws_secret_access_key / aws_region_name" type="string">
  Optional. Pass explicit AWS credentials here instead of inheriting them. `aws_session_token` and `aws_profile_name` are also accepted
</ParamField>

<ParamField path="api_key" type="string">
  Optional. A Cognito or JWT bearer token; when present the gateway uses bearer auth instead of SigV4
</ParamField>

## Approve and invoke

```bash theme={null}
# Approve
curl -X POST https://YOUR_GATEWAY_DOMAIN/v1/agents/{agent_id}/approve \
  -H "Authorization: Bearer $ADMIN_KEY" -H "Content-Type: application/json" -d '{"reason":"onboard"}'

# Invoke (reload the gateway first on docker-compose)
curl -X POST https://YOUR_GATEWAY_DOMAIN/v1/a2a/{agent_id}/message/send \
  -H "Authorization: Bearer $AGENT_KEY" -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":"1","method":"message/send",
       "params":{"message":{"role":"user","parts":[{"kind":"text","text":"hello agentcore"}]}}}'
```

The reply comes back under `result.artifacts[].parts[].text`. In Logs the request is attributed to the `bedrock` provider

## Notes

Caller-supplied headers cannot spoof AWS identity: the gateway strips `authorization`, `host`, `x-amz-*`, and the AgentCore runtime-session headers from any `agent_extra_headers` before signing. A 403 from AgentCore means the signed identity lacks permission to invoke the runtime; a 401 means a bearer token was expected. AgentCore Runtime is consumption based, so an idle runtime does not bill; you pay for invocation compute
