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
- AI Workflow - Configure AI workflows
- AI Tool Compatibility - Tool support details
- Document System - Manage team documents