# Overview

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

The older agent, whose loop runs on the platform. It exists for the case where nothing of yours is running — which is what a workflow step is.

Status: no runtime option · 8 steps by default · tools are api.tools

`api.agents.create()` without `runtime` builds this one. You give it model sessions, storages and tool declarations; it streams steps back while the platform performs them.

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

const agent = api.agents.create({
  model: { main: writer },
  storages: [database],
  tools: { search: api.tools.search, query_storage: api.tools.queryStorage },
  maxSteps: 8,
  budget: 200,
});

const result = await agent.run({
  inputs: [{ type: "text", content: "Which customers churned last month?" }],
  onStep: (step) => console.log(step.tool, step.summary),
});
```

| Name | Type | Requirement | Description |
| --- | --- | --- | --- |
| `model` | object | required | A model session, or a named set: `{ main, image, video, voice, music }`. |
| `storages` | array | [] | [ConnectedStorage](/sdk/ref/connected-storage) objects this run may read. |
| `tools` | object | {} | [api.tools](/sdk/ref/tools) declarations, keyed by the name the model sees. |
| `outputs` | array | null | What the run should produce. |
| `maxSteps` | integer | 8 | Steps. |
| `budget` | integer|null | null | Credits. |

## Against the local engine {#versus}

|  | Local | Server-side |
| --- | --- | --- |
| The loop runs | in your process | on the platform |
| Tools | 35, on your machine | [api.tools](/sdk/ref/tools) declarations |
| Permission | your callback, per call | none — the tool set is the boundary |
| Sessions, checkpoints, skills | yes | no |
| Steps by default | 100 | 8 |
| Needs your process alive | yes | no |

> **Prefer the local engine when you have a process**
>
> This one has no permission callback, so the only boundary is which tools you declared and which storages you passed. That is a reasonable design for an unattended step; it is a poor one for an interactive agent.

## It can still reach your machine {#local-bridge}

The four document-writing declarations and the document readers are performed through the package, on the machine that holds the key: the run asks, your process does the work, the answer goes back. So it works only while your process is listening.

## It keeps its own history {#history}

Each `run()` appends the exchange to `agent.history`, and the next one sends it. Pass `history` explicitly to override, or `[]` to start fresh.

- [run()](/sdk/ref/agent/run): The call and its stream.
- [api.tools](/sdk/ref/tools): The declarations it takes.
- [agent.run](/sdk/workflows/steps/agent-run): The workflow step built on it.

```python
writer = api.models.create(model="gemini-3.5-flash")

agent = api.agents.create(
    model={"main": writer},
    storages=[database],
    tools={"search": api.tools.search, "query_storage": api.tools.query_storage},
    max_steps=8,
    budget=200,
)

result = agent.run(
    inputs=[{"type": "text", "content": "Which customers churned last month?"}],
    on_step=lambda step: print(step.get("tool"), step.get("summary")),
)
```
