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

> ## Agent Instructions
> To act on Atlan objects, use the Atlan MCP server at https://api.atlan.com/mcp or the SDK. To install or publish skills from a terminal, use the `aireg` CLI; `aireg --map json` prints its command map. The `atlanai` CLI is deprecated. Run a read-only identity check before any write.
> The docs MCP server at /mcp searches these docs only. It cannot read or change Atlan objects.
> SDK packages: Python `atlanai` (PyPI) and TypeScript `@atlanai/sdk` (npm). Show Python first, then TypeScript.
> These docs cover Atlan Trident, Atlan's hosted product. AI Registry and Agent Registry are its earlier names. ai-registry is Atlan's open-source agent registry: the registry specification and its aireg CLI, with their own public repository, docs and release notes; /open-source on this site links them. ai-registry is open source; Atlan Trident is not. Answer generic aireg or specification questions from the project's docs, and use these docs for Atlan-specific setup such as the Atlan adapter, sign-in and workspaces.
> Atlan offers a second product, the Agentic Data Catalog: Atlan's enterprise context layer, covering the data catalog, connectors, lineage, data governance and glossary. It is documented at https://docs.atlan.com; answer questions about it from those docs, not these.

# Connect to Atlan Trident

> Confirm your credential reaches Atlan Trident, see which workspaces you can access, and view published Skills.

Atlan Trident is where your code publishes Skills, registers Agents, and
captures execution traces. Every interaction goes through the same HTTP API,
and every request carries a bearer credential that identifies your account.

In this lesson, you make your first contact with the Registry. Three read-only
calls confirm your credential is live and show what it can reach: the baseline
you return to whenever something later does not behave as expected.

> [!TIP]
>
> **At the end of this lesson:** your connection to Atlan Trident is verified.
> Your credential reaches the correct account, and you know which workspaces
> and Skills are visible to it.

> [!NOTE]
>
> **Preview.** Run the requests in an approved development environment before
> relying on them in production automation.

## Before you begin

Before you start, make sure you have:

* **Bearer credential**: An API key or token the Registry uses to identify your
  account. Request one through your organization's access process. See
  [Send bearer token](https://platform.atlan.com/api/how-tos/authentication.md). The next lesson creates an
  agent: if the Registry refuses your API key there with `403`, use a user
  token instead.
* **For the Python tab**: The SDK, installed with `pip install atlanai`. See
  [Install atlanai SDK](https://platform.atlan.com/tools/sdk/how-tos/install.md).

## Prepare your shell

The examples in this lesson read from two environment variables. Load your
token from an ignored local file (`.env.local`) or your organization's secret
manager, then set them:

```bash theme={null}
export ATLAN_GATEWAY_URL="https://api.atlan.com"
export ATLAN_TOKEN="<your-token>"
```

## Make your first reads

Run these three calls in order. Each one tells you something new about what
your credential can reach: who you are, where you can work, and what is
already there.

**1. Confirm your identity**

Your bearer credential is how the Registry knows who you are. Before
making any write, confirm it resolves to the expected account.

> [tab] Python
>
> The SDK client sends the token on every call and raises one error type,
> `AtlanAPIError`, with the documented problem fields. Every call in this
> lesson uses this client.
>
> ```python theme={null}
> import os
>
> from atlanai import AtlanClient
>
> client = AtlanClient(
>     os.environ["ATLAN_GATEWAY_URL"],
>     bearer_token=os.environ["ATLAN_TOKEN"],
> )
>
> identity = client.auth.whoami()
> print(identity)
> ```

> [tab] JavaScript
>
> This helper applies a timeout, checks the response content type, and
> surfaces the documented problem body on failure. Copy it into your
> project — every call in this lesson and the next uses it.
>
> ```js theme={null}
> export function createAtlanJsonClient({ gatewayUrl, token, timeoutMs = 10_000 }) {
>   return async function requestJson(path, init = {}) {
>     const headers = new Headers(init.headers);
>     headers.set("Authorization", `Bearer ${token}`);
>     if (init.body != null && !headers.has("Content-Type")) {
>       headers.set("Content-Type", "application/json");
>     }
>
>     const response = await fetch(new URL(path, gatewayUrl), {
>       ...init,
>       headers,
>       signal: init.signal ?? AbortSignal.timeout(timeoutMs),
>     });
>     const contentType = response.headers.get("content-type") ?? "";
>     const isJson = contentType.includes("application/json") ||
>       contentType.includes("application/problem+json");
>     const body = isJson ? await response.json() : await response.text();
>
>     if (!response.ok) {
>       const error = new Error(body?.detail ?? `Atlan API returned ${response.status}`);
>       error.status = response.status;
>       error.code = body?.code;
>       error.traceId = body?.trace_id;
>       throw error;
>     }
>     if (!isJson) throw new TypeError("Expected a JSON response");
>     return body;
>   };
> }
> ```
>
> Then confirm your identity:
>
> ```js theme={null}
> const atlan = createAtlanJsonClient({
>   gatewayUrl: process.env.ATLAN_GATEWAY_URL,
>   token: process.env.ATLAN_TOKEN,
> });
>
> const identity = await atlan("/registry/v1/auth/whoami");
> console.log(identity);
> ```

If the account shown is not what you expect, stop here. Check
your credential source before making any writes.

**2. List your workspaces**

The workspace ID is required for every write. This call shows which
workspaces your credential can access.

> [tab] Python
>
> ```python theme={null}
> workspaces = client.workspaces.list()
> print(workspaces)
> ```

> [tab] JavaScript
>
> ```js theme={null}
> const workspaces = await atlan("/registry/v1/workspaces?limit=20");
> console.log(workspaces);
> ```

Note the ID of the workspace where you plan to register your agent. You
use it in the next lesson.

**3. List published Skills**

See which Skills are already in the Registry before you publish your own.

> [tab] Python
>
> ```python theme={null}
> skills = client.skills.list(limit=20)
> print(skills)
> ```

> [tab] JavaScript
>
> ```js theme={null}
> const skills = await atlan("/skill/v1/skills?limit=20");
> console.log(skills);
> ```

An empty list is a successful read. It means no Skills are published yet
in this workspace.

**4. Verify results**

Confirm the identity is the expected account and the workspace list
includes the workspace where you plan to register your agent. An empty
Skills list is expected in a fresh workspace.

If any response is an error, see
[Errors and retries](https://platform.atlan.com/platform/references/errors-and-retries.md): error codes,
causes, and when to retry. Do not change a workspace ID or retry a write
until you understand the result.

## What you have accomplished

You confirmed your credential works, saw which identity it acts as, found the workspace you will use, and read its skills. Every later call uses the same base URL, credential, and workspace.

## What's next

[Register your first Agent](https://platform.atlan.com/api/tutorials/register-agent.md): create an agent
record in the Registry and get the ID you carry into every future session.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.