Your first autonomous agent in 60 minutes

Sixty minutes from now, you'll have a real autonomous agent running on a schedule, pulling data from your actual Gmail and Google Calendar, and producing a useful daily digest every morning. This isn't a demo. The code you write here is the code you'd ship. Eight steps, about five minutes each. Open a terminal; let's go.

What you'll have at the end.

A daily-digest agent that runs at 6:30am every weekday and:

~ what you're building ~

Step 1: Install Claude Code (5 min)

npm install -g @anthropic-ai/claude-code
claude

First run triggers auth. Sign in with an Anthropic account (or enter an API key for headless use later).

Step 2: Connect MCPs (10 min)

You need two MCPs: Google Calendar and Gmail. Both are first-party claude.ai connectors, easiest path is:

  1. Go to claude.ai/directory
  2. Click "Connect" on Gmail + Google Calendar
  3. Sign in with your Google account; grant scopes
  4. In Claude Code: /mcp list, you should see both listed

Step 3: Test the MCPs (5 min)

In Claude Code, try:

Using Gmail, search for emails from my boss in the last week.

Claude should use the Gmail MCP. Accept the tool-use prompt. Verify the results look right. Repeat with Calendar.

Step 4: Write the skill (15 min)

Create ~/.claude/skills/daily-digest/SKILL.md:

---
name: daily-digest
description: Produce a daily digest from email + calendar
---

You are producing the user's daily digest. Keep it under 150 words.

Steps:
1. Use Google Calendar to list events for today
2. Use Gmail to find emails received since yesterday at 6pm with importance flags or from senders marked as important
3. Synthesize into one paragraph, covering:
   - The 3 most important meetings today
   - Any action-required emails from last night/this morning
   - A one-sentence priority recommendation

Format:
<digest>
(your paragraph here)
</digest>

Step 5: Adjust permissions (5 min)

Edit ~/.claude/settings.json:

{
  "permissions": {
    "defaultMode": "auto",
    "allow": [
      "mcp__claude_ai_Gmail__*",
      "mcp__claude_ai_Google_Calendar__*",
      "Write",
      "Read"
    ]
  }
}

This auto-approves Gmail + Calendar tool calls and file operations. No other tools are auto-approved.

Step 6: Test interactively (10 min)

Launch Claude Code. Type /daily-digest. Watch it run. Verify the output.

Tune the skill if needed, shorten the summary, change the priority logic, whatever.

Step 7: Run headless (10 min)

Create ~/bin/daily-digest.sh:

#!/bin/bash
cd ~
claude --headless --print --max-turns 10 <<'EOF' >> ~/daily-digest.log 2>&1
/daily-digest
EOF

Make it executable:

chmod +x ~/bin/daily-digest.sh

Run it manually. Check the log.

Step 8: Schedule it

# crontab -e
30 6 * * 1-5 ~/bin/daily-digest.sh

Runs at 6:30 AM weekdays. Output appends to ~/daily-digest.log.

You're done. What you actually built.

Take a second and appreciate this. What's running on your machine now is a full autonomous agent. On a schedule (Level 4 on the autonomy spectrum). With tools it can actually use (MCP). With a permission list (safety). With a defined skill (your digest). No babysitting. Just tomorrow morning, it writes something useful, you read it over coffee.

Everything else in this framework is variations on this pattern. Different tools. Different skills. More sophisticated safety. But the shape is the same: Claude + MCPs + skill + schedule + permissions. You now have that shape working.

Where to go next.

The framework from here is extensions of what you just built. You've crossed the hard line: not talking about autonomous AI, actually running some.