Skip to main content

The agent system

Gainable uses multiple specialized AI agents, each with a specific role in building your application. Think of them as a team of experts working together.

Planner Agent

The Planner is the first agent to see your request. It analyzes what you want and creates a structured plan.

What the Planner does

  • Understands your intent (create, update, or seed data)
  • Identifies what data models you need
  • Determines which views and features to build
  • Recognizes when to use built-in skills (charts, kanban, chat)
  • Creates a checklist of what will be delivered

Example: Planner in action

When you say: “Build a project tracker with tasks and due dates” The Planner creates:
Intent: Create new application

Summary: Build project tracker with task management

Data models needed:
- Project (name, description, status)
- Task (title, due date, priority, linked to project)

Views:
- Project list with task counts
- Task management within each project

Features:
- Create/edit/delete projects
- Add tasks with due dates
- Filter tasks by status
This plan is then handed to the Build Agent.

DataAnalyzer Agent

The DataAnalyzer is used when you build from data instead of describing an app. It examines your synced data and designs an app spec through conversation.

What the DataAnalyzer does

  • Analyzes schema, field types, and sample data from connected sources
  • Identifies the domain (CRM, project management, finance, etc.)
  • Detects patterns that map to features (pipeline enums → kanban, currency → dashboards)
  • Asks clarifying questions through interactive multiple-choice options
  • Produces a multi-stage build specification
  • Decides where to place collaboration features based on domain context

Example: DataAnalyzer in action

When you connect a Google Sheet with deal data (name, amount, stage, close date), the DataAnalyzer:
Domain detected: CRM / Sales
Key patterns:
- "stage" enum with pipeline values → Kanban board
- "amount" currency field → Dashboard KPIs + charts
- "close_date" date field → Timeline filtering

Recommended views:
- Pipeline (kanban by stage)
- Dashboard (revenue KPIs + charts)
- Deals table (searchable, sortable)
It then asks 2-3 questions to refine the spec before handing off to the Build Agent.

Build Agent

The Build Agent is the workhorse that generates all your application code.

What the Build Agent does

  • Creates database models to store your data
  • Builds API routes for data operations
  • Generates user interface pages
  • Implements forms, tables, and interactive elements
  • Follows proven patterns for reliability

Skills and expertise

The Build Agent has deep knowledge of:
  • Data visualization - Charts, graphs, KPIs
  • Drag-and-drop - Kanban boards, sortable lists
  • Real-time updates - Live data synchronization
  • UI patterns - Forms, modals, drawers, navigation
  • Collaboration - Chat, files, comments integration
When you request a specific feature like “add a chart” or “add a kanban board”, the Build Agent uses specialized knowledge to implement it correctly.

Validation Agent

Before your app is delivered, the Validation Agent checks for common issues.

What Validation catches

  • Forms that don’t save data correctly
  • Missing connections between data and views
  • UI patterns that could break on mobile
  • Common coding mistakes
This happens automatically - you don’t need to do anything. It’s like having a quality assurance team review the code before you see it.

Conversation Agent

When you ask questions about your project (instead of requesting changes), the Conversation Agent helps.

What the Conversation Agent does

  • Answers questions about what was built
  • Explains how features work
  • Helps troubleshoot issues
  • Provides guidance on next steps

Example: Asking questions

"How does the task filtering work?"

How agents communicate

The agents work in sequence, each building on the previous work:
1

Your prompt arrives

You describe what you want to build or change
2

Intent classification

The system determines: build, question, or seed data
3

Planner creates the plan

For build requests, the Planner analyzes and structures the work
4

Build Agent executes

Code is generated following the plan
5

Validation reviews

Generated code is checked for issues
6

Delivery

Your working app appears in the preview
When you use the Build from data path, the DataAnalyzer Agent replaces the Planner Agent in this sequence. Instead of analyzing a text prompt, it analyzes your data schema and produces a build specification through interactive conversation. The Build Agent and Validation Agent work the same way in both paths.

Context preservation

All agents share context about your project:
  • What’s already built - Existing models, views, and features
  • Your preferences - Design choices, naming conventions
  • Project history - Previous changes and iterations
This means you can say things like “add a filter to the deals page” and the agents understand exactly which page you mean.
Context is preserved throughout your session. Each new request builds on everything that came before.

Best practices

To get the most from the agent system:
  1. Be specific - The more detail you provide, the better the results
  2. One thing at a time - Let each build complete before requesting the next
  3. Use natural language - Write like you’re explaining to a colleague
  4. Request by feature name - “Add a pie chart” is clearer than “visualize this somehow”

Custom AI agents in your apps

The agents described above (Planner, Build, Validation, Conversation) are build agents that work behind the scenes to create your app. Gainable also lets you create custom AI agents that live inside your finished app as interactive assistants for your users. Custom agents can chat with users, query your app’s data, reference uploaded documents, and provide guidance through an embedded copilot interface.

Learn about custom AI agents

Create AI assistants with data access, knowledge bases, and an embedded chat interface

Learn more

Skills

Explore built-in features you can request

Prompting guide

Write better prompts for better results

AI agents & copilot

Add custom AI assistants to your apps