Skip to content

feat(anthropic): Implemented a web search tool, provided by Anthropic #3353

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dev-jonghoonpark
Copy link
Contributor

@dev-jonghoonpark dev-jonghoonpark commented May 27, 2025

Implemented a web search tool, provided by Anthropic
This web search tool is categorized as a server tool.

related doc: https://docs.anthropic.com/en/docs/agents-and-tools/tool-use/web-search-tool

Changes

The serverTools property has been added to AnthropicChatOptions.

It can be used as follows:

AnthropicChatOptions.builder()
    .serverTools(List.of(WebSearchTool.builder().maxUses(1).build()))
    .build();

Note 1

I'm not sure if this is a temporary issue, but I was occasionally getting a 529 error (overloaded_error: Anthropic's API is temporarily overloaded.) during development.

related doc: https://docs.anthropic.com/en/api/errors

Note 2

The stream part was not developed in this PR.

@dev-jonghoonpark dev-jonghoonpark force-pushed the anthropic-web-search-tool branch from ef904c0 to d086f6e Compare May 27, 2025 18:58
This web search tool is categorized as a `server tool`.
related doc: https://docs.anthropic.com/en/docs/agents-and-tools/tool-use/web-search-tool

Signed-off-by: jonghoonpark <[email protected]>
@dev-jonghoonpark dev-jonghoonpark force-pushed the anthropic-web-search-tool branch from d086f6e to 9efd6a5 Compare May 28, 2025 13:39
@markpollack
Copy link
Member

We will review, then we can discuss the streaming support.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants