[docs]: add variables feature documentation for agent#1587
Open
chromiebot wants to merge 3 commits intobrowserbase:mainfrom
Open
[docs]: add variables feature documentation for agent#1587chromiebot wants to merge 3 commits intobrowserbase:mainfrom
chromiebot wants to merge 3 commits intobrowserbase:mainfrom
Conversation
Add comprehensive documentation for the agent variables feature: - Add Variables row to feature availability table (DOM/Hybrid only) - Add new Variables section in basics/agent.mdx with: - Basic usage example with experimental flag - How variables work (LLM descriptions, placeholder syntax, runtime substitution) - Variable types (string, number, boolean) - Supported tools by mode (DOM vs Hybrid) - Cache optimization benefits - Best practices guide - Update references/agent.mdx with: - Variables parameter in AgentExecuteOptions interfaces - Variable type definitions (Variable, VariableValue, Variables) - ParamField documentation with examples - New code example tab for variables usage Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
🦋 Changeset detectedLatest commit: ef3e710 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Contributor
Greptile SummaryAdded comprehensive documentation for the agent variables feature across basics and reference pages. The changes include:
The documentation is clear, well-structured, and follows the existing documentation patterns in the codebase. Confidence Score: 5/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant User
participant Agent
participant LLM
participant Browser
User->>Agent: execute({ variables: { password: {value, description} } })
Agent->>LLM: System prompt with variable descriptions only
Note over LLM: Sees "password: The user's password"<br/>NOT the actual value
LLM->>Agent: Returns tool call with "%password%"
Note over Agent: Runtime substitution
Agent->>Agent: Replace "%password%" with actual value
Agent->>Browser: Execute action with substituted value
Browser-->>Agent: Action complete
Agent-->>User: Result (no sensitive data logged)
|
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
1 issue found across 2 files
Prompt for AI agents (all issues)
Check if these issues are valid — if so, understand the root cause of each and fix them.
<file name="packages/docs/v3/references/agent.mdx">
<violation number="1" location="packages/docs/v3/references/agent.mdx:160">
P2: Documentation advertises agent `variables` option and `Variables` type that are not present in the actual AgentExecuteOptions/AgentStreamExecuteOptions API.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
Removes documentation for the `variables` option and `Variables` type from the agent API reference, as these features are not present in the actual AgentExecuteOptions/AgentStreamExecuteOptions API. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add comprehensive documentation for the agent variables feature:
why
what changed
test plan
Summary by cubic
Adds variables docs for agents so developers can pass sensitive data without exposing values to the LLM. Addresses STG-1188 and updates the basics page with usage, tool support, and best practices.
Written for commit ef3e710. Summary will update on new commits.