Docs › Agent › Tools › Web search and reading pages
Web search and reading pages
How the agent searches the web and reads a page, what asks first, and how to turn either off.
On this page
The agent can look things up that your code cannot tell it: whether a library's API has changed, a version's release notes, an error message from a dependency, current documentation. Two tools do this, and each has its own switch.
Web search
web_search returns ranked results: each page's title, address, date and an extract. The agent can limit a search to particular sites or to recent pages, and it cites the address of any result it relies on.
- Offered in Agent, Plan and Ask.
- The search runs through AstraCode, so it needs you signed in, and each search counts against your allowance. See Usage and limits.
- Each run has a fixed number of searches, so the agent makes each one specific. When they are used up it works from what it found and says what it could not confirm.
- It does not ask first: a search sends only the query.
- Turn it off with AstraCode Settings or
astracode.agent.webSearch(on by default).
Reading a page
web_fetch reads one page as plain text, with scripts and styles removed. It is for documentation and references, not for your running app: for that, see Browser tools.
- Offered in Agent and Plan, not in Ask.
- A page that is not on this machine asks first, in every mode and every approval setting.
localhostdoes not ask. - It waits up to 10 seconds and keeps up to 20,000 characters of the page.
- Turn it off with Read pages under AstraCode Settings, Agents, Context and Tools, or
astracode.agent.webFetch(on by default). It is a separate switch from browser control, because reading a page cannot click anything.
What it is told about web content
Search results and fetched pages are other people's text. They reach the agent fenced and labelled as data, never as instructions, so a page that tells it to do something is something to mention to you, not to act on. Anything it decides to do afterwards still goes through your approvals.
Settings
| Setting | Default | What it does |
|---|---|---|
astracode.agent.webSearch | on | Let the agent search the web, in Agent, Plan and Ask. |
astracode.agent.webFetch | on | Let the agent read a page as text, in Agent and Plan. |
If something goes wrong
- The agent never searches: check
astracode.agent.webSearchis on and that you are signed in. Search is offered only when AstraCode's service supports it. - A fetch keeps asking: pages off this machine always ask. Approve it, or paste the text you need into the chat.
- Usage and network errors are on Usage, billing and network errors.
← Running commands Browser tools →
All documentation
Get started
Using the editor
- Tab completion
- Edit and ask about a selection
- Reviewing the agent's changes
- Git: commit messages, branch review and conflicts
- Dictation
- Layout, themes and the settings page
Agent
- Agent overview
- Agent, Plan, Ask and Debug
- Approvals and permissions
- Plan mode
- Debug mode
- Tools
- Browser tools
- How the agent checks its work
- Checkpoints and undo
- Running several agents at once
- Subagents and background tasks
- Remote agents in GitHub Actions
- Infrastructure as code
Context
Workspaces
Connectors
- Connectors (MCP servers)
- Connector configuration reference
- Use AstraCode from Claude, ChatGPT and other apps
Extending AstraCode
CLI
Account and usage
- Usage and limits
- Bring your own key
- What AstraCode sends and keeps
- Reporting a problem and getting help
Troubleshooting
- Troubleshooting
- Sign-in problems
- Install and update problems
- Chat panel problems
- Agent run problems
- Connector problems
- Dictation problems
- Usage, billing and network errors
- CLI problems