In this tutorial, you'll build a data analysis coding assistant that can read data files, perform calculations, generate visualizations, and provide insights. This demonstrates how to use the Agent SDK for data processing tasks.

Prerequisites:
  • Completed Code Reviewer Agent
  • Node.js 16+ (for TypeScript), Python 3.10+ (for Python), Java 11+ (for Java), Go 1.16+ (for Go), Swift 5.5+ (for Swift), or Rust 1.60+ (for Rust)
  • SDK installed for your chosen language
  • API key from your LLM provider (set as AUTOHAND_API_KEY)

What You'll Build

A data analysis coding assistant that:

  • Reads CSV and JSON data files
  • Calculates statistics (mean, median, standard deviation)
  • Filters and transforms data
  • Generates summary reports
  • Creates visualization scripts

Step 1: Create Sample Data

Create a sample CSV file with sales data in your chosen language:

Step 2: Create Data Analysis Agent

Create an agent with data analysis capabilities in your chosen language:

Step 3: Run Analysis

Run the data analysis agent on your sample data in your chosen language:

Key Concepts

1
File Processing

Using READ_FILE to read CSV and JSON data files for analysis.

2
Statistical Analysis

The agent calculates statistics and provides data insights automatically.

3
Report Generation

Using WRITE_FILE to create summary reports and analysis outputs.

4
Visualization Scripts

The agent can generate Python scripts for data visualization.

Complete Example

Here's the complete example with cleanup:

Real-World Applications

This pattern can be applied to:

  • Business intelligence: Analyze sales, revenue, and customer data
  • Log analysis: Parse and analyze server logs for insights
  • Financial reporting: Generate financial summaries and reports
  • Scientific data: Process experimental data and generate plots
  • Market research: Analyze survey data and customer feedback

Next Steps

📁 View the Example

See the complete example in the SDK repositories.

TypeScript Examples →

📊 Documentation Generator

Learn how to build agents that generate documentation from code.

Next Tutorial →

📚 Explore More

Check out all examples in the SDK repositories.

Agent SDK Overview →