To set up an enterprise AI agent with Amazon Bedrock AgentCore, start with one task and the systems it needs. Build the agent, choose a model, connect only the required data and tools, then configure identity, credentials, policy and monitoring. AgentCore provides modular services for these parts; you do not need every service to get started.
A support assistant is a useful example. It can summarize a ticket and look up an account record, but it should not be able to change that record just because the model suggests doing so. That distinction shapes the setup below.
Which AWS components are involved?
Amazon Bedrock provides model access. AgentCore adds services for running an agent and connecting it to tools. Select the services the workflow needs rather than treating them as one mandatory bundle.
| Component | What it does | Decision to make |
|---|---|---|
| AgentCore Runtime | Hosts and scales your agent code in isolated sessions. | Which framework and model will the agent use? |
| AgentCore Gateway | Exposes configured APIs, Lambda functions or MCP servers as tools. | Which operations should the agent see? |
| AgentCore Identity | Manages workload identity and access to OAuth or API key credential providers. | Which agent identity can obtain which credential? |
| Policy in AgentCore | Checks MCP tool calls before execution when a policy engine is attached in enforce mode. | Which tool calls and parameters are allowed? |
| Memory and knowledge bases | Can retain conversation context or retrieve approved enterprise information. | Is either needed for this task, and whose data is accessible? |
| Observability and Guardrails | Help trace activity and evaluate selected content. | What must be logged, reviewed or screened? |
1. Define one workflow and its limits
Write down the request, the data the agent needs and the actions it may take. For the support assistant, the first version might read a ticket and retrieve an account status. An update to the customer record is a separate action to authorize. Identify the human or system that invokes the agent and the owner of each connected service.
This gives you a testable boundary: can the assistant answer the question with read access alone? If it needs a write operation, specify the exact fields and conditions rather than granting broad access to the whole application.
2. Build and run the agent
For the Runtime path, choose a foundation model and agent framework, write the agent instructions and implement the loop that handles model and tool requests. AgentCore Runtime can host that code without your team managing the underlying servers. Its Runtime is framework and model flexible; using an Amazon Bedrock model is one option, not an AgentCore requirement. AWS also offers AgentCore Harness for teams that want AWS to manage the agent loop; choose one path before following implementation instructions.
Start with a small test using no production credentials. Confirm how the agent behaves when a tool is unavailable, a request times out or the model proposes an action outside the intended workflow. AWS provides a Runtime getting-started path for the actual deployment steps and prerequisites.
3. Connect only the tools and data it needs
AgentCore Gateway can publish selected Lambda functions, APIs and MCP servers through an MCP-compatible endpoint. Define the tools and their schemas, add the required targets, configure inbound and outbound authentication, and connect the agent to the Gateway endpoint. A configured target makes a capability available; it does not establish that every caller should be allowed to use it.
If the support assistant needs company documents, a Bedrock knowledge base can supply retrieved information. That is different from AgentCore Memory, which stores interaction context. Use either only when the workflow calls for it, and check data permissions and retention separately. A direct API call or local tool outside the Gateway also sits outside any policy applied at that Gateway.
Illustrative Runtime path. An attached policy engine in enforce mode checks MCP tool calls before execution; results return through Gateway. Direct routes outside it are not covered.
4. Give the agent a scoped identity and credential path
Decide which identity represents the caller, which represents the workload and which credential the downstream service accepts. AgentCore Identity supports OAuth and API key credential providers. AWS also supports referring to an existing secret in Secrets Manager for certain provider setups, but that is a configuration choice, not a rule that every AgentCore tool automatically uses Secrets Manager.
Use IAM to restrict which workload identity can call which credential provider. Then follow one permitted request all the way through: where is the credential stored, which component retrieves a usable token or key, and what does the downstream API receive? An agent that does not display a key in a prompt may still be able to obtain or use it through its tools. Keep the downstream credential itself limited to the required actions.
5. Put authorization before the tool call
For MCP tool calls routed through an AgentCore Gateway with a policy engine attached in enforce mode, Policy in AgentCore evaluates Cedar rules against the caller, tool and relevant request context before the target runs. You can generate a policy from natural language, but review the resulting Cedar and test it. An explicit permit is required; a matching forbid takes precedence. Check the Gateway execution role and policy engine configuration as part of deployment.
In the example, test a permitted account lookup and a denied record update with the same caller. If an update requires a human approval, implement and verify that step in the application or another appropriate control; do not assume that adding a Gateway or a policy automatically creates an approval workflow. Confirm what happens on a timeout or policy service failure.
Bedrock Guardrails address content risks such as harmful output or prompt attacks. Depending on the integration, guardrail checks can also be referenced in AgentCore policies for selected inputs or outputs. They do not replace access rules: an allowed operation can still be unsafe in a particular context, and a content check does not independently decide who has permission to update a record.
6. Observe, test and narrow the production path
Configure the relevant AgentCore and CloudWatch observability path, including instrumentation where needed for traces. Review a complete example: caller, model request, tool request, authorization decision, downstream outcome and returned response. Keep sensitive data out of logs where possible, and set access and retention appropriately.
Before production, test an allowed read, a blocked write, an expired or revoked credential, a failed dependency and any direct route that bypasses the Gateway. Compare the agent trace with the downstream service log to verify that a denied call never reached the service. Review the permissions again whenever the workflow gains a new tool or a broader task.
Frequently asked questions
What if we already use Bedrock Agents Classic?
Existing users can continue to run Classic agents, but AWS says new customers cannot sign up. Migrating an existing agent to AgentCore needs a design review; its components are not a simple rename of Classic action groups.
Do we need every AgentCore service?
No. AgentCore services can be used independently. Start with the runtime, tool connections and identity pattern your workflow requires, then add memory, policy or other services as appropriate. If a tool call does not pass through a particular Gateway, that Gateway cannot apply its policy to that call.
Is AgentCore Gateway the same as a general LLM gateway?
No. A model gateway primarily manages requests to and from models. AgentCore Gateway can expose tools and other configured targets to agents; it can also support other traffic depending on the target type. Check the actual route and controls rather than assuming a product name describes the whole path.
Does AgentCore Identity keep credentials out of the agent in every setup?
No blanket claim is safe. Identity offers credential management, but the exposure boundary depends on the provider, how the code obtains a token or key, and which process makes the downstream request. Trace the specific credential from storage to use.
Can Guardrails replace tool-call policy?
No. Guardrails can evaluate selected content, while authorization rules decide whether a caller can invoke a configured operation. Both need deliberate configuration and testing for the route in question.
Start with one testable path
Start with a defined task and a short tool list. Verify what happens on allowed and denied calls, trace the credential from storage to use, then expand deliberately. For more on that credential path, read Station70’s article on where AI credentials live.
Related reading
- What is an MCP gateway?
- MCP gateway security: what to check before deployment
- Where AI credentials live
- Tool-call policy and model decisions
