Remote Agent
Remote Session API
The core session methods available under RemoteAgent and their capability boundaries
Remote Session API
After you obtain a session from RemoteAgent, the most common methods are:
getInfo()prompt()subscribe()history()system()fork()
These APIs stay intentionally close to the local session surface so you can reuse nearly the same mental model across local and remote modes.
Get a session
const session = await agent.createSession();To continue an existing remote conversation:
const session = await agent.getSession("repo-analysis");That lets you switch to a known remote session instead of always starting over.
Prompt a turn
const turn = await session.prompt({ query: "Continue" });
await turn.finished;Subscribe to future events
const unsubscribe = session.subscribe((event) => {
console.log(event);
});
unsubscribe();Message history
const history = await session.history({
limit: 50,
});System prompts
const system = await session.system();Fork
const next = await session.fork();