A demonstration of building agents with Claude using the Anthropic API.
A minimal chat loop showing basic conversation with Claude.
A full-featured agent that can read, list, and edit files through tool use.
Available tools:
read_file- Read file contentslist_files- List directory contents recursivelyedit_file- Search/replace text editing with file creation support
uv sync
export ANTHROPIC_API_KEY="your-api-key"# Simple chat
uv run python chat.py
# Agent with file tools
uv run python agent.py$ python agent.py
Chat with Claude (use 'ctrl-c' to quit)
You: What files are in this directory?
tool: list_files({})
Claude: I can see the following files...