agent-builder
Agent Toolkit Builder — specialist in designing and coding Business Central agents using the AI Development Toolkit and Agent…
Build, configure, and integrate Business Central agents using the AI Development Toolkit and Agent SDK. Triggers on Agent SDK, Agent Metadata Provider, IAgentFactory, IAgentMetadata, IAgentTaskExecution, ConfigurationDialog, Agent Task Builder, Agent Session, Copilot Capability,
$ npx -y skills add javiarmesto/ALDC-AL-Development-Collection --skill skill-agent-toolkit --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/skill-agent-toolkitContext preview
The summary Claude sees to decide when to auto-load this skill.
Build, configure, and integrate Business Central agents using the AI Development Toolkit and Agent SDK. Triggers on Agent SDK, Agent Metadata Provider, IAgentFactory, IAgentMetadata, IAgentTaskExecution, ConfigurationDialog, Agent Task Builder, Agent Session, Copilot Capability,
name: skill-agent-toolkit description: Build, configure, and integrate Business Central agents using the AI Development Toolkit and Agent SDK. Triggers on Agent SDK, Agent Metadata Provider, IAgentFactory, IAgentMetadata, IAgentTaskExecution, ConfigurationDialog, Agent Task Builder, Agent Session, Copilot Capability, agent instructions, or agent setup in BC context.
Manual del Agent SDK: arquitectura, registro, las 3 interfaces, Setup Codeunit, ConfigurationDialog, Install/Upgrade, project structure. Para patterns de creación de tasks ver `skill-agent-task-patterns`. Para redactar instrucciones de agente ver `skill-agent-instructions`.
**Reference oficial**: https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/ai/ai-development-toolkit-overview
| Path | Use when | Result | | ------------------------- | --------------------- | ---------------------------------------------------------- | | **Designer (No-Code)** | Prototyping, testing | Agent via wizard with .github/instructions/profile/permissions | | **SDK (Pro-Code)** | Production, extensions| Coded agent via AL interfaces, shipped in .app |
Both share the same runtime: an agent is a BC user that interacts with the UI via a logical UI API.
app/
├── .resources/Instructions/InstructionsV1.txt # Agent instructions (resource file)
├── Example/
│ ├── {Agent}CustomerCardExt.PageExt.al # Page extension (task trigger example)
│ ├── {Agent}PublicAPI.Codeunit.al # Public API (Access = Public)
│ └── {Agent}PublicAPIImpl.Codeunit.al # Implementation (Access = Internal)
├── Integration/
│ ├── {Agent}CopilotCapability.EnumExt.al
│ ├── {Agent}Install.Codeunit.al
│ └── {Agent}Upgrade.Codeunit.al
└── Setup/
├── {Agent}Setup.Codeunit.al # Centralized setup logic
├── {Agent}Setup.Page.al # ConfigurationDialog
├── {Agent}Setup.Table.al # PK = User Security ID
├── KPI/{Agent}KPI.{Table,Page}.al # CardPart for hover summary
├── Metadata/
│ ├── {Agent}Factory.Codeunit.al # IAgentFactory
│ ├── {Agent}Metadata.Codeunit.al # IAgentMetadata
│ └── {Agent}MetadataProvider.EnumExt.al
├── Permissions/{Agent}.permissionset.al # Includes D365 BASIC
├── Profile/
│ ├── {Agent}Profile.Profile.al
│ ├── {Agent}RoleCenter.Page.al
│ └── {Agent}*.PageCustomization.al
└── TaskExecution/
└── {Agent}TaskExecution.Codeunit.al # IAgentTaskExecutionenumextension 52100 "My Agent Copilot Capability" extends "Copilot Capability"
{
value(52100; "My Agent Capability") { Caption = 'My Agent'; }
}enumextension 52101 "My Agent Metadata Provider" extends "Agent Metadata Provider"
{
value(52101; "My Agent")
{
Caption = 'My Agent';
Implementation = IAgentFactory = MyAgentFactory,
IAgentMetadata = MyAgentMetadata,
IAgentTaskExecution = MyAgentTaskExecution;
}
}Always unregister before register to handle version updates cleanly. Re-install instructions for existing agent setup records.
codeunit 52101 "My Agent Install"
{
Subtype = Install;
Access = Internal;
InherentEntitlements = X;
InherentPermissions = X;
trigger OnInstallAppPerDatabase()
var
MyAgentSetup: Record "My Agent Setup";
begin
RegisterCapability();
if MyAgentSetup.FindSet() then
repeat
InstallAgentInstructions(MyAgentSetup);
until MyAgentSetup.Next() = 0;
end;
local procedure RegisterCapability()
var
CopilotCapability: Codeunit "Copilot Capability";
LearnMoreUrlTxt: Label 'https://docs.example.com', Locked = true;
begin
if CopilotCapability.IsCapabilityRegistered(Enum::"Copilot Capability"::"My Agent Capability") then
CopilotCapability.UnregisterCapability(Enum::"Copilot Capability"::"My Agent Capability");
CopilotCapability.RegisterCapability(
Enum::"Copilot Capability"::"My Agent Capability",
Enum::"Copilot Availability"::Preview,
"Copilot Billing Type"::"Microsoft Billed",
LearnMoreUrlTxt);
end;
}Trigger `OnUpgradePerDatabase` — manage instruction updates per UpgradeTag.
| Method | Purpose | | -------------------------------------------------------------------------- | ------------------------------------ | | `GetDefaultInitials(): Text[4]` | Agent avatar initials | | `GetFirstTimeSetupPageId(): Integer` | Setup page on first creation | | `ShowCanCreateAgent(): Boolean` | Single-instance vs multi gate | | `GetCopilotCapability(): Enum "Copilot Capability"` | Feature switch reference | | `GetDefaultProfile(var TempAllProfile: Record "All Profile" temporary)` | Default UI profile | | `GetDefaultAccessControls(var TempAccessControlBuffer: Record temporary)` | Default permission template |
Delegate every method to the Setup Codeunit:
codeunit 52100 MyAgentFactory implements IAgentFactory
{
Access = Internal;
procedure GetSkills-based, spec-driven, TDD-orchestrated development framework for Microsoft Dynamics 365 Business Central. Engineering systems, visibly reasoned.
Agent Toolkit Builder — specialist in designing and coding Business Central agents using the AI Development Toolkit and Agent…
Generate optimized natural language instructions for Business Central agents (Designer or SDK). Applies the…
End-to-end workflow to create a coded Business Central agent using the Agent SDK. Orchestrates the 7 phases following the…
Generate optimized natural language instructions for Business Central agents (Designer or SDK). Applies the…
Generate AL code for Business Central Agent SDK task integration. Applies the patterns from skill-agent-task-patterns to produce…
Generate comprehensive test codeunits for Business Central Agent SDK integrations. Covers 6 categories: Registration, Factory,…