Goal-based action suggestions. Observe the page and get recommended next steps for achieving a goal.
bap plan
Observe the current page and get AI-suggested actions for achieving a goal. Useful for autonomous agents that need to decide what to do next.
Usage
bap plan "login to the site"
bap plan "search for products" --max=5
bap plan "fill out the checkout form" --format=json
string
required
A natural language description of what you want to accomplish.
number
default:"10"
Maximum number of suggestions to return.
Output
Plan for: "login to the site"Page: https://app.example.com/loginElements: 8 interactiveSuggested actions: 1. Fill the email field with your username (85% match) 2. Fill the password field with your password (85% match) 3. Click the "Sign in" button to submit (90% match) 4. Click "Forgot password?" if needed (20% match)Use bap act to execute actions, or bap observe for full element list
Each suggestion includes:
Description — What the action does
Method — The BAP protocol method to call
Relevance — How relevant the action is to the stated goal (0-100%)
bap plan analyzes the current page state and matches interactive elements against your goal. It
does not execute any actions — it only suggests them.
JSON Output
With --format=json, the output includes full structured data:
Use bap plan as a decision-making step in autonomous agent loops. It observes the page and ranks
possible actions by relevance to your goal, so the agent can pick the best next step.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"BAP Docs","colors":{"primary":"#1a1a1a","light":"#f5f5f5","dark":"#1a1a1a"},"logo":{"light":"https://mintcdn.com/piyushvyas/SAjWCSGGjcR0-kMU/logo/light.svg?fit=max\u0026auto=format\u0026n=SAjWCSGGjcR0-kMU\u0026q=85\u0026s=b3a82ba997e99c772bcd297add5a163d","dark":"https://mintcdn.com/piyushvyas/SAjWCSGGjcR0-kMU/logo/dark.svg?fit=max\u0026auto=format\u0026n=SAjWCSGGjcR0-kMU\u0026q=85\u0026s=f4969f383b5e6fdef8314cb987808b2e"},"favicon":"/favicon.svg","navbar":{"links":[{"href":"https://github.com/browseragentprotocol/bap","label":"GitHub"}],"primary":{"type":"button","label":"Get Started","href":"/getting-started/overview"}},"footer":{"socials":{"github":"https://github.com/browseragentprotocol/bap"}},"styling":{"latex":false},"navigation":{"global":{"anchors":[{"anchor":"GitHub","icon":"github","href":"https://github.com/browseragentprotocol/bap"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"piyushvyas","hasAudioNarration":false,"actualSubdomain":"piyushvyas","customDomains":[],"gitSource":{"type":"github","owner":"browseragentprotocol","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":""},"entitlements":{},"buildId":"6ae94a93b9c52538cea1a305:success","clientVersion":"0.0.4286","searchFilterCounts":[{"language":"default","tag":"Documentation","count":25},{"language":"default","tag":"Protocol","count":15},{"language":"default","tag":"CLI Reference","count":13},{"language":"default","tag":"Core Concepts","count":8},{"language":"default","tag":"Guides","count":7},{"language":"default","tag":"Features","count":6},{"language":"default","tag":"Getting Started","count":5},{"language":"default","tag":"MCP Reference","count":5},{"language":"default","tag":"MCP","count":5},{"language":"default","tag":"Commands","count":4}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"site-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"treatment","enabled":true,"payload":{"type":"string","value":"treatment"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"wildcard-email-auth","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[]}
{"page":{"pagePath":"cli/plan","slug":"/cli/plan","pageMetadata":{"title":"bap plan","description":"Goal-based action suggestions. Observe the page and get recommended next steps for achieving a goal.","href":"/cli/plan"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Goal-based action suggestions. Observe the page and get recommended next steps for achieving a goal.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={code:`code`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,CodeGroup,Heading,Note,ParamField,Tip}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!CodeGroup)_missingMdxReference(`CodeGroup`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);if(!Tip)_missingMdxReference(`Tip`,true);return _jsxs(_Fragment,{children:[_jsx(Heading,{level:`1`,id:`bap-plan`,children:`bap plan`}),`\n`,_jsx(_components.p,{children:`Observe the current page and get AI-suggested actions for achieving a goal. Useful for autonomous agents that need to decide what to do next.`}),`\n`,_jsx(Heading,{level:`2`,id:`usage`,children:`Usage`}),`\n`,_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`Basic`,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`bap`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` plan`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"login to the site\"`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`Limit suggestions`,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`bap`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` plan`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"search for products\"`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --max=5`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`JSON output`,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`bap`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` plan`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"fill out the checkout form\"`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --format=json`})]}),`\n`]})})})]}),`\n`,_jsx(ParamField,{path:`goal`,type:`string`,required:true,id:`param-goal`,children:_jsx(_components.p,{children:`A natural language description of what you want to accomplish.`})}),`\n`,_jsx(ParamField,{path:`--max`,type:`number`,default:`10`,id:`param-max`,children:_jsx(_components.p,{children:`Maximum number of suggestions to return.`})}),`\n`,_jsx(Heading,{level:`2`,id:`output`,children:`Output`}),`\n`,_jsx(CodeBlock,{numberOfLines:`12`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`12`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Plan for: \"login to the site\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Page: https://app.example.com/login`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Elements: 8 interactive`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Suggested actions:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` 1. Fill the email field with your username (85% match)`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` 2. Fill the password field with your password (85% match)`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` 3. Click the \"Sign in\" button to submit (90% match)`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` 4. Click \"Forgot password?\" if needed (20% match)`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Use bap act to execute actions, or bap observe for full element list`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(_components.p,{children:`Each suggestion includes:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Description`}),` — What the action does`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Method`}),` — The BAP protocol method to call`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Relevance`}),` — How relevant the action is to the stated goal (0-100%)`]}),`\n`]}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`bap plan`}),` analyzes the current page state and matches interactive elements against your goal. It\ndoes not execute any actions — it only suggests them.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`json-output`,children:`JSON Output`}),`\n`,_jsxs(_components.p,{children:[`With `,_jsx(_components.code,{children:`--format=json`}),`, the output includes full structured data:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`13`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`13`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"url\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://app.example.com/login\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"title\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Login\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"elements\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#82071E`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#F44747`,\"--shiki-dark-font-style\":`inherit`},children:`...`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"suggestions\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"description\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Fill the email field\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"method\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"action/fill\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"relevance\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0.85`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"totalElements\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`8`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Tip,{children:_jsxs(_components.p,{children:[`Use `,_jsx(_components.code,{children:`bap plan`}),` as a decision-making step in autonomous agent loops. It observes the page and ranks\npossible actions by relevance to your goal, so the agent can pick the best next step.`]})})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"bap plan","description":"Goal-based action suggestions. Observe the page and get recommended next steps for achieving a goal.","href":"/cli/plan"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"bap plan","slug":"bap-plan","depth":1,"children":[]},{"title":"Usage","slug":"usage","depth":2,"children":[]},{"title":"Output","slug":"output","depth":2,"children":[]},{"title":"JSON Output","slug":"json-output","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"piyushvyas","siteName":"BAP Docs","title":"bap plan - BAP Docs","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-03-21T20:10:21.993Z","originalFileLocation":"cli/plan.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Goal-based action suggestions. Observe the page and get recommended next steps for achieving a goal.\">\u003cmeta data-mint-head name=\"application-name\" content=\"BAP Docs\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/piyushvyas/-s_jUytUdpdIo1Bp/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/piyushvyas/-s_jUytUdpdIo1Bp/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/piyushvyas/-s_jUytUdpdIo1Bp/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/piyushvyas/-s_jUytUdpdIo1Bp/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/piyushvyas/-s_jUytUdpdIo1Bp/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/piyushvyas/-s_jUytUdpdIo1Bp/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/piyushvyas/-s_jUytUdpdIo1Bp/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/piyushvyas/-s_jUytUdpdIo1Bp/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/piyushvyas/-s_jUytUdpdIo1Bp/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"bap plan - BAP Docs\">\u003cmeta data-mint-head property=\"og:description\" content=\"Goal-based action suggestions. Observe the page and get recommended next steps for achieving a goal.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"BAP Docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://piyushvyas.mintlify.app/cli/plan\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://piyushvyas.mintlify.site/_mintlify/api/og/v2?division=Features\u0026amp;title=bap+plan\u0026amp;description=Goal-based+action+suggestions.+Observe+the+page+and+get+recommended+next+steps+for+achieving+a+goal.\u0026amp;theme=7d79b32ea2fda985fedb2d65\u0026amp;signature=eb72eafac4b8d2d47f67fc4669aa099251788867c5616420d3e218919dd715ba\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"bap plan - BAP Docs\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Goal-based action suggestions. Observe the page and get recommended next steps for achieving a goal.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://piyushvyas.mintlify.site/_mintlify/api/og/v2?division=Features\u0026amp;title=bap+plan\u0026amp;description=Goal-based+action+suggestions.+Observe+the+page+and+get+recommended+next+steps+for+achieving+a+goal.\u0026amp;theme=7d79b32ea2fda985fedb2d65\u0026amp;signature=eb72eafac4b8d2d47f67fc4669aa099251788867c5616420d3e218919dd715ba\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/piyushvyas/-s_jUytUdpdIo1Bp/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"BAP Docs\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#1a1a1a\">\u003clink data-mint-head rel=\"canonical\" href=\"https://piyushvyas.mintlify.app/cli/plan\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/cli/plan.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://piyushvyas.mintlify.app/#organization\",\"name\":\"BAP Docs\",\"url\":\"https://piyushvyas.mintlify.app\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/piyushvyas/SAjWCSGGjcR0-kMU/logo/light.svg?fit=max\u0026auto=format\u0026n=SAjWCSGGjcR0-kMU\u0026q=85\u0026s=b3a82ba997e99c772bcd297add5a163d\"}},{\"@type\":\"WebSite\",\"@id\":\"https://piyushvyas.mintlify.app#website\",\"name\":\"BAP Docs\",\"url\":\"https://piyushvyas.mintlify.app\",\"publisher\":{\"@id\":\"https://piyushvyas.mintlify.app/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://piyushvyas.mintlify.app/cli/plan#webpage\",\"url\":\"https://piyushvyas.mintlify.app/cli/plan\",\"name\":\"bap plan\",\"description\":\"Goal-based action suggestions. Observe the page and get recommended next steps for achieving a goal.\",\"dateModified\":\"2026-03-21T20:10:21.993Z\",\"isPartOf\":{\"@id\":\"https://piyushvyas.mintlify.app#website\"},\"breadcrumb\":{\"@id\":\"https://piyushvyas.mintlify.app/cli/plan#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://piyushvyas.mintlify.app/cli/plan#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Features\",\"item\":\"https://piyushvyas.mintlify.app/cli/workflows\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"bap plan\",\"item\":\"https://piyushvyas.mintlify.app/cli/plan\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://piyushvyas.mintlify.app/cli/plan#article\",\"headline\":\"bap plan\",\"name\":\"bap plan\",\"description\":\"Goal-based action suggestions. Observe the page and get recommended next steps for achieving a goal.\",\"url\":\"https://piyushvyas.mintlify.app/cli/plan\",\"mainEntityOfPage\":{\"@id\":\"https://piyushvyas.mintlify.app/cli/plan#webpage\"},\"dateModified\":\"2026-03-21T20:10:21.993Z\",\"publisher\":{\"@id\":\"https://piyushvyas.mintlify.app/#organization\"},\"isPartOf\":{\"@id\":\"https://piyushvyas.mintlify.app#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"BAP Docs\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"BAP Docs\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/cli/plan.md","siteName":"BAP Docs","nav":{"global":{"anchors":[{"anchor":"GitHub","icon":"github","href":"https://github.com/browseragentprotocol/bap"}]},"tabs":[{"tab":"Documentation","pages":[{"title":"Documentation","href":"/introduction"}]},{"tab":"CLI Reference","groups":[{"group":"CLI","pages":[{"title":"CLI Overview","href":"/cli/overview"}]},{"group":"Commands","pages":[{"title":"Essentials","href":"/cli/essentials"},{"title":"Action Commands","href":"/cli/actions"},{"title":"Navigation","href":"/cli/navigation"},{"title":"Observation","href":"/cli/observation"},{"title":"Composite Actions","href":"/cli/composite-actions"}]},{"group":"Features","pages":[{"title":"Workflows","href":"/cli/workflows"},{"title":"bap run","href":"/cli/run"},{"title":"Recipes","href":"/cli/recipes"},{"title":"Tracing","description":"View, filter, replay, and export session traces for debugging and analysis.","href":"/cli/tracing"},{"title":"bap plan","href":"/cli/plan"},{"title":"bap watch","description":"Stream live browser events to the terminal. Monitor console errors, network failures, dialogs, and downloads in real time.","href":"/cli/watch"},{"title":"Eval","href":"/cli/eval"}]},{"group":"More","pages":[{"title":"Sessions, Tabs \u0026 Frames","href":"/cli/sessions-tabs"},{"title":"Configuration","href":"/cli/configuration"}]}]},{"tab":"MCP Reference","pages":[{"title":"MCP Reference","href":"/mcp/overview"}]},{"tab":"Protocol","pages":[{"title":"Protocol","href":"/protocol/overview"}]}]},"basePath":"","title":"bap plan - BAP Docs","deploymentId":"dpl_G6E2ur2Zjq51xGTVZPSFXsWoTxCu","buildId":"dpl_G6E2ur2Zjq51xGTVZPSFXsWoTxCu","dynamics":[],"chunks":[]}