This tutorial shows how to connect Claude Code to a Replit project using the Claude Agent SDK, so you can build and run automated AI agents without leaving your workspace.
Notes:
- You need a Replit account and an Anthropic API key to follow this tutorial. Get your API key at console.anthropic.com.
- See How to Integrate Replit with Claude for setting up a basic Claude connection first.
- Sign in at replit.com and open the project you want to add Claude Code to, or click + Create Something New to start a fresh one.
- In the Agent prompt field, describe the automated workflow you want to build and mention Claude directly - for example: Build an automated report summarizer for NEPS Corp that takes a list of weekly updates and returns a structured summary using Claude. Click the Arrow button to run.
- The Agent generates your project files and sets up the Claude Agent SDK connection using your stored ANTHROPIC_API_KEY. Wait for the build to complete.
- Your Anthropic API key is stored in the Secrets pane as ANTHROPIC_API_KEY. If you've already set this up from a previous Claude integration, it's available automatically across all your projects.
- Click Run to launch your app. Test it in the Preview tab - for example, mention a set of weekly team updates and confirm Claude returns a structured summary output.
.gif)
