Skip to content

finleysg/code-editing-agent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Code Editing Agent Demo

A demonstration of building agents with Claude using the Anthropic API.

Examples

Simple Chat (chat.py)

A minimal chat loop showing basic conversation with Claude.

Tool Use Agent (agent.py)

A full-featured agent that can read, list, and edit files through tool use.

Available tools:

  • read_file - Read file contents
  • list_files - List directory contents recursively
  • edit_file - Search/replace text editing with file creation support

Setup

uv sync
export ANTHROPIC_API_KEY="your-api-key"

Usage

# Simple chat
uv run python chat.py

# Agent with file tools
uv run python agent.py

Example Interaction

$ 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...

About

Python demo of building a code editing agent with Claude and the Anthropic API

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages