From 8065308dfe40b53347f5ed447cc1522212d0a59a Mon Sep 17 00:00:00 2001 From: Shahriar Tajbakhsh Date: Sun, 17 Aug 2025 21:13:16 +0100 Subject: [PATCH] Fix syntax in Python example for running an agent --- docs/reference/agent.mdx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/reference/agent.mdx b/docs/reference/agent.mdx index 998ae5a7b..7588e635d 100644 --- a/docs/reference/agent.mdx +++ b/docs/reference/agent.mdx @@ -42,18 +42,18 @@ await agent.execute({ ```python Python # For Computer Use Agent (CUA) models -agent = stagehand.agent({ +agent = stagehand.agent( model="computer-use-preview", instructions="You are a helpful assistant that can use a web browser.", options={ "apiKey": os.getenv("OPENAI_API_KEY"), }, -}) +) # You can define additional options like max_steps and auto_screenshot result = await agent.execute({ - instruction="Sign me up for a library card", - max_steps=20 + "instruction": "Sign me up for a library card", + "max_steps": 20 }) ```