# data

Canonical URL: https://developers.iagenify.com/sdk/ref/assistant-session/data/
Language: en

`assistant.data → object`

The session's configuration as a plain object: what to store, what to log, what to hand to a page.

Status: a property, not a call · no network · a snapshot

## What it holds {#shape}

```javascript
assistant.data;
// {
//   id, model, settings, schema, memory,
//   title, createdAt, updatedAt
// }
```

The same values that sit on the object itself, gathered into one. Reading it touches nothing — there is no request, and no cost.

## Why it exists {#why}

Because the object carries methods and a client, and most of the time what you want is the part you can store, send or print.

```javascript
// To your own database
await db.sessions.insert({ userId, ...assistant.data });

// To a page — nothing here is a secret
return Response.json({ session: assistant.data });

// To a log that stays readable
console.log("session", assistant.data.id, assistant.data.model);
```

> **There is no key and no token in it**
>
> It is configuration and identifiers. That is what makes it safe to send to an interface — unlike the client that produced it.

## It is a snapshot, not a live view {#snapshot}

The values are what the SDK was told when the session was opened or fetched. Generating does not refresh them in place — `title` and `updatedAt` move on the server while your copy stays as it was.

```javascript
const assistant = await api.models.create({ model: "gemini-3.5-flash" });
assistant.data.title;        // ""

await assistant.generate({ inputs: [{ type: "text", content: "Résume ce contrat." }] });
assistant.data.title;        // still "" — your copy did not move

const fresh = await api.models.get(assistant.id);
fresh.data.title;            // "Résume ce contrat."
```

> **Re-read before you display it**
>
> A list built from handles held in memory shows stale titles and dates. Build it from api.models.list(), or fetch the session again — both are free.

## Comparing two sessions {#equality}

Compare by `id`. Two handles to the same conversation are the same conversation, whatever else differs between the two snapshots.

- [api.models.list()](/sdk/ref/models/list): The same fields, fresh from the server.
- [AssistantSession](/sdk/ref/assistant-session): The rest of what the object carries.

```python
assistant.data
# {
#   "id", "model", "settings", "schema", "memory",
#   "title", "createdAt", "updatedAt"
# }
```

```python
# To your own database
db.sessions.insert({"userId": user_id, **assistant.data})

# To a page — nothing here is a secret (Flask)
return jsonify(session=assistant.data)

# To a log that stays readable
print("session", assistant.data["id"], assistant.data["model"])
```

```python
assistant = api.models.create(model="gemini-3.5-flash")
assistant.data["title"]      # ""

assistant.generate(inputs=[{"type": "text", "content": "Résume ce contrat."}])
assistant.data["title"]      # still "" — your copy did not move

fresh = api.models.get(assistant.id)
fresh.data["title"]          # "Résume ce contrat."
```
