Skip to main content
Agent is the core AI controller. It takes screenshots of the virtual desktop, interprets the screen using a vision-language model, and performs actions like clicking, typing, and navigating.
from nen import Agent
from pydantic import BaseModel

class Params(BaseModel):
    ...

class Result(BaseModel):
    ...

def run(params: Params) -> Result:
    agent = Agent()
    ...

Constructor

Agent(model: str | None = None)
def run(params: Params) -> Result:
    agent = Agent()                                     # Platform default
    agent = Agent(model="claude-haiku-4-5-20251001")    # Pin to a specific model
ParameterTypeDefaultDescription
modelstr | NoneNoneDefault VLM for all calls on this agent. When None, the SDK sends no model override and the platform picks server-side. See Models for the full list of accepted values.

Methods

MethodDescription
execute()Perform an action on screen via natural language
verify()Check whether a visual condition is true
extract()Read structured data from the current screen