Skip to main content
You can call Atlas AI agents from the Cognite Python SDK or the Agents REST API to embed agents in your applications, automate workflows, and build custom user interfaces.
The Agents REST API is in beta release status. Python SDK coverage may lag the API and is subject to change.

Prerequisites

  • A deployed Atlas AI agent. See Building agents.
  • The agents:run and agents:read capabilities.
  • Python SDK version 7.80.3 or later:

Chatting with an agent

Send a message to an agent and read the response:

Continuing a conversation

Use the cursor from the previous response to continue the same conversation. You do not need to resend previous messages; the cursor maintains conversation state:

Handling tool confirmation

When an agent uses an integration tool (Call Function, Run Python code, or Call REST API), the response may include a tool confirmation request before the tool runs. This prevents the agent from performing destructive or unintended actions without your approval. The confirmation appears as a toolConfirmation action in the response. Your application must respond with ALLOW to proceed or DENY to cancel. In the Python SDK, response.action_calls is None when the response contains no actions, so check for it before you iterate over it.

The confirmation flow

1

Send a message that triggers a confirmation-required tool

Your message causes the agent to run an integration tool.
2

Receive a toolConfirmation action in the response

The response contains an action with type: "toolConfirmation" instead of the final result. It includes the tool name, arguments, and a human-readable description of what the tool will do.
3

Inspect and decide: ALLOW or DENY

Your application reviews the tool call details and sends back ALLOW to execute it or DENY to cancel it.
4

Receive the final response

The agent executes (or skips) the tool and returns the final result.

Example

Include the cursor from the confirmation response in your ALLOW or DENY request so the agent continues the same conversation.
Last modified on June 18, 2026