| Member | Does | Costs |
|---|---|---|
| create(options) | Builds an agent. No request. | nothing |
| get(id, options) | Reopens a session. | nothing until it runs |
| list({ limit }) | The account's sessions, newest first. | nothing |
| skills | The skill library — account and this computer. | nothing |
| subagents | The subagent library. | nothing |
const pc = await api.storage.get();
const agent = api.agents.create({
runtime: "local",
machine: pc,
model: "gemini-3.5-flash",
mode: "ask",
memory: true,
onPermission: async ({ category }) => (category === "exec" ? "deny" : "once"),
});
const result = await agent.run({ message: "Summarise what changed this week." });pc = api.storage.get()
agent = api.agents.create(
runtime="local",
machine=pc,
model="gemini-3.5-flash",
mode="ask",
memory=True,
on_permission=lambda request: "deny" if request["category"] == "exec" else "once",
)
result = agent.run(message="Summarise what changed this week.")Two engines behind one method
| create() | Builds | The loop runs |
|---|---|---|
runtime: "local" | LocalAgent | In your process |
no runtime | Agent | On the platform |
Reach for the local engine whenever you have a process
It has the larger tool set, the permission callback, checkpoints, sessions, skills and subagents. The server-side one exists for the case where nothing of yours is running — which is what a workflow step is.
Creating costs nothing
create() validates its options and builds an object. No request is made, no session is written, no credit is spent — the first run() is what starts anything.
The validation is strict and immediate, so a mistyped option fails where you wrote it rather than mid-task.