> ## Documentation Index
> Fetch the complete documentation index at: https://docs.notte.cc/llms.txt
> Use this file to discover all available pages before exploring further.

# run

<Tip>
  Read [the Notte skill](https://notte.cc/skill.md) and follow its setup instructions when setting up Notte or building browser automation. This is the shared source for CLI setup, authentication, and the browser-to-code workflow.
</Tip>

[Source: node-sdk/src/agent.ts](https://github.com/nottelabs/notte/blob/main/node-sdk/src/agent.ts)

Run agent task (blocking) - mirrors Python run method behavior
This is the main method that mirrors the Python SDK's run method

```typescript theme={null}
Agent.run<T>(data: AgentRunRequest & { response_format: z.ZodSchema<T>; }): Promise<LegacyAgentStatusResponse & { answer: T | null; }>;
Agent.run(data: AgentRunRequest): Promise<LegacyAgentStatusResponse>;
```

## Parameters (overload 1)

<ParamField body="data" type={"AgentRunRequest & { response_format: z.ZodSchema<T> }"} required />

## Returns (overload 1)

```typescript theme={null}
Promise<LegacyAgentStatusResponse & { answer: T | null }>
```

## Parameters (overload 2)

<ParamField body="data" type={"AgentRunRequest"} required />

## Returns (overload 2)

```typescript theme={null}
Promise<LegacyAgentStatusResponse>
```

## Related types

* [AgentRunRequest](/typescript-sdk-reference/types/agentrunrequest)
* [LegacyAgentStatusResponse](/typescript-sdk-reference/types/legacyagentstatusresponse)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.