AL AI Sage
A Visual Studio Code extension for Microsoft Dynamics 365 Business Central AL developers that provides AI-powered code reviews and explanations.
Features
- Code Review: Analyzes AL code for bugs, performance issues, and Business Central best practices
- Code Description: Explains AL code functionality with examples and Business Central concepts
- Custom Questions: Add
@alai: comments in code for specific AI analysis
- Multi-AI Support: Compatible with OpenAI, Google Gemini, and Anthropic
- Multi-Language: Responses available in multiple languages
Configuration
Initial Setup
- Open Command Palette (
Ctrl+Shift+P )
- Run:
AL AI Sage: Configure
- Configure the following settings:
AI Provider Settings
- LLM Family: Choose between OpenAI, Google Gemini, or Anthropic
- Model Name: Enter the specific model (see supported models below)
- API Key: Enter your API key for the selected provider
Supported Models
The extension supports all models available through the providers' APIs. For current model availability and names, refer to:
Language Settings
- Response Language: Set preferred language (english, italian, spanish, french, german, portuguese, chinese, japanese)
API Key Setup
OpenAI
- Visit OpenAI Platform
- Create account and generate API key
- Add key in extension configuration
Google Gemini
- Visit Google AI Studio
- Sign in and create API key
- Add key in extension configuration
Anthropic
- Visit Anthropic Console
- Create account and generate API key
- Add key in extension configuration
Usage
Code Review
- Select AL code or place cursor in file
- Command Palette →
AL AI Sage: Review Code
- View results in side panel
Code Description
- Select AL code
- Command Palette →
AL AI Sage: Describe Code
- View explanation in side panel
Custom Questions
Add comments in your code:
//@alai: How can I optimize this for better performance?
procedure MyProcedure()
begin
// your code here
end;
Insert questions:
- Command Palette →
AL AI Sage: Insert Question
- Type
@ and select autocomplete suggestion
Commands
Command |
Description |
AL AI Sage: Configure |
Open configuration panel |
AL AI Sage: Review Code |
Analyze selected AL code |
AL AI Sage: Describe Code |
Explain selected AL code |
AL AI Sage: Insert Question |
Insert @alai comment |
Troubleshooting
API Key Issues
- Verify API key is correct in configuration
- Check API quota/credits with provider
Connection Issues
- Verify internet connection
- Try different model or provider
No Response
- Check VS Code Output panel for errors
- Verify selected code is valid AL syntax
Requirements
- Visual Studio Code 1.74.0+
- AL Language Extension
- Internet connection
- API key for at least one AI provider
Privacy
- API keys stored securely in VS Code
- Code sent to selected AI provider for analysis
- No local data retention by extension
| |