Hands-On: Build Your First Claude Code Agent

A Support Ticket Analyzer that anyone on your team can run — no prior coding experience required

Prerequisites

Before we start, you need three things installed on your machine:

  • Claude Code CLI — install via: npm install -g @anthropic-ai/claude-code
  • An Anthropic API key — get one at console.anthropic.com
  • Node.js 18+ — download at nodejs.org

What You'll Build

By the end of this guide, you will have:

  • A structured Claude Code Project running locally.
  • A "Brain" configured with CLAUDE.md
  • A "Eyes" create sample tickets.
  • Run the agent to write a formatted Markdown report.
Key insight: This CLAUDE.md is what makes the agent predictable and production-ready. Without it, Claude improvises. With it, every output follows your organization's exact standards — every single time.

Step 2 — The Eyes: Create Sample Tickets

Create three plain text files inside the tickets/ folder. These simulate real incoming support tickets:

Step 3 — Run the Agent

This is the moment where Claude Code earns its name. Open your terminal, navigate to the support-analyzer folder, and run one command:

bash — support-analyzer
Saturday, February 28, 2026
$ cd support-analyzer
$ claude "Read all tickets in the tickets/ folder and produce a daily briefing"



Watch what happens next. Claude Code will:

  • Read your CLAUDE.md and understand its role and output rules
  • Scan and read every file in the tickets/ folder
  • Reason through category and urgency for each ticket
  • Identify cross-ticket patterns (e.g., multiple access issues = potential system problem)
  • Write a formatted Markdown report to reports/daily_briefing.md


The entire process takes under 30 seconds for this example. For 50 tickets, expect 2–3 minutes.

What the Output Looks Like

Open reports/daily_briefing.md. You will see something like this:

# Daily Support Briefing — 2026-02-28

## Executive Summary

Three tickets received this morning. One CRITICAL issue requires immediate attention: an enterprise client (ACME-CORP-ENT) has 12 users locked out ahead of a board deadline. A technical regression in v2.4.1 is affecting at least one Business-tier client. One low-priority billing inquiry requires no immediate action.


## Ticket Breakdown

Ticket Category Urgency Summary
ticket_001 ACCESS CRITICAL 12-user lockout, ERR-4421, board deadline
ticket_002 BILLING LOW Plan comparison question, no urgency
ticket_003 TECHNICAL HIGH Webhook metadata field missing post-v2.4.1

## Patterns & Trends

  • ticket_001 and ticket_003 may share a root cause: the v2.4.1 release yesterday. The session token error (ERR-4421) and the missing metadata field could both stem from the same deployment. Recommend cross-checking with the engineering team before treating these as isolated issues.

## Recommended Actions

  1. [IMMEDIATE] Escalate ticket_001 to Tier 2 — enterprise SLA at risk.
  2. [TODAY] Confirm with engineering whether v2.4.1 introduced regressions affecting both ticket_001 and ticket_003.
  3. [THIS WEEK] Respond to ticket_002 with standard plan comparison doc.
What just happened:   Claude Code didn't just categorize tickets. It reasoned across them — noticing that two separate tickets from different companies might share a common cause from the same software release. That is agentic reasoning, not autocomplete.

Level Up: Three Easy Extensions

Once your basic agent is running, these three additions take it from a demo to a daily workflow tool:

1.Auto-run every morning

Add a cron job (Mac/Linux) or Task Scheduler entry (Windows) to run the agent automatically at 8 AM every day:

# Add to crontab (run: crontab -e)
0 8 * * * cd ~/support-analyzer && claude "Read all tickets and produce a daily briefing"

2.Send the briefing to Slack

Add one line to your CLAUDE.md instructions to have the agent post the briefing summary directly to a Slack channel via webhook:

## Additional Output
After saving the report, POST the Executive Summary section as plain text to:
SLACK_WEBHOOK_URL (set as environment variable SLACK_SUPPORT_WEBHOOK)

3.Add a knowledge base

Create a knowledge/ folder with your FAQ docs, known-issue lists, and escalation procedures. Update CLAUDE.md to tell the agent to reference these when generating recommended actions. Now the agent’s output reflects your team’s actual playbooks — not generic advice.

The Bigger Picture

«

What you just built in 20 minutes is exactly what Epic's support staff discovered on their own: a tool that removes the repetitive cognitive load from knowledge work and returns it as structured, actionable output.

The CLAUDE.md file is the key. It is what separates a one-time demo from a production-grade tool. Every rule you add, every format you specify, every edge case you define makes the agent more reliable and more aligned with how your team actually works.

This example uses three tickets. Your real deployment might use 300. The command is the same. The output structure is the same. The time investment from your team is zero.

That is what agentic AI actually looks like in practice. Not a chatbot. An employee.