Skip to main content
This guide shows you how to build an agent using Anthropic’s Claude models with the Claude Agent SDK, which provides tool use capabilities out of the box.

Prerequisites

  • Python 3.9+
  • cycls package installed
  • Anthropic API key
  • Docker installed (for local testing)

Basic Claude Agent

Create a file called app.py:
Create a .env file:
Run the agent:

Claude Agent SDK with Tools

For more advanced use cases, you can use the Claude Agent SDK which provides built-in tool support:
This example:
  • Uses the Claude Agent SDK for tool-based interactions
  • Streams text responses directly to the user
  • Shows thinking blocks for reasoning visibility
  • Displays tool usage as thinking bubbles

Configuration

Create a .env file with your API key:

Deploy to Cloud