SDK Reference
Agent + CUA
Agent entrypoints, execution model, and cloud session helpers used in agent workflows.
Cloud Session Helpers
getCloudSessionId(): string | null
Returns the active cloud session id after launch() in cloud mode.
getCloudSessionUrl(): string | null
Returns the cloud session URL for deep-linking after launch() in cloud mode.
Agent
agent(config: OpensteerAgentConfig): OpensteerAgentInstance
Create a Computer Use Agent (CUA) instance with ergonomic defaults.
const agent = opensteer.agent({
mode: 'cua',
model: 'openai/computer-use-preview',
})
const result = await agent.execute({
instruction: 'Open docs and summarize the first section',
maxSteps: 20,
highlightCursor: true,
})
- V1 supports
mode: 'cua'only. - Supported providers:
openai,anthropic,google. modelsupports either:"provider/model"string{ modelName: "provider/model", apiKey?, baseUrl?, organization?, thinkingBudget?, environment? }
agent.execute(instructionOrOptions): Promise<OpensteerAgentResult>
instructionOrOptions can be:
stringinstruction{ instruction: string, maxSteps?: number, highlightCursor?: boolean }
highlightCursor overrides the instance cursor setting for that execution:
true: force cursor preview on for this runfalse: force cursor preview off for this run- omitted: use instance cursor setting
Returns:
success,completed,message- executed
actions - token/inference
usage - resolved
providerandmodel
Covered Features
sdk:agentsdk:agent.executesdk:getCloudSessionIdsdk:getCloudSessionUrl
