diff --git a/docs/src/docs.json b/docs/src/docs.json index 5ecf35c86..cc63ba034 100644 --- a/docs/src/docs.json +++ b/docs/src/docs.json @@ -149,6 +149,7 @@ "integrations/steel", "integrations/massive", "integrations/openai-cua", + "integrations/fireworks", "integrations/stagehand", "integrations/openclaw", "features/sessions/cloudflare-web-bot-auth" diff --git a/docs/src/integrations/fireworks.mdx b/docs/src/integrations/fireworks.mdx new file mode 100644 index 000000000..89ef4e087 --- /dev/null +++ b/docs/src/integrations/fireworks.mdx @@ -0,0 +1,55 @@ +--- +title: 'Fireworks AI' +description: 'Run Notte browser agents on Fireworks-served open-weight models' +--- +import FireworksBasic from '/snippets/integrations/fireworks_basic.mdx'; +import AgentMdNotice from '/partials/agent-md-notice.mdx'; + + + +[Fireworks AI](https://fireworks.ai) hosts open-weight LLMs including Kimi K2.5, GLM-5, and MiniMax M2.5. To run a Notte agent on any of them, pass the model string to `reasoning_model`. Notte talks to Fireworks through LiteLLM, so there's no extra provider setup. + +For numbers on how these models hold up across browser-agent workloads, see the joint benchmark, [Agents Don't Fail on Intelligence. They Fail on Execution](https://fireworks.ai/blog/agent-execution-tax). + +## Prerequisites + +- A Fireworks AI API key ([fireworks.ai](https://fireworks.ai)) +- Python 3.11 or later + +## Setup + +### 1. Install the SDK + +```bash +pip install --upgrade notte +``` + +### 2. Set your API key + +```bash +export FIREWORKS_API_KEY= +``` + +### 3. Run an agent on a Fireworks model + +Pass the model string (formatted as `fireworks_ai/accounts/fireworks/models/`) to `reasoning_model`: + + + +## Supported models + +Any Fireworks model with JSON-mode structured output works with Notte. Three were covered in the joint benchmark with Fireworks: + +- Kimi K2.5: `fireworks_ai/accounts/fireworks/models/kimi-k2p5` +- GLM-5: `fireworks_ai/accounts/fireworks/models/glm-5` +- MiniMax M2.5: `fireworks_ai/accounts/fireworks/models/minimax-m2p5` + +See the [Fireworks model catalogue](https://fireworks.ai/models) for everything else. + +## Resources + +- [Joint benchmark: Agents Don't Fail on Intelligence. They Fail on Execution](https://fireworks.ai/blog/agent-execution-tax) +- [Agent Execution Tax explainer](https://notte.cc/blog/agent-execution-tax) +- [Fireworks AI](https://fireworks.ai) and the [Fireworks model catalogue](https://fireworks.ai/models) +- [Browser Arena](https://browserarena.ai): Notte's open benchmark of cloud browser providers +- [Notte Console](https://console.notte.cc) diff --git a/docs/src/llms.txt b/docs/src/llms.txt index 706730431..31f6f849d 100644 --- a/docs/src/llms.txt +++ b/docs/src/llms.txt @@ -164,6 +164,7 @@ Full Quickstart: https://docs.notte.cc/quickstart.md - [Steel](https://docs.notte.cc/integrations/steel.md): Run Notte with Steel cloud browsers (CDP) - [Massive](https://docs.notte.cc/integrations/massive.md): Use Massive residential proxies with Notte sessions - [OpenAI CUA](https://docs.notte.cc/integrations/openai-cua.md): Integrate OpenAI CUA with Notte Browser Sessions +- [Fireworks AI](https://docs.notte.cc/integrations/fireworks.md): Run Notte browser agents on Fireworks-served open-weight models - [Stagehand](https://docs.notte.cc/integrations/stagehand.md): Use Notte cloud browsers with Stagehand browser automation - [OpenClaw](https://docs.notte.cc/integrations/openclaw.md): Use Notte cloud browsers with OpenClaw - [Cloudflare Web Bot Auth](https://docs.notte.cc/features/sessions/cloudflare-web-bot-auth.md): Access Cloudflare-protected websites by cryptographically signing browser requests diff --git a/docs/src/quickstart.mdx b/docs/src/quickstart.mdx index 8b72e0c95..0d188e8cc 100644 --- a/docs/src/quickstart.mdx +++ b/docs/src/quickstart.mdx @@ -223,7 +223,7 @@ Build reliable Python SDK automation scripts by authoring in a real browser firs "", "**Browser profiles:** Profiles store browser state such as cookies, `localStorage`, and `sessionStorage`. Start a session with `--profile-id ` to load that saved state; add `--profile-persist` when starting the session if changes should be saved back to the profile when the session closes.", "", - "Session debugging and export:", + "Session debugging:", "", "```bash", "# Get network logs", @@ -231,11 +231,49 @@ Build reliable Python SDK automation scripts by authoring in a real browser firs "", "# Get replay URL/data", "notte sessions replay", + "```", + "", + "Session export:", "", + "```bash", "# Export session steps as Python workflow code.", "# Use --session-id to export a specific session, including one that has been stopped.", - "notte sessions workflow-code", "notte sessions workflow-code --session-id ", + "", + "# example flow", + "notte sessions start", + "notte page goto news.ycombinator.com", + "notte page scrape --instructions \"Extract the top 10 stories from Hacker News. For each story return: rank, title, URL, points, author, number of comments\" -o json", + "notte sessions workflow-code", + "", + "# returns", + "from __future__ import annotations", + "", + "from notte_sdk import NotteClient", + "from pydantic import BaseModel", + "", + "class Story(BaseModel):", + " rank: int | None = None", + " title: str | None = None", + " url: str | None = None", + " points: int | None = None", + " author: str | None = None", + " number_of_comments: int | None = None", + "", + "", + "class Model(BaseModel):", + " stories: list[Story] | None = None", + "", + "client = NotteClient()", + "", + "def run() -> Model:", + " with client.Session(use_file_storage=True) as session:", + " _ = session.execute(type='goto', url='news.ycombinator.com')", + "", + " # directly parses the output using response_format and returns the Model", + " return session.scrape(instructions='Extract the top 10 stories from Hacker News. For each story return: rank, title, URL, points, author, number of comments', only_main_content=False, only_images=False, scrape_links=True, scrape_images=False, response_format=Model)", + "", + "run()", "```", "", "Cookie management:", @@ -1040,7 +1078,7 @@ Build reliable Python SDK automation scripts by authoring in a real browser firs **Browser profiles:** Profiles store browser state such as cookies, `localStorage`, and `sessionStorage`. Start a session with `--profile-id ` to load that saved state; add `--profile-persist` when starting the session if changes should be saved back to the profile when the session closes. - Session debugging and export: + Session debugging: ```bash # Get network logs @@ -1048,11 +1086,49 @@ Build reliable Python SDK automation scripts by authoring in a real browser firs # Get replay URL/data notte sessions replay + ``` + + Session export: + ```bash # Export session steps as Python workflow code. # Use --session-id to export a specific session, including one that has been stopped. - notte sessions workflow-code notte sessions workflow-code --session-id + + # example flow + notte sessions start + notte page goto news.ycombinator.com + notte page scrape --instructions "Extract the top 10 stories from Hacker News. For each story return: rank, title, URL, points, author, number of comments" -o json + notte sessions workflow-code + + # returns + from __future__ import annotations + + from notte_sdk import NotteClient + from pydantic import BaseModel + + class Story(BaseModel): + rank: int | None = None + title: str | None = None + url: str | None = None + points: int | None = None + author: str | None = None + number_of_comments: int | None = None + + + class Model(BaseModel): + stories: list[Story] | None = None + + client = NotteClient() + + def run() -> Model: + with client.Session(use_file_storage=True) as session: + _ = session.execute(type='goto', url='news.ycombinator.com') + + # directly parses the output using response_format and returns the Model + return session.scrape(instructions='Extract the top 10 stories from Hacker News. For each story return: rank, title, URL, points, author, number of comments', only_main_content=False, only_images=False, scrape_links=True, scrape_images=False, response_format=Model) + + run() ``` Cookie management: @@ -1838,7 +1914,7 @@ notte sessions list [--page N] [--page-size N] [--only-active] **Browser profiles:** Profiles store browser state such as cookies, `localStorage`, and `sessionStorage`. Start a session with `--profile-id ` to load that saved state; add `--profile-persist` when starting the session if changes should be saved back to the profile when the session closes. -Session debugging and export: +Session debugging: ```bash # Get network logs @@ -1846,11 +1922,49 @@ notte sessions network # Get replay URL/data notte sessions replay +``` +Session export: + +```bash # Export session steps as Python workflow code. # Use --session-id to export a specific session, including one that has been stopped. -notte sessions workflow-code notte sessions workflow-code --session-id + +# example flow +notte sessions start +notte page goto news.ycombinator.com +notte page scrape --instructions "Extract the top 10 stories from Hacker News. For each story return: rank, title, URL, points, author, number of comments" -o json +notte sessions workflow-code + +# returns +from __future__ import annotations + +from notte_sdk import NotteClient +from pydantic import BaseModel + +class Story(BaseModel): + rank: int | None = None + title: str | None = None + url: str | None = None + points: int | None = None + author: str | None = None + number_of_comments: int | None = None + + +class Model(BaseModel): + stories: list[Story] | None = None + +client = NotteClient() + +def run() -> Model: + with client.Session(use_file_storage=True) as session: + _ = session.execute(type='goto', url='news.ycombinator.com') + + # directly parses the output using response_format and returns the Model + return session.scrape(instructions='Extract the top 10 stories from Hacker News. For each story return: rank, title, URL, points, author, number of comments', only_main_content=False, only_images=False, scrape_links=True, scrape_images=False, response_format=Model) + +run() ``` Cookie management: diff --git a/docs/src/snippets/integrations/fireworks_basic.mdx b/docs/src/snippets/integrations/fireworks_basic.mdx new file mode 100644 index 000000000..fed8562e9 --- /dev/null +++ b/docs/src/snippets/integrations/fireworks_basic.mdx @@ -0,0 +1,13 @@ +{/* Auto-generated mdx file. Do not edit! */} +{/* @sniptest testers/integrations/fireworks_basic.py */} + +```python fireworks_basic.py +import notte + +with notte.Session() as session: + agent = notte.Agent( + session=session, + reasoning_model="fireworks_ai/accounts/fireworks/models/kimi-k2p5", + ) + response = agent.run(task="Go to news.ycombinator.com and return the top three stories.") +``` diff --git a/docs/src/testers/integrations/fireworks_basic.py b/docs/src/testers/integrations/fireworks_basic.py new file mode 100644 index 000000000..71842806e --- /dev/null +++ b/docs/src/testers/integrations/fireworks_basic.py @@ -0,0 +1,9 @@ +# @sniptest filename=fireworks_basic.py +import notte + +with notte.Session() as session: + agent = notte.Agent( + session=session, + reasoning_model="fireworks_ai/accounts/fireworks/models/kimi-k2p5", + ) + response = agent.run(task="Go to news.ycombinator.com and return the top three stories.")