> For the complete documentation index, see [llms.txt](https://docs.unbrowse.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.unbrowse.ai/for-agents/resolve-and-execute.md).

# Hole Contract and Legacy Route View

The current Unbrowse contract is one typed-hole request. The caller supplies an intent and optional context; the runtime descends through the graph, adapters, browser capture, cookies, HAR, and indexing as needed.

```ts
import { createHole } from "unbrowse/sdk";

const hole = createHole();
const result = await hole.fill({
  intent: "latest releases from this repository",
  url: "https://github.com/unbrowse-ai/unbrowse",
});
```

From a shell, call the same contract as:

```bash
unbrowse "latest releases from unbrowse-ai/unbrowse"
unbrowse "latest releases from this repository" --url "https://github.com/unbrowse-ai/unbrowse"
```

The machine-readable shape is:

```bash
unbrowse contract surface
```

## Why the old route view still exists

`resolve` and `execute` are the compatibility decomposition of the same contract. They are useful when you are inspecting the route graph, debugging a bad endpoint, or integrating with an older MCP host that cannot call the hole directly.

In that view:

* `resolve` searches local/server contracts and returns candidate endpoints with evidence.
* The agent or debugger judges which candidate matches the intent.
* `execute` runs the selected endpoint with params and projection.
* `feedback` records whether the selected route satisfied the intent.

This is deliberately no longer the default training path for agents. The dogfood failure mode was obvious: agents guessed CLI verbs and flags instead of submitting one intent-shaped gap. New integrations should call the hole and let the runtime pick the descent.

## When to use it

Use the route view for:

* endpoint inspection
* regression diagnosis
* manual replay of a known contract
* old MCP/tool hosts

Do not use it as the default user-task loop. For user tasks, use bare `unbrowse "task"` or the SDK hole.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.unbrowse.ai/for-agents/resolve-and-execute.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
