Skip to content

Custom Agents

Create custom AI agents to automate infrastructure tasks for you and your team

Custom agents let you define automated tasks that Cased’s AI performs on a schedule or trigger. They work just like the default agents that ship with Cased, but can be tailored to your organization’s specific needs and processes.

Creating a custom agent

Cased’s AI excels at infrastructure automation tasks like monitoring resources, managing deploys, and debugging production issues. Custom agents enable you to give it specific instructions to handle infrastructure tasks automatically.

Each agent combines three key elements:

Agents can be triggered in three ways:

  • Scheduled - Run the agent on a regular schedule (daily, weekly, monthly)
  • Webhooks - Trigger when Cased receives a webhook from external systems
  • API - Start on-demand via API call

The agent needs access to your systems to be effective. Connect these integrations to give agents the context they need:

Essential integrations:

  • AWS - Monitor resources, costs, and security
  • GitHub - Analyze code, review PRs, track deployments

Recommended additions:

  • Slack - Send notifications and alerts
  • Sentry - Analyze errors and exceptions
  • DataDog - Monitor metrics and logs
  • PagerDuty - Respond to incidents

The prompt provides clear instructions for what the agent should do. Write prompts as if explaining the task to a senior engineer.

Example prompt for a deployment health check:

After each deployment to production:
1. Check error rates in Sentry for new exceptions
2. Monitor CPU and memory usage in DataDog
3. Verify all health checks are passing
4. Review deployment logs for warnings
5. If issues found, summarize in Slack #deployments channel
6. If critical issues, create PagerDuty incident
  1. Navigate to Agents in your Cased dashboard

  2. Click “Create agent”

  3. Configure the basics:

    • Name: Descriptive name like “Daily Infrastructure Audit”
    • Trigger: Choose scheduled, webhook, or API
    • Schedule: Set timing if using scheduled trigger
  4. Write your prompt:

    • Be specific about what to check
    • Include success/failure criteria
    • Specify where to report results
  5. Test the agent:

    • Use “Run now” to test immediately
    • Review the agent’s actions and output
    • Refine prompt based on results
  6. Enable and monitor:

    • Turn on the agent when ready
    • Check execution history regularly
    • Iterate based on effectiveness

Good prompt:

Check all EC2 instances for:
- Instances running longer than 30 days without restart
- Instances without recent backups
- Development instances running outside business hours
Report findings in #aws-alerts with instance IDs and recommendations

Vague prompt:

Check our servers and let me know if anything looks wrong

Begin with basic agents and add complexity as you validate they work:

  1. Start: Check S3 buckets for public access
  2. Expand: Also check for missing encryption
  3. Enhance: Add automatic remediation for common issues

Make agents reusable across environments:

Check database backup status for {{ environment }}:
- Verify backup completed in last {{ backup_hours }} hours
- Check backup size is within {{ size_variance }}% of average
- Alert {{ slack_channel }} if issues found