AI Use Cases

Practical AgileBuilder AI integration examples

Overview

This article demonstrates how to use AgileBuilder in AI conversations through real-world scenarios.


Scenario 1: Creating a New Project

User Request

"Create a React + TypeScript admin dashboard project"

AI Execution Flow

1. AI calls listTemplates to view available templates
2. AI finds the react-admin template
3. AI calls getTemplateInfo for template details
4. AI discovers TypeScript support option
5. AI calls generateProject to create the project
6. Returns project path and usage instructions

Conversation Example

User: Create a React + TypeScript admin dashboard project

AI: I'll help you create that project. Let me first check the available templates...

āœ“ Found suitable template: react-admin
āœ“ Template supports TypeScript
āœ“ Starting project generation...

šŸ“¦ Project created: ./my-admin-app

Project configuration:
- Framework: React 18
- TypeScript: āœ“ Enabled
- UI Library: Ant Design
- State Management: Redux Toolkit

Next steps:
  cd my-admin-app
  npm install
  npm run dev

Scenario 2: Generate Code Based on Standards

User Request

"Generate CRUD code for user management based on our API spec"

AI Execution Flow

1. AI queries docs/api-spec
2. AI retrieves API spec details (RESTful style, response format, etc.)
3. AI generates CRUD code according to the spec
4. AI ensures code follows naming conventions

Conversation Example

User: Generate CRUD code for user management based on our API spec

AI: I'll help you generate that. Let me first check the team's API spec...

āœ“ Retrieved API spec
āœ“ RESTful style
āœ“ Unified response format: { code, data, message }

Generating code...
āœ“ UserController.ts
āœ“ UserService.ts
āœ“ UserModel.ts
āœ“ routes.ts

Code generated according to spec:
- Standard RESTful endpoints
- Unified error handling
- TypeScript type definitions

Scenario 3: Create a Project Following Team Standards

User Request

"Create a new frontend module using our standard structure"

AI Execution Flow

1. AI queries docs/module-standards
2. AI retrieves module directory structure standards
3. AI retrieves naming conventions
4. AI generates project structure following standards

Conversation Example

User: Create a new frontend module using our standard structure

AI: Sure, let me first check the team's module structure standards...

āœ“ Retrieved module standards
āœ“ Directory structure: feature/component/hooks/utils
āœ“ Naming: PascalCase (components), camelCase (functions)
āœ“ Must include index.ts export

Generating module...
āœ“ src/features/User/
  āœ“ index.ts
  āœ“ UserPage.tsx
  āœ“ UserModal.tsx
  āœ“ useUser.ts
  āœ“ userApi.ts
  āœ“ types.ts

Scenario 4: Batch Generation

User Request

"Generate API interface code for all business modules in our company"

AI Execution Flow

1. AI gets list of all modules to generate
2. AI queries API spec document
3. Batch generates API code for each module
4. Creates unified export file

Conversation Example

User: Generate API interfaces for the following modules: User, Order, Product

AI: I'll batch generate API code for these three modules...

Querying specs: āœ“ API spec retrieved

Starting generation...
āœ“ User API — Complete
āœ“ Order API — Complete
āœ“ Product API — Complete

Generation summary:
- User API: src/api/user.ts
- Order API: src/api/order.ts
- Product API: src/api/product.ts
- Unified export: src/api/index.ts

Tips and Suggestions

1. Specify Templates Explicitly

"Create a project using react-ts-template" āœ“
"Create a React project" āœ—

2. Reference Team Standards

"Generate according to docs/api-spec" āœ“
"Generate according to standard" āœ—

3. Break Down Complex Tasks

For complex tasks, let the AI work through them step by step:

1. "First, show me what templates are available"
2. "Select xxx template and generate a project"
3. "Generate code according to docs/standards"

Next Steps