al-agent-task

al-agent-task is a command for Claude Code from javiarmesto/ALDC-AL-Development-Collection. It costs 40 tokens per session (619 once invoked), scanned A, original, MIT.

A command that generates AL code for connecting a Microsoft Dynamics 365 Business Central extension to the Agent SDK, which lets software agents receive and process work. It applies documented integration patterns to codeunits, page extensions, and event subscribers.

In plain words
What is it for?
Use it to create public APIs, buttons that send work to an agent, posting or release triggers, file-processing flows, continuing tasks, and code that runs only in an agent context.
Why use it?
It helps developers choose an integration approach and follow existing project conventions instead of designing the connection from scratch.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Part of the aldc plugin — 10 commands, 1 hook shipped together

Good fit Use it to create public APIs, buttons that send work to an agent, posting or release triggers, file-processing flows, continuing tasks, and code that runs only in an agent context.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/javiarmesto/aldc-al-development-collection/al-agent-task
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/javiarmesto/ALDC-AL-Development-Collection

Made for: Claude Code.

Or install aldc, the plugin that ships this one along with the rest of its 10 commands, 1 hook.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for al-agent-task

README.md
[![agentmods](https://agentmods.dev/badge/commands/javiarmesto/aldc-al-development-collection/al-agent-task/github.svg)](https://agentmods.dev/commands/javiarmesto/aldc-al-development-collection/al-agent-task)
Your own site
<a href="https://agentmods.dev/commands/javiarmesto/aldc-al-development-collection/al-agent-task"><img src="https://agentmods.dev/badge/commands/javiarmesto/aldc-al-development-collection/al-agent-task/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for al-agent-task

Your own site · 80×15
<a href="https://agentmods.dev/commands/javiarmesto/aldc-al-development-collection/al-agent-task"><img src="https://agentmods.dev/badge/commands/javiarmesto/aldc-al-development-collection/al-agent-task.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 40 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 619 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00040 $0.00619
Opus 5 $0.00020 $0.00309
Sonnet 5 $0.00008 $0.00124
Haiku 4.5 $0.00004 $0.00062

Measured 9d ago against content hash 261442f6cc16, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

al-agent-task scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

claude-plugin/commands/al-agent-task.md · 57 lines

How it starts

The opening of the file, as written. The whole thing — 57 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Workflow: Generate Agent Task Integration Code

You are an expert AL developer. Generate production-ready AL code for agent task integration.

The skill bc-agent-task-patterns provides the 8 integration patterns and SDK codeunit reference. Use it as your knowledge base.

Step 1 — Gather Context

Before generating code, determine:

  1. Agent name and prefix: Read from app.json or ask the developer
  2. Object ID range: Check existing objects in app/ to find the next available IDs
  3. Which pattern(s): Ask the developer or infer from their request:
    • "I need a Public API" → Pattern A
    • "Add a button to send work to the agent" → Pattern B (calls A)
    • "Trigger agent on posting/releasing" → Pattern C (calls A)
    • "Agent needs to process files" → Pattern D (combine with A/B/C)
    • "Continue an existing task" → Pattern E
    • "Run code only in agent context" → Pattern G/H
  4. ExternalId format: Convention is {PREFIX}-{No.} (e.g., LEAD-001, SO-1001)
  5. Target page/table: Which page extension or event subscriber is needed?

Step 2 — Generate Code

For each requested pattern:

  1. Search the codebase for existing agent objects (Setup table, Public API, enums) to reuse
  2. Generate the AL objects following the pattern from the skill, substituting:
    • {Agent} → actual agent name/prefix
    • {id} → actual object IDs
    • Record names, field names, enum values → actual project values
  3. Place files in the correct project structure folder:
    • Public API + Impl → app/Example/
    • Page extensions → app/Example/
    • Session events → app/Setup/TaskExecution/
  4. Verify generated code references correct enum values and codeunit names from the project

Step 3 — Validate

  • All generated codeunits compile (correct parameter types, return types)
  • Public API has Access = Public, Implementation has Access = Internal
  • Event-driven task creation uses [TryFunction]
  • Business conditions checked BEFORE task creation
  • Failures logged via Session.LogMessage
  • ExternalId follows the agreed format convention
  • Page extensions use AgentSetup.OpenAgentLookup() for agent selection

Read the full file on GitHub · 57 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 57 lines · 40 tokens per session scan A 261442f6cc16

Subscribe to this mod's changes

al-agent-task is a command published in the GitHub repository javiarmesto/ALDC-AL-Development-Collection (103 stars, last pushed 2d ago), licensed MIT. It adds 40 tokens to every session and 619 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.