api.agents

get()

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

Reapre una sessione per identificatori. Il modele viene da sessione; tutto il resto che passate vale a esta run.

no requestmodel from the sessionmachine still required
Using Python?

Switch any code block to Python: the choice applies to every page. Python SDK guide and resource reference.

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

await agent.run({ message: "Carry on where we left off." });
pc = api.storage.get()
agent = api.agents.get("6704f1c2a9b3d4e5f6a7b8c9", machine=pc)

agent.run(message="Carry on where we left off.")
idstringobrigatório

Un identificator di sessione, da list() o da agent.id.

optionsobject

Le stesse opzions ca create(). runtime: "local" e memorysono implícitas.

Cenès retorna a conversa

Reaberto alTu obte
Il dispositivo che l'ha runtTutto: i messaggi, l'outil chiama e i loro risultati, la lista toto, l'estat compactat.
Un altro dispositivoI messaggi e quali utensilissè usat — non quello che ritornè.

La conversazione è letta quando la prima run start, non quando l'ogget è costruito — quindi nulla è recuperat fino a che l'usi.

La macchina è ancora tua per passar

Una sessione non porta il suo spazio di lavoro

Reaprendo su una macchina diferente ti da la conversa, non i files a cui se refere. Sentis in history puès indicar a algo completamente opaco — comportament honest, ma il tuo a contabilit.

Opţiunis non fanno parte di una sessione

Modo, budget, utensili, callbacks e permisses già concese sono totes per run. Reapertura parte da tuas opcions, con nulla ricordat del anteriore.

Lectura senza correre

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

Ambas apriu la sessione da soli, per cui una interface puès mostrar una conversazione e i suoi punti de control senza cominciar ningun.