@@ -33,7 +33,7 @@ const agent = stagehand.agent({
3333 integrations: [
3434 ` https://mcp.exa.ai/mcp?exaApiKey=${process .env .EXA_API_KEY } ` ,
3535 ],
36- instructions : ` You have access to web search through Exa. Use it to find current information before browsing. ` ,
36+ systemPrompt : ` You have access to web search through Exa. Use it to find current information before browsing. ` ,
3737 options: {
3838 apiKey: process .env .OPENAI_API_KEY ,
3939 },
@@ -68,7 +68,7 @@ const agent = stagehand.agent({
6868 provider: " openai" ,
6969 model: " computer-use-preview" ,
7070 integrations: [supabaseClient , notionClient ],
71- instructions : ` You can interact with Supabase databases and Notion. Use these tools to store and retrieve data. ` ,
71+ systemPrompt : ` You can interact with Supabase databases and Notion. Use these tools to store and retrieve data. ` ,
7272 options: {
7373 apiKey: process .env .OPENAI_API_KEY ,
7474 },
@@ -91,7 +91,7 @@ const agent = stagehand.agent({
9191 ` https://search-service.example.com/mcp?apiKey=${process .env .SEARCH_API_KEY } ` ,
9292 databaseClient
9393 ],
94- instructions : ` You have access to external tools for search and data storage. Use these tools strategically to complete tasks efficiently. `
94+ systemPrompt : ` You have access to external tools for search and data storage. Use these tools strategically to complete tasks efficiently. `
9595});
9696```
9797
@@ -144,7 +144,7 @@ Provide clear instructions about available tools:
144144<Tabs >
145145<Tab title = " Good Instructions" >
146146``` typescript
147- instructions : ` You have access to:
147+ systemPrompt : ` You have access to:
1481481. Web search tools - Use to find current information
1491492. Database tools - Use to store/retrieve data
1501503. Browser automation - Use for web interactions
@@ -156,7 +156,7 @@ Store important data for later reference.`
156156
157157<Tab title = " Poor Instructions" >
158158``` typescript
159- instructions : " You can search and save data."
159+ systemPrompt : " You can search and save data."
160160```
161161</Tab >
162162</Tabs >
@@ -221,7 +221,7 @@ try {
221221``` typescript
222222const agent = stagehand .agent ({
223223 integrations: [` https://mcp.exa.ai/mcp?exaApiKey=${process .env .EXA_API_KEY } ` ],
224- instructions : ` First search for current information, then use the browser to complete tasks based on what you find. `
224+ systemPrompt : ` First search for current information, then use the browser to complete tasks based on what you find. `
225225});
226226
227227await agent .execute (" Find the best laptop deals for 2025 and navigate to purchase the top recommendation" );
@@ -233,7 +233,7 @@ const supabaseClient = await connectToMCPServer(/* config */);
233233
234234const agent = stagehand .agent ({
235235 integrations: [supabaseClient ],
236- instructions : ` Extract data from websites and store it using available database tools. `
236+ systemPrompt : ` Extract data from websites and store it using available database tools. `
237237});
238238
239239await agent .execute (" Extract all restaurant information from this directory and save it to the database" );
@@ -246,7 +246,7 @@ const agent = stagehand.agent({
246246 ` https://mcp.exa.ai/mcp?exaApiKey=${process .env .EXA_API_KEY } ` ,
247247 supabaseClient
248248 ],
249- instructions : ` Use all available tools strategically: search for current info, browse websites, and store important data. `
249+ systemPrompt : ` Use all available tools strategically: search for current info, browse websites, and store important data. `
250250});
251251
252252await agent .execute (" Research competitor pricing, compare with our site, and store the analysis" );
0 commit comments