Agentdex

Workflows / AI agent / bot

Build an AI agent or bot with AI coding tools

Agents are easy to demo and hard to trust. This workflow starts with a narrow job, adds tools one at a time, and puts logs and limits in before anyone else uses it.

Send tools to AI Stack

The steps

Recommended tools link to their Agentdex pages. These are starting points, not rankings: pick what you already pay for.

  1. Plan

    The job, the tools it can call, and what it must never do.

    Use Claude Code. Comfortable reasoning about tool design and guardrails.

    Or try: Cursor, Gemini CLI

    Help me spec an AI bot. Ask about the job and users, then write AGENT.md: tools it can call, inputs and outputs, limits, and a "never do" list.
  2. Build

    The agent loop with one tool working end to end.

    Use Cursor. Good for wiring SDK code, tool schemas and handlers across files.

    Or try: Claude Code, Windsurf

    Implement the agent from AGENT.md with one tool first. Validate tool inputs, cap the loop at 10 steps, and log every tool call.
  3. Test

    It refuses what it should and handles bad input.

    Use OpenHands. An open-source agent that can run code and tests in a sandbox.

    Or try: Aider, Codex

    Write tests for prompt injection in user input, a tool returning an error, and a request outside the bot's job. Run them and report results.
  4. Deploy

    Running somewhere with secrets set and costs capped.

    Use Cloudflare Pages. Free tier with Functions for small bot backends and webhooks.

    Or try: Replit Agent, Netlify

    Write the deploy checklist: env vars (names only), rate limits, a spend cap on the model API, and how to turn the bot off fast.
  5. Maintain

    Review logs and fix the worst failures.

    Use Claude Code. Can read log files and propose prompt or code fixes.

    Or try: GitHub Copilot, Jules

    Here are 20 logged conversations. Group the failures, rank them by harm, and propose a fix for the top 3.