# get()

Canonical URL: https://developers.iagenify.com/sdk/ref/agents/get/
Language: en

`api.agents.get(id, options) → LocalAgent`

Reopen a session by its identifier. The model comes from the session; everything else you pass applies to this run.

Status: no request · model from the session · machine still required

```javascript
const pc = await api.storage.get();
const agent = api.agents.get("6704f1c2a9b3d4e5f6a7b8c9", { machine: pc });

await agent.run({ message: "Carry on where we left off." });
```

| Name | Type | Requirement | Description |
| --- | --- | --- | --- |
| `id` | string | required | A session identifier, from [list()](/sdk/ref/agents/list) or from `agent.id`. |
| `options` | object |  | The same options as [create()](/sdk/ref/agents/create). `runtime: "local"` and `memory` are implied. |

## What comes back into the conversation {#what-returns}

| Reopened on | You get |
| --- | --- |
| The device that ran it | Everything: the messages, the tool calls **and their results**, the todo list, the compacted state. |
| Another device | The messages and which tools were used — not what they returned. |

The conversation is read when the first run starts, not when the object is built — so nothing is fetched until you use it.

## The machine is still yours to pass {#machine}

> **A session does not carry its workspace**
>
> Reopening on a different machine gives you the conversation, not the files it refers to. Paths in the history may point at something else entirely — honest behaviour, but yours to account for.

## Options are not part of a session {#options-not-stored}

Mode, budget, tools, callbacks and permissions already granted are all per run. Reopening starts from your options, with nothing remembered from the earlier one.

## Reading without running {#reading}

```javascript
const messages = await agent.getHistory();
const points = await agent.checkpoints();
```

Both open the session on their own, so an interface can show a conversation and its checkpoints without starting anything.

- [list()](/sdk/ref/agents/list): Finding the identifier.
- [Resuming](/sdk/agent/sessions/resuming): What comes back from where.
- [LocalAgent](/sdk/ref/local-agent): Every property and method.

```python
pc = api.storage.get()
agent = api.agents.get("6704f1c2a9b3d4e5f6a7b8c9", machine=pc)

agent.run(message="Carry on where we left off.")
```

```python
messages = agent.get_history()
points = agent.checkpoints()
```
