Skip to main content

Semi-Autonomous Agents Building BC Applications in AL

Semi-autonomous agents building BC applications

Jesper Theil Hansen · Mar 2025 · 2 min read

Tags: AI, Agents, Claude, Ollama, Automation, Business Central, DevOps, LLM, GitHub


A bit late to the game maybe, but this weekend I finally got time to set up the agent-driven Business Central stack I've been thinking about for some time.

I have a medium-sized workstation (8GB GPU, 64GB RAM), but good enough to run some local models. I wanted a setup that balances speed, convenience and cost.

The result is a small engineering team consisting of:

Agent Sam — Junior Developer

  • Uses Aider
  • Runs local models via Ollama
  • Currently powered by Qwen2.5-Coder 32B
  • Sam handles small fixes and most straightforward coding tasks, even across multiple source files.

Agent Niles — Senior Developer

  • Uses Claude Code API
  • Handles whole features, more complex reasoning tasks and escalation cases from Sam
  • Writes architecture and user documentation

The Process

  1. Create a GitHub issue describing a feature or a fix (2 different templates currently)
  2. Assign issue (via label) to Agent:Sam or Agent:Niles depending on task complexity
  3. n8n picks up the issue on the workstation and kicks off the AgentManager
  4. AgentManager delegates to Sam or Niles
  5. Agent writes code/changes
  6. Project is built:
    • If fix passes build check → Create PR
    • If fix made by Sam fails build → Escalate to Niles who takes over
    • If fix made by Niles fails build → Niles posts the build errors in a comment on the issue and escalates to a human who manually fixes or uses Claude to finish
  7. GitHub code review (potentially with Copilot)
  8. Merge PR

Conclusions So Far

  • Qwen2.5-Coder 32B is surprisingly good for a local model. I had a hard time getting it to fail to test the escalation flow — it kept fixing the errors I introduced on purpose. And it's "free".
  • Claude cost for a small new project is ~$1 per roundtrip/PR. Expect this to be much higher on a large project — segmenting the context window will be necessary.
  • The escalation flow works well: Sam handles the routine work, Niles picks up when complexity increases.

← Back to Blog