Agent chat
Start on the home page of SageMaker AI optimizer, where you describe what you want to build or improve. The agent proposes each step, and you approve what it does. Each chat becomes a conversation that you can search and reopen.
What you can do
In agent chat, you can do the following:
Choose which agent you chat with.
Start a conversation from a starter prompt or your own description.
Choose the model and effort the agent uses.
Decide whether the agent asks before it uses a tool.
Stop the agent while it works.
Rate a response.
Choose an agent
You can chat with the SageMaker agent or with a third-party coding agent. Third-party agents use SageMaker AI agent skills, which call the SageMaker Python SDK, so you get the same capabilities. For more information about the agent skills, see Skills for Agents. All agents run on Amazon Bedrock through SageMaker, and you don't need to sign in or provide an API key.
| Agent | Where it runs | Requirements |
|---|---|---|
| SageMaker agent | Studio | The default agent. |
| Claude | A JupyterLab space that SageMaker AI creates for you | None. |
| Codex | A JupyterLab space that SageMaker AI creates for you | None. |
Sending your first prompt locks the conversation to the agent you selected. To use a different agent, start a new conversation.
Start a conversation
In a project, a new conversation opens with the heading What do you want to build or improve? Enter a description in the prompt box, or use a starter prompt. To open another conversation in a project, choose New conversation.
You can use starter prompts in a project's new conversation and on the home page. Both offer the same five categories:
Set a baseline
Prepare data
Evaluate models
Customize a model
Deploy and improve
In a project's new conversation, open Starter prompts. The menu has one submenu for each category. Choose a category, and then choose a prompt. The prompt appears in the prompt box, where you can edit it before you choose Send.
On the home page, each category has its own button under the prompt box. Choose a category button, and then choose a prompt. The prompt appears in the prompt box, where you can edit it. When you point at a prompt in either menu, the prompt box shows a preview.
If you don't have any projects yet, the home page also shows a Get started list. The list has one row for each category. Choose a row to start a project right away with the first prompt of that category.
Each prompt asks you a few questions about your use case.
Choose a model and effort
Different models and effort levels affect response quality, speed, and cost, so choose the combination that fits your task. Use the picker beside the prompt box to choose the model and the effort the agent uses. A model that you can't select shows the reason beside it:
Not allowed by your IAM policy – Your execution role doesn't allow the model. Ask your administrator to update the policy.
Not available for your account – Your account doesn't have the model enabled.
If your role doesn't allow any of the agent's models, an alert appears above the prompt box. After your administrator updates the policy, choose the retry action. If the agent can't use the model you chose, it switches to another model and tells you which one it uses.
The models in the picker depend on the agent, your account, and your AWS Region. The picker lists the models that the agent supports and that are active in your Region. Each model offers its own effort levels. If a new model doesn't offer the effort you chose, the effort changes to that model's default.
Approve agent actions
The agent proposes each step. It asks before it creates resources or starts jobs that cost money, such as training or deployment. Under Permission mode, choose how it handles tools:
Manual – The agent asks for your permission before it uses a tool.
Auto – The agent uses tools without asking first.
When the agent asks, a card shows what it wants to run. Choose to allow or reject it once. You can also choose Trust all to let the agent run every tool for the rest of the conversation without asking.
If your project has a startup script, the agent asks before its first action in the space. A card with the heading Run your startup script? shows the script so that you can read it first. Choose Run startup.sh to run it, or Skip to continue without it. The script runs in the background while you keep working. If you skip it, the agent asks you again the next time the space starts.
Stop the agent
To stop the agent while it works, choose Stop in the prompt box. The chat shows Stopping the agent until the agent has ended its turn. You can then send a new message to change direction. You can also reject a permission request and tell the agent what to do instead.
Stop ends the agent's current turn. Jobs that the agent already started, such as training or evaluation, keep running. To stop a training job, processing job, tuning job, or pipeline execution, choose Stop on its card in the chat. Then confirm in the dialog box. You can also stop a job from its page in the SageMaker AI console.
Where third-party agents run
Third-party agents run in a JupyterLab space that SageMaker AI creates for you, and SageMaker AI bills you for it while it runs. When you open a conversation with a third-party agent, the chat shows Starting your agent until the space is ready.
Rate a response
Under a response, choose Helpful or Not helpful. If you choose Not helpful, you can add details in the optional Tell us more form. Select Harmful, Incomplete, Inaccurate, or Other. You can also add notes of up to 1,000 characters.
What you might see
<Agent> isn't available – The selected agent isn't available yet. Start a new conversation with another agent, or try again later.
Starting your agent – The space is still starting. Wait for it to finish.
Your IAM policy doesn't allow any models or No models are available – Update the execution role, then choose the retry action.
<Agent> needs an execution role, and none was found on your user profile or domain. – Add an execution role to your user profile, or set a default execution role for the domain. The agent uses the role from your user profile first, or the default execution role of the domain.
<Agent> needs your storage location, and it couldn't be found. – The agent needs your storage location. The storage location is in your SageMaker default Amazon Simple Storage Service (Amazon S3) bucket. Ask your administrator to confirm that you can read your domain and user profile in your Region.
Your agent couldn't start – An unexpected error stopped the agent from starting. Choose Retry to try again.
If a role or storage location is missing, ask your administrator to attach the AmazonSageMakerAICoreAccess managed policy.
Agent sandboxes
Each conversation with an agent runs in its own sandbox, an isolated environment where the agent runs code and tools for you. A sandbox shuts down automatically after 2 hours without activity and starts again when you return to the conversation. Your conversation history is always kept.
You can't currently shut down or delete a sandbox yourself.
What is kept after shutdown
What a sandbox keeps after it shuts down depends on the agent:
-
SageMaker agent – The sandbox's storage is released. Files the agent saved to your project remain available.
-
Third-party agents – The sandbox's storage is kept for at least 30 days, so the agent can pick up where it left off when you return.
Regions and pricing
For Regions and pricing, see Availability and pricing.
Next steps
For more information about following work that the agent starts, see Project activity in SageMaker AI optimizer.
For more information about the agent skills that third-party agents use, see Skills for Agents.