> ## 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 atlanai CLI; `atlanai --map json` prints its command map. 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.

# Operations reference

> Every management operation the SDK exposes, by resource, for Python and TypeScript.

The management client is generated from the gateway's contracts, so it covers
the whole published surface. This page explains how the client is organised.
Every operation is in the per-resource reference, one page per resource, for
example:

<CardGroup cols={2}>
  <Card title="Users" href="/tools/sdk/references/operations/users">18 operations</Card>
  <Card title="Agents" href="/tools/sdk/references/operations/agents">17 operations</Card>
  <Card title="Skills" href="/tools/sdk/references/operations/skills">16 operations</Card>
  <Card title="Experiments" href="/tools/sdk/references/operations/experiments">15 operations</Card>
  <Card title="Datasets" href="/tools/sdk/references/operations/datasets">14 operations</Card>
  <Card title="Harnesses" href="/tools/sdk/references/operations/harnesses">12 operations</Card>
  <Card title="Sessions" href="/tools/sdk/references/operations/sessions">11 operations</Card>
  <Card title="Outputs" href="/tools/sdk/references/operations/outputs">10 operations</Card>
  <Card title="Workspaces" href="/tools/sdk/references/operations/workspaces">10 operations</Card>
  <Card title="Evaluation guide" href="/tools/sdk/how-tos/evaluations">34 eval operations</Card>
</CardGroup>

Those pages are generated from the same operation manifest the SDKs ship, so
they cannot drift from what the client actually exposes. This page describes
the pattern once rather than repeating every operation by hand.

## How the client is organised

One namespace per **resource** — not per generated service — with the verb as
the method name: `client.agents.create(...)`, not
`client.agents.agent_create_agent(...)`. A resource can nest: `client.agents`
has a `sessions` and a `traces` sub-resource, reached as
`client.agents.sessions.list(agent_id)`.

<CodeGroup>
  ```python Python theme={null}
  from atlanai import AtlanClient

  client = AtlanClient(
      "https://api.atlan.com",
      bearer_token="...",
      workspace="workspace_01example",   # sent as X-Atlan-Workspace-Id
  )

  agent = client.agents.create({"name": "support-triage", "workspace_id": "workspace_01example"})
  page = client.agents.list(limit=10)
  one = client.agents.get(agent.id)
  client.agents.update(agent.id, {"instructions": "Be concise."})
  ```

  ```typescript TypeScript theme={null}
  import { AtlanClient } from "@atlanai/sdk";

  const client = new AtlanClient({
    gatewayOrigin: "https://api.atlan.com",
    bearerToken: "...",
    workspace: "workspace_01example",
  });

  const agent = await client.agents.create({ name: "support-triage", workspaceId: "workspace_01example" });
  const page = await client.agents.list({ limit: 10 });
  const one = await client.agents.get(agent.id);
  await client.agents.update(agent.id, { instructions: "Be concise." });
  ```
</CodeGroup>

Path parameters come first, positionally; the request body is last, as a plain
object. Method and resource names are `snake_case` in Python, `camelCase` in
TypeScript.

`with_workspace()` rebinds the whole client to another workspace over the same
generated clients, so a multi-tenant process does not need a second client:

```python theme={null}
other = client.with_workspace("workspace_01other")
```

## Resources you reach most

| Resource | Covers | Reference |
| - | - | - |
| `agents` | Register, read, list, search, update, archive; sub-resources `sessions` and `traces` | [Agents](/tools/sdk/references/operations/agents) |
| `sessions` | Record a run, append transcript messages, stream events | [Sessions](/tools/sdk/references/operations/sessions) |
| `skills` | Publish, list, search, update, archive; sub-resources `traces` and `versions` | [Skills](/tools/sdk/references/operations/skills) |
| `files` | The two-step upload-ticket flow, plus reading stored content | [Files](/tools/sdk/references/operations/files) |
| `workspaces` | Create and list the workspaces a credential can reach | [Workspaces](/tools/sdk/references/operations/workspaces) |
| `datasets`, `experiments`, `scorers` | Curate test cases, record runs and results, inspect their traces, and retain scored summaries | [Evaluations](/tools/sdk/how-tos/evaluations) |
| `auth` | `whoami()` — the cheapest way to confirm a credential and its scope before a write | [Auth](/tools/sdk/references/operations/auth) |

Content operations (file bytes, skill bundles) return the stored media type,
not JSON — check the content type before parsing or you will write a corrupt
file.

Prefer the [tracing SDK](/tools/sdk/how-tos/tracing) over building session records by hand.
Use `sessions`/`agents.sessions` directly only when the runtime cannot be
instrumented.

## Errors

Every generated exception — including the per-status subclasses — is normalised
to a single `AtlanAPIError` carrying the gateway's problem document, so you
handle a status and a stable code rather than parsing bodies:

<CodeGroup>
  ```python Python theme={null}
  from atlanai import AtlanAPIError

  try:
      client.skills.get_enriched("skill_01example")
  except AtlanAPIError as error:
      print(error.status, error.code, error.trace_id)
  ```

  ```typescript TypeScript theme={null}
  import { AtlanAPIError } from "@atlanai/sdk";

  try {
    await client.skills.getEnriched("skill_01example");
  } catch (error) {
    if (error instanceof AtlanAPIError) {
      console.log(error.status, error.code, error.traceId);
    }
  }
  ```
</CodeGroup>

The fields are `status`, `code`, `title`, `detail`, and the request's
`trace_id` / `traceId` — quote that trace ID when reporting a gateway problem.
`detail` is deliberately kept out of the exception message so an error that
reaches a log or a user-facing surface cannot carry a server-supplied string.

Catch `AtlanAPIError` and branch on `status` or `code`. You never need to catch
a per-status exception class.

Writes are **not** retried automatically. A retried create can duplicate an
artifact, so retry deliberately — see
[Errors and retries](/platform/references/errors-and-retries).

## Reaching an operation this page omits

Start with the [per-resource reference](/tools/sdk/references/operations/agents) — together those pages list all
213\. Beyond that, the operation manifest ships inside both packages and is the
canonical inventory, so you can enumerate the surface at runtime:

<CodeGroup>
  ```python Python theme={null}
  from atlanai import operations

  for operation in operations():
      print(operation["operation_id"], operation["method"], operation["path"])
  ```

  ```typescript TypeScript theme={null}
  import { operations } from "@atlanai/sdk";

  // A frozen array in TypeScript; `operations()` is a function in Python.
  for (const operation of operations) {
    console.log(operation.operation_id, operation.method, operation.path);
  }
  ```
</CodeGroup>

The underlying generated clients also sit under `client.raw.<service>.apis`,
keyed by the contract's service name (`agent`, `skill`, `file`, `mcp`, `model`,
`api`, `otel`, `registry`, `secret`, `eval`) rather than by resource, when you want a
generated signature rather than the facade's forwarded call.

## Next steps

<CardGroup cols={2}>
  <Card title="Agents cookbook" icon="robot" href="/cookbooks/how-tos/agents">
    Register an agent, attach tools and files, record a run.
  </Card>

  <Card title="Skills cookbook" icon="files" href="/cookbooks/how-tos/skills">
    Publish, retrieve and inspect skills.
  </Card>

  <Card title="Tracing" icon="diagram-project" href="/tools/sdk/how-tos/tracing">
    Spans, cost, scores and Visitor identity.
  </Card>

  <Card title="API reference" icon="globe" href="/api/references/api-reference">
    The underlying HTTP contract.
  </Card>
</CardGroup>
