diff --git a/packages/docs/v2/basics/agent.mdx b/packages/docs/v2/basics/agent.mdx index cb4cc9966..4383fb6f5 100644 --- a/packages/docs/v2/basics/agent.mdx +++ b/packages/docs/v2/basics/agent.mdx @@ -46,14 +46,13 @@ await agent.execute("apply for a job at Browserbase") ``` ```python Python -agent = stagehand.agent({ - "provider": "anthropic", - "model": "claude-sonnet-4-20250514", - "instructions": "You are a helpful assistant that can use a web browser.", - "options": { - "apiKey": os.getenv("ANTHROPIC_API_KEY"), +agent = stagehand.agent( + model="claude-sonnet-4-20250514", + instructions="You are a helpful assistant that can use a web browser.", + options={ + "api_key": os.getenv("ANTHROPIC_API_KEY"), }, -}) +) await agent.execute("apply for a job at Browserbase") ``` diff --git a/packages/docs/v2/references/agent.mdx b/packages/docs/v2/references/agent.mdx index 823470106..c5e8a4782 100644 --- a/packages/docs/v2/references/agent.mdx +++ b/packages/docs/v2/references/agent.mdx @@ -44,11 +44,11 @@ interface AgentInstance { ```python # Create agent instance -agent = stagehand.agent({ - "model": str, - "instructions": str = None, - "options": Dict[str, Any] = None -}) +agent = stagehand.agent( + model: str, + instructions: str = None, + options: Dict[str, Any] = None +) ```