Skip to main content
Navigate to a specific URL deterministically. Use this when you know exactly where you need to go, rather than asking the agent to navigate.

Usage

from smooth import SmoothClient

client = SmoothClient()

with client.session() as session:
    result = session.goto("https://example.com/products")
    print(f"Navigation took {result.duration} seconds")

    session.run_task("Click on the first product")

Request

url
string
required
The URL to navigate to.Example: https://example.com/login

Response

Returns an object with the following attributes.
credits_used
float
Always 0. Navigation is free.
duration
float
The duration in seconds taken to perform the navigation.

Examples

Navigate and extract data:
with client.session() as session:
    session.goto("https://news.ycombinator.com")

    stories = session.extract(
        schema={
            "type": "array",
            "items": {
                "type": "object",
                "properties": {
                    "title": {"type": "string"},
                    "url": {"type": "string"},
                    "points": {"type": "integer"}
                }
            }
        },
        prompt="Extract the top 5 stories"
    )

    for story in stories.output:
        print(f"{story['title']} ({story['points']} points)")