> ## Documentation Index
> Fetch the complete documentation index at: https://notte-experiment-visibility-md-links.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# observe

> Observes the current session page

**Observation Response:**

* a list of actions that can be taken on the page (e.g. click on a button, scroll, etc.)
* a screenshot of the page (base64 encoded)
* some metadata about the page (title, url, etc.)

```python theme={null}
# Observe the page
obs = session.observe()
# Select an action from the list of interactible elements on the page
actions = obs.space.interaction_actions
# display the action space as a string to be able to visualize it
print(obs.space.description)
# get the screenshot
screenshot = obs.screenshot.bytes()
```

Once you have selected an action (either manually or using an LLM), you can execute it with:

```python theme={null}
session.execute(action)
```

Note that by default, a very simple page perception is used to generate the action space (i.e `perception_type='fast'`) to make the query fast.
If you want a more powerful and LLM-ready action space, you can use:

```python theme={null}
obs = session.observe(perception_type='deep')
print(obs.space.description)
```

At the cost of a slower query since this uses an LLM call to format the interactive elements.

Additionally, you can use the `instructions` parameter to narrow down the action space to a specific intent on a website. This is useful if you want to quickly create a workflow using natural language:

```python theme={null}
_ = session.execute(type="goto", url="https://console.notte.cc")
actions = session.observe(instructions="Fill the email input")
print(actions[0].model_dump())
```

## Parameters

<ParamField path="min_nb_actions" type="int | None">
  The minimum number of actions to list before stopping. If not provided, the listing will continue until the maximum number of actions is reached.
</ParamField>

<ParamField path="max_nb_actions" type="int">
  The maximum number of actions to list after which the listing will stop. Used when min\_nb\_actions is not provided.
</ParamField>

<ParamField path="instructions" type="str | None">
  Additional instructions to use for the observation.
</ParamField>

<ParamField path="perception_type" type="typing.Optional[typing.Literal['fast', 'deep']]" />

## Returns

`UnionType`\[[`Observation`](/sdk-reference/misc/observation.md), `list`\[`Annotated`\[`UnionType`\[[`ClickAction`](/sdk-reference/misc/clickaction.md), [`FillAction`](/sdk-reference/misc/fillaction.md), [`MultiFactorFillAction`](/sdk-reference/misc/multifactorfillaction.md), [`FallbackFillAction`](/sdk-reference/misc/fallbackfillaction.md), [`CheckAction`](/sdk-reference/misc/checkaction.md), [`SelectDropdownOptionAction`](/sdk-reference/misc/selectdropdownoptionaction.md), [`UploadFileAction`](/sdk-reference/misc/uploadfileaction.md), [`DownloadFileAction`](/sdk-reference/misc/downloadfileaction.md)], `annotation=NoneType required=True discriminator='type'`]]]: The formatted observation result from the API response when no instructions provided.     list\[InteractionActionUnion]: The filtered list of actions when instructions is provided.
