How to Build Internal Tools with AI Coding Agents (Step-by-Step)

Build admin dashboards, approval workflows, and data tools in hours instead of weeks. A complete guide using Runtm with Claude Code, Codex, or Gemini CLI.

Updated February 4, 20267 min readworkflowsBeginner
internal-toolsgetting-startedtutorial

Every engineering team has a backlog of internal tools that never get built. Admin dashboards, approval workflows, data migration scripts, customer lookup pages. They're useful, but never useful enough to pull engineers off product work.

AI coding agents change this. What used to take a week now takes an afternoon, because the agent does most of the typing while you steer. But you still need somewhere to run the code, which is where Runtm comes in.

This guide walks through building a complete internal tool from zero to deployed.

Quick summary

Plan before you prompt, or you'll rewrite everything three times. Use Runtm's sandbox so your AI agent gets its own virtual computer with databases and everything it needs. Build one feature at a time, test it, move on. Get something in front of users fast and iterate from there. Internal tools should be functional, not perfect.

What we're building

A user management dashboard for your team. Nothing fancy:

  • View all users with search and filtering
  • Add, edit, and delete users
  • Role-based permissions (admin, member, viewer)
  • Audit log of who changed what
  • Deployed and accessible from anywhere

This takes about 2-3 hours if you follow along. Less once you're familiar with the workflow.

Prerequisites

You'll need a Runtm account (sign up free) and basic familiarity with TypeScript. The AI handles most of the code, but you should understand what it writes.

Part 1: Planning

The biggest mistake people make with AI coding is jumping straight into prompts without thinking through what they're building. You'll get code faster, but you'll also throw it away and start over when you realize you forgot something.

Runtm has a plan mode that helps with this. It asks you questions about what you're building, who will use it, and what features matter most. The back-and-forth helps you arrive at the right architecture before your agent writes any code.

If you prefer to plan on your own, spend 10 minutes sketching out:

Your data model (what entities, fields, and relationships you need):

  • User: id, email (unique), name, role (admin/member/viewer), timestamps
  • AuditLog: id, user_id, action (create/update/delete), target info, changes as JSON, timestamp

Your user flows (what someone actually does with this tool):

  1. Open dashboard, see list of users
  2. Search for a specific user by name or email
  3. Click to view/edit user details
  4. Change their role
  5. See audit log of recent changes

Your permissions (who can do what):

  • Admin: full access
  • Member: view users, no edit
  • Viewer: view only, limited fields

This planning saves hours of back-and-forth with your AI agent later. Trust me.

Part 2: Create your Runtm session

Log into Runtm and create a new session. You get a virtual computer in the cloud with common programming languages ready to go, a database, and Git configured. Your AI agent has full access to build and test.

Runtm works with whichever AI coding CLI you prefer: Claude Code from Anthropic, Codex CLI from OpenAI, or Gemini CLI from Google. Launch your agent of choice from Runtm, and it gets its own virtual computer where it can create files, install packages, run servers, and test everything. The environment is completely isolated, so nothing touches your local machine.

Part 3: Building the backend

Database schema

Give your agent the data model you sketched:

"Create a database schema using Drizzle ORM with SQLite. I need a users table with id, email (unique), name, role (enum: admin/member/viewer), created_at, and updated_at. Also create an audit_log table with id, user_id (foreign key), action (enum: create/update/delete), target_type, target_id, changes (JSON), and created_at. Include the migration."

Your agent will generate the schema and run the migration. Verify it worked before moving on.

API endpoints

"Create REST API endpoints using Hono for users: GET /users with pagination and search by name/email, GET /users/:id, POST /users, PUT /users/:id, DELETE /users/:id. Every mutation should create an audit log entry. Include proper error handling."

Ask for the audit logging upfront. If you forget, you'll have to retrofit it into every endpoint later, which gets tedious.

Have your agent test each endpoint after creating it. Don't move on until the API works.

Authentication

For internal tools, you usually want something simple. OAuth with your company's Google Workspace is often easiest:

"Add Google OAuth authentication using Lucia. Only allow emails from @yourcompany.com domain. Store the authenticated user in a session and make it available to all API routes."

Replace the domain with your actual company domain.

Part 4: Building the frontend

Start with the data table

The users list is the core of this tool, so get it right first.

"Create a React component for a users data table using Tanstack Table. Include columns for name, email, role, and created date. Add a search input that filters by name or email. Add sorting on all columns. Style it with Tailwind CSS, keep it minimal and professional."

Add CRUD modals

"Add a modal for creating new users with a form for email, name, and role. Add an edit modal that opens when clicking a row. Add a delete confirmation modal. All modals should close on success and refresh the table data."

Role-based UI

"Hide the delete button and edit functionality for users who aren't admins. Check the current user's role from the session. Members should see a read-only view."

Audit log page

"Create a separate page at /audit-log that shows recent audit entries. Display who made the change, what they changed, when, and show a diff of the old vs new values for updates."

Part 5: Testing and debugging

Common issues

CORS errors happen when your agent forgets to add CORS headers. Just ask it to add them.

Type mismatches show up when the frontend and backend disagree about types. Ask your agent to create shared type definitions.

Auth redirect loops usually mean the session isn't being set correctly. Check that cookies are being sent properly.

Debugging with your agent

When something breaks, give your agent context:

"The user creation is failing with a 500 error. Here's what I see in the console: [paste error]. Here's the network request: [paste request/response]. What's wrong?"

The more context you provide, the faster it fixes the problem.

Part 6: Deployment

Before you deploy

Test all CRUD operations manually. Verify auth works by trying to log in with both valid and invalid email domains. Check that audit logging captures all mutations. Make sure the UI is usable on smaller screens (your PM will access it on their laptop). Add a favicon and page title so it looks professional in browser tabs.

Deploy from Runtm

When you're ready, deploy directly from your Runtm session. Your tool goes live with a shareable URL.

Share with your team

For internal tools, you might want to add the URL to your company's internal tools wiki, create a Slack shortcut, or bookmark it in your shared browser profile.

What to do next

Once the basic tool is working, you can add email notifications to alert admins when new users are created, integrate with Slack to post audit log entries to a channel, add bulk operations like importing users from CSV, connect to your production database for read-only access, or add charts showing user growth and activity metrics.

The real benefit

Internal tools are force multipliers. A good admin dashboard saves your support team hours every week. A proper approval workflow means fewer Slack threads and email chains.

These tools don't get built because they're not hard enough to justify pulling engineers off product work for a week. AI coding agents change that math. When you can build a functional internal tool in an afternoon, the backlog starts clearing itself.


Build your first internal tool today

Get a sandboxed environment where AI coding agents can build, test, and deploy real applications.

Get Started Free