Skip to main content
DataGen Agents lets you deploy Claude Code agents from your GitHub repositories. Once deployed, you can schedule them to run automatically or trigger them via webhooks.

Why Deploy Your Agent?

You already built the agent. It works. But running it locally means it’s isolated from your systems—it can’t respond to events, run on a schedule, or integrate with your workflows. Deployed agents become part of your infrastructure:
  • Seamless integration - Your agent becomes a service that other systems can call
  • Event-driven execution - React instantly to webhooks from Slack, GitHub, or any external system
  • Scheduled automation - Daily CRM hygiene, weekly reports, hourly monitoring—all hands-free

Why Deploy with DataGen?

Deploying Claude Agent SDK yourself means configuring container sandboxes, managing MCP OAuth flows manually, and handling long-running process infrastructure. DataGen handles all of this - connect your GitHub repo and deploy with one click.

Prerequisites

Use the /agents command in Claude Code to create your agent. This creates an agent file at .claude/agents/your-agent.md.See the Claude Code sub-agents documentation for details on creating agents.
Want your agent to use MCP tools like Google, LinkedIn, or other integrations?We currently only support MCP through DataGen. To add MCP capabilities to your agent, add your MCP servers through DataGen. This way, your MCP tools work both locally during development and in your deployed agent.
Your agent code needs to be in a GitHub repository.1. Create a new repository on GitHub:
  • Go to github.com/new
  • Enter a repository name
  • Leave “Initialize this repository with a README” unchecked
  • Click Create repository
2. Get your remote origin URL:
  • After creating the repo, GitHub shows the remote URL
  • Copy the HTTPS URL: https://github.com/your-username/your-repo.git
  • Or use SSH: git@github.com:your-username/your-repo.git
3. Push your local code:
git init
git add .
git commit -m "Initial commit"
git remote add origin https://github.com/your-username/your-repo.git
git push -u origin main
See the GitHub documentation for more details.

Step 1: Add DataGen GitHub App to Your Repo

1

Go to Agents Page

Navigate to the Agents page in DataGen.
2

Click Connect Repository

Click the Connect Repository button to start the setup process.
Connect Repository button
3

Install GitHub App

Click Install GitHub App to authorize DataGen to access your repositories.
4

Select Account or Organization

Choose the GitHub account or organization where your agent repository lives.
5

Choose Repositories

Select the specific repositories you want to connect, or grant access to all repositories.
6

Return to DataGen

After authorization, return to DataGen and select your repository from the list.

Step 2: Deploy an Agent

1

Select Your Agent

Click on the agent you want to deploy from the list. DataGen automatically discovers agents from your .claude/agents/ directory.
Agent list
2

Configure Secrets

Select which secrets your agent needs access to. You need either an Anthropic API key or a Claude Code subscription token.Option A: Anthropic API KeyAdd your ANTHROPIC_API_KEY as a secret in DataGen Secrets.Option B: Claude Code Subscription (Recommended)If you’re a Claude Code subscriber, you can use your subscription instead of an API key:
  1. Run claude setup-token in your terminal to generate an OAuth token
  2. Create a secret named CLAUDE_CODE_OAUTH_TOKEN in DataGen Secrets
  3. Paste your token as the secret value
  4. Select this secret when deploying your agent
Select secrets
3

Toggle Create Pull Request (Optional)

Enable Create Pull Request if you want your agent to submit changes as PRs instead of committing directly.
4

Click Deploy Agent

Click Deploy Agent to create your deployment.
5

Copy Your Webhook URL

After deployment, copy the webhook URL. You’ll use this to trigger your agent externally.
Webhook URL display

Step 3: Trigger Your Agent

Once deployed, you have three ways to trigger your agent. Choose the method that fits your use case.
Set up automatic recurring runs for your deployed agent.
1

Open Schedule Settings

Click Schedule on your deployed agent.
Schedule dialog
2

Choose Schedule Type

Select your preferred schedule:
  • Hourly - Run every hour
  • Daily - Run once per day at a specific time
  • Weekly - Run on specific days of the week
  • Custom - Define a custom cron expression
3

Set Timezone

Choose your timezone to ensure the agent runs at the expected times.
4

Add Payload (Optional)

Provide optional JSON payload that will be passed to your agent on each run.
{
  "target_branch": "main",
  "dry_run": false
}
5

Save Schedule

Click Save to activate the schedule.

Step 4: View Execution History & Logs

Finding Your Logs

Click on a deployed agent to view its execution history. Each run shows:
  • Start time - When the execution began
  • Duration - How long the run took
  • Status - Current state of the execution
  • Trigger - What initiated the run (schedule, manual, webhook)
Execution history

Understanding Status

StatusDescription
QueuedRun is waiting to start
RunningAgent is currently executing
CompletedRun finished successfully
FailedRun encountered an error

Viewing Pull Requests

If your agent creates PRs, you’ll see a link to the PR directly in the execution details.
Execution details with Pull Request link

Troubleshooting

Make sure your agent file is located at .claude/agents/your-agent.md in your repository and has been pushed to the main branch.
Verify you’re using the correct webhook URL. Each deployed agent has a unique webhook endpoint.
Check that your schedule is active and the timezone is set correctly. View the execution history for any failed runs.
Ensure you’ve configured the required secrets (especially your Anthropic API key) and selected them when deploying the agent.