---
title: The NOLGIA Agent
eyebrow: Agent
description: "What the NOLGIA Agent is, how one turn differs from one model call, and how to run your first turn."
---

# The NOLGIA Agent

A model API call makes one thing: you pick the model, write the prompt, submit the job and collect the file. The NOLGIA Agent does the picking. You describe what you want, and it plans the work, chooses the models, writes the prompts, submits the generations, looks at what came back, and keeps going until the work is done or it needs an answer from you.

![A conversation with the NOLGIA Agent and the Outputs it creates](../assets/art/agent.jpg)

Everything it makes lands in the same Library as work you generate yourself, under the same credits, the same organization context and the same file access rules. It is another way into the platform, not a separate one.

## A turn, not a request

![An agent turn: message, events stream, optional steer or interrupt, reply](../assets/diagrams/agent-turn.svg)

One message and everything the agent does to answer it is a **turn**. A turn can run for many minutes and submit many generations; it is asynchronous from the start, so you submit a message and then follow it rather than holding a request open. While it runs you can stream its steps, steer it with another message, or stop it.

Turns live in **sessions**. A session keeps its transcript and the media its turns produced together, so a conversation can be resumed and its Outputs collected later. [The Agent Sessions API](./agent-api.html) is the full contract: sessions, messages, streaming, steering, interrupts, assets and errors.

## What it can do

The agent's skills are **abilities**: installed packages that teach it a job, from product photography to long-form video. Every agent is provisioned with a core set and you can install more from the marketplace, pin one to a version, and see what is installed. See [Abilities](./abilities.html).

It reaches the platform with its own credential, so the work it does is attributed to it, and `GET /agent/usage` reports what it spent on your behalf.

## Where it runs

Each account gets one agent of its own, with its own configuration and its own long-term memory, separate from every other account's. You provision it, configure the environment it runs with, read its desired state, and take it down again. See [The operator model](./operator.html).

## Run your first turn

Provision the agent once, create a session, send a message, then poll the reply until it leaves `pending`.

```bash tab="curl"
$ curl -sS -X POST https://api.nolgia.ai/v1/agent \
  -H "Authorization: Bearer $NOLGIA_TOKEN"
$ curl -sS https://api.nolgia.ai/v1/agent/sessions \
  -H "Authorization: Bearer $NOLGIA_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{"name":"First session"}'
$ export SESSION_ID=<id from the response>
$ curl -sS https://api.nolgia.ai/v1/agent/messages \
  -H "Authorization: Bearer $NOLGIA_TOKEN" \
  -H 'Content-Type: application/json' \
  -d "{\"session_id\":\"$SESSION_ID\",\"content\":\"Make me a 5 second clip of a paper boat on a puddle.\"}"
$ export MESSAGE_ID=<agent_message_id from the response>
$ curl -sS "https://api.nolgia.ai/v1/agent/messages/$MESSAGE_ID" \
  -H "Authorization: Bearer $NOLGIA_TOKEN"
```

Provisioning is asynchronous: `POST /agent` answers `201` immediately, and the agent reports `chat_connected` once it is reachable. A turn sent before that point does not wait for it, so read `GET /agent` first: the reply comes back `failed`, saying the chat endpoint is not connected yet.

When the reply reaches `complete`, read its `content`, and collect what the turn made with `GET /agent/sessions/{id}/assets`.

> [!NOTE]
> Provisioning needs a Studio, Team or Enterprise subscription, and every turn costs credits. [Access and pricing](./agent-access.html) has both.

:::cards
- [Access and pricing](./agent-access.html) icon=spot-credits: Which plans can run an agent, what a turn costs, and how to choose its brain.
- [Agent Sessions API](./agent-api.html) icon=spot-agent: Sessions, messages, streaming, steering and assets in full.
- [Abilities](./abilities.html) icon=spot-library: Browse, install and pin what your agent can do.
- [The operator model](./operator.html) icon=spot-terminal: Provision, configure and observe the agent itself.
:::
