Back to Copilotkit

Frontend Tools Setup

showcase/integrations/claude-sdk-python/docs/setup/frontend-tools-setup.mdx

1.63.1489 B
Original Source
<Steps> <Step> ### Forward browser tools to Claude
Frontend tools registered with `useFrontendTool` arrive in the AG-UI run
input. Convert each AG-UI tool definition into an Anthropic Messages API
tool schema before calling the model. Runs that carry frontend tools use
the direct Messages API path rather than the Claude Agent SDK.

<DemoCode
  file="src/agents/agent.py"
  region="frontend-tools-setup"
  highlight="23-29"
/>
</Step> </Steps>