How connections work
Connections for AgentCore harness are in public preview release for Amazon Bedrock AgentCore and are subject to change.
Connections split the work between two roles. An administrator creates a connection. A developer attaches the connection to a harness. Both roles use the same list and detail views for connections. Their IAM permissions determine which connections, fields, and actions each of them can see.
This topic describes each workflow and shows how to complete it in the Amazon Bedrock AgentCore console.
Prerequisites
-
IAM permissions to create connections and to create or update a harness.
-
A credential for the external service, such as an API key or personal access token. Use a credential with the smallest scope that your agents need. For the list of services, see Supported connectors.
Administrator workflow: create a connection
-
Choose a connector. Select one or more connectors from the AWS-maintained catalog. Each connector supplies the endpoint, the supported authentication method, and a recommended starting tool set.
-
Configure the credential. Provide the shared credential that the external service requires, such as an API key, provider token, or personal access token. AgentCore stores or references the credential through AgentCore Identity. Developers who use the connection don’t see the credential.
-
Control access. Use IAM to control who can view, update, attach, invoke, and delete the connection.
When you create the connection, AgentCore creates and operates the backing gateway and target resources with managed defaults and synchronizes the connector’s tools.
Create a connection in the console
-
Open the Amazon Bedrock AgentCore console
. -
In the navigation pane, choose Connections.
-
Choose Create connection.
-
Choose the connector for the external service, such as Atlassian or GitHub.
-
For Connection name, keep the generated name or enter your own. Valid characters are a–z, A–Z, 0–9, and
-(hyphen). The name must start with a letter or number and can have up to 100 characters. -
For API key, enter the credential for the external service. Developers who attach the connection don’t see this value.
-
Under Supported tools, review the tools that the connector provides. All of the listed tools are available to agents that use the connection.
-
Under Associated gateway, choose one of the following:
-
Default gateway – AgentCore creates a gateway and an IAM role with the necessary permissions.
-
Existing gateway – Choose a gateway from the list. To create one, choose Create gateway.
-
-
Choose Create connection.
Developer workflow: attach a connection to a harness
-
Find a connection. View the connections that you have permission to use.
-
Attach it to a harness. Attach the connection when you create or update an AgentCore harness.
You don’t configure the connector endpoint, gateway identity, target protocol, service roles, listing mode, or synchronization behavior.
Attach a connection to a harness in the console
You can attach connections when you create a harness or when you edit an existing one.
-
In the navigation pane, under Agents, choose My agents.
-
Do one of the following:
-
To create a harness, choose Create harness, and then fill in the Harness details and Model and system prompt sections.
-
To update a harness, choose the harness, and then choose Edit.
-
-
In the Tools section, turn on Connections.
The harness uses all of the connections in your account that are managed by your default gateway. The Included connections table lists each connection with its provider and tools.
-
(Optional) If the table shows No connections, choose Quick create connection. Enter a Connection name and API key, review the Supported tools, and create the connection. Then choose the refresh button above the table.
-
Choose Create harness, or Save changes if you’re editing a harness.
Verify and test
-
On the harness page, choose the Configuration tab.
-
In the Tools section, confirm that each connection appears with the type Connection.
-
Choose Test, and then send a prompt that uses one of the connection’s tools. For example, for a GitHub connection, ask the agent to list the open issues in a repository.
What happens when the agent uses a tool
When the harness agent lists or calls tools from a connection, AgentCore does the following:
-
Routes the request through the managed execution resources for the connection.
-
Injects the shared credential and sends the tool call to the external service.
-
Returns the result to the agent.
The external service applies its own permissions, based on the credential. For example, a GitHub personal access token can reach only the repositories it’s been granted.
When your agent calls a tool through a connection, AgentCore sends the tool request, including its arguments, to the external service. The service processes that data under its own terms and privacy policy. Review the provider’s terms before you create a connection.