In this tutorial, you'll build a code reviewer coding assistant that can read files, analyze code, and provide feedback. This is a great starting point for learning the Agent SDK basics.

Prerequisites:
  • Node.js 16+ (for TypeScript), Python 3.10+ (for Python), or Java 11+ (for Java)
  • SDK installed for your chosen language
  • API key from your LLM provider (set as AUTOHAND_API_KEY)

What You'll Build

A code reviewer coding assistant that:

  • Reads source files from your codebase
  • Analyzes code for bugs and improvement opportunities
  • Provides specific feedback with file and line numbers
  • Uses only the tools it needs (READ_FILE, GLOB, SEARCH_IN_FILES)

Step 1: Set Up Your Project

Create a new file for your agent in your chosen language:

Step 2: Run the Agent

Now run the agent to analyze your codebase:

Key Concepts

1
Agent Configuration

The Agent class takes a name, instructions, tools, and max turns configuration.

2
Tool Selection

We only give the coding assistant the tools it needs: read_file, glob, and search_in_files.

3
Provider Setup

The OpenRouterProvider connects your coding assistant to an LLM provider.

4
Running the Coding Assistant

Runner.run() executes the coding assistant with a prompt and returns the result.

Complete Example

Use this as the full runnable shape for the language you chose:

Next Steps

View the Example

See the complete example in the TypeScript SDK repository.

View on GitHub

File Editor Agent

Learn how to build an agent that can edit files, not just read them.

View Example

Multi-Tool Reasoning

Advance to multi-tool reasoning and more complex workflows.

Next Tutorial