<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Yeldar Saumbayev</title>
    <description>The latest articles on DEV Community by Yeldar Saumbayev (@yeldar_saumbayev_9dff60c0).</description>
    <link>https://dev.to/yeldar_saumbayev_9dff60c0</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4247302%2F395b20a9-9faa-4eaa-81ca-2077138db7c7.jpg</url>
      <title>DEV Community: Yeldar Saumbayev</title>
      <link>https://dev.to/yeldar_saumbayev_9dff60c0</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/yeldar_saumbayev_9dff60c0"/>
    <language>en</language>
    <item>
      <title>We Gave an AI Agent the Keys to Our Low-Code BPM Platform</title>
      <dc:creator>Yeldar Saumbayev</dc:creator>
      <pubDate>Mon, 16 Nov 2026 09:00:17 +0000</pubDate>
      <link>https://dev.to/yeldar_saumbayev_9dff60c0/we-gave-an-ai-agent-the-keys-to-our-low-code-bpm-platform-g30</link>
      <guid>https://dev.to/yeldar_saumbayev_9dff60c0/we-gave-an-ai-agent-the-keys-to-our-low-code-bpm-platform-g30</guid>
      <description>&lt;p&gt;Low-code platforms promise that you won't need to write code. Anyone who has shipped one to an enterprise knows the real story: you still write code. It just lives in scattered places, such as script tasks inside a BPMN diagram, form logic, REST endpoints and scheduled jobs.&lt;/p&gt;

&lt;p&gt;So when AI coding assistants got good, we hit a wall. Claude or Copilot could write a great Go function. But they had no idea what our process looked like, which entities existed, or what our Lua API actually exposed. They guessed, and the guesses were wrong.&lt;/p&gt;

&lt;p&gt;We fixed that by turning the platform itself into a toolbox for the agent. This post explains how.&lt;/p&gt;

&lt;p&gt;TL;DR&lt;br&gt;
DamuBPM is a low-code BPM/ECM platform written in Go, with Lua for business logic and BPMN for processes.&lt;br&gt;
We built an MCP (Model Context Protocol) server that exposes the live platform to Claude Code. That is roughly 85 tools covering entities, processes, script tasks, forms, REST services, cron jobs and the database schema.&lt;br&gt;
Each environment gets its own MCP server, so the agent works against a test instance first.&lt;br&gt;
A CLAUDE.md file with the full Lua API signatures stops the agent from inventing functions.&lt;br&gt;
The result: the agent reads the real process before it changes anything, and its changes land in the platform, not in a chat window.&lt;br&gt;
What DamuBPM is&lt;br&gt;
DamuBPM is a low-code platform for business processes (BPM) and enterprise content management (ECM). We build it at B-Apps in Kazakhstan. It runs document workflows for large companies and universities. Among them are Nazarbayev University and the energy company MAEK (part of Kazatomprom).&lt;/p&gt;

&lt;p&gt;The stack is deliberately boring where it should be:&lt;/p&gt;

&lt;p&gt;Go for the core: the process engine, the REST layer and integrations.&lt;br&gt;
PostgreSQL for everything persistent.&lt;br&gt;
BPMN for process design. Analysts draw the process, and developers fill in the script tasks.&lt;br&gt;
Lua for business logic inside processes. We embed a Lua runtime in Go and expose a standard library to scripts, including bindings for Go's strings and fmt packages and for Redis.&lt;br&gt;
JIT Angular for user tasks. Forms are Angular components that are compiled at runtime, so a new form ships without rebuilding the frontend.&lt;br&gt;
One detail makes the platform unusual outside the region. DamuBPM connects companies to ESEDO, Kazakhstan's interagency e-document system. A gateway at gate.damubpm.kz lets on-premise installations exchange official letters with government agencies. We also run a cloud edition at onedoc.kz.&lt;/p&gt;

&lt;p&gt;The problem: the agent can't see the platform&lt;br&gt;
In a normal codebase, an AI assistant reads your files and learns your conventions. A low-code platform has almost no files to read. The code that matters lives in the database:&lt;/p&gt;

&lt;p&gt;a Lua script attached to one step of one BPMN process&lt;br&gt;
a form made of UI blocks on a page&lt;br&gt;
an entity, its attributes and who is allowed to see them&lt;br&gt;
a REST service, a cron job or a translation key&lt;br&gt;
Ask a general-purpose assistant to "add a manager approval step to the ticket process" and it has to guess every one of these. It guesses entity names. It invents Lua functions that sound plausible. It writes a form for a framework we don't use. Then a developer copies the answer by hand into the right place in the admin UI and fixes the guesses.&lt;/p&gt;

&lt;p&gt;The model was smart enough. It just had no eyes and no hands inside the platform.&lt;/p&gt;

&lt;p&gt;The approach: the platform as an MCP server&lt;br&gt;
Model Context Protocol is an open standard for giving AI agents tools. An MCP server publishes a list of typed functions. The agent, here Claude Code, decides when to call them.&lt;/p&gt;

&lt;p&gt;We wrapped DamuBPM's admin API in an MCP server. Every object a developer can touch in the admin UI, the agent can now read and change through a tool call. There are about 85 tools in total. They fall into a few groups:&lt;/p&gt;

&lt;p&gt;Group   Example tools   What the agent does with them&lt;br&gt;
Data model  get_entities, get_entity_detail, create_entity, add_entity_attr, db_get_schema  Learns the real tables and fields before writing anything&lt;br&gt;
Processes   get_bp_process_details, create_bp_process, update_bp_process_diagram, update_bp_sequence_flows  Reads and edits BPMN diagrams and their flows&lt;br&gt;
Logic   update_bp_points_script_, add_vars_to_bp_process, get_query Writes Lua into a specific process step&lt;br&gt;
UI  update_bp_points_usertask, create_page, add_page_ui_blocks, create_angular_widget   Builds the form a user sees at each step&lt;br&gt;
Integration create_rest_service, create_crontab, damu_send_email    Adds endpoints, scheduled jobs and notifications&lt;br&gt;
Access  entity_grants_list, entity_grants_set, entity_view_limits_list  Checks and sets who can see what&lt;br&gt;
Ops app_journal_logs, patch_out_create, patch_out_add_objects   Reads logs and packs changes into a patch for another environment&lt;br&gt;
The tools are deliberately small and close to the platform's own concepts. We did not build one magic "do the task" tool. The agent composes small tools the way a developer clicks through the admin UI, and that keeps every step visible and reviewable.&lt;/p&gt;

&lt;p&gt;The agent changes a test instance; production gets a patch&lt;br&gt;
Claude Code&lt;br&gt;
Reads and edits the&lt;br&gt;
platform via tools&lt;br&gt;
CLAUDE.md: Lua API&lt;br&gt;
MCP server&lt;br&gt;
test instance&lt;br&gt;
MCP server&lt;br&gt;
production instance&lt;br&gt;
DamuBPM · test instance&lt;br&gt;
Go core: BPMN engine, REST&lt;br&gt;
Lua scripts in process steps&lt;br&gt;
JIT Angular user tasks&lt;br&gt;
PostgreSQL&lt;br&gt;
DamuBPM · production&lt;br&gt;
same stack&lt;br&gt;
explicit choice&lt;br&gt;
patch&lt;br&gt;
One MCP server per DamuBPM instance. The agent works on the test instance by default; production receives the finished change as a patch.&lt;br&gt;
Grounding: one file with the whole Lua API&lt;br&gt;
Tools let the agent see the platform. They don't teach it the scripting language. Lua scripts in DamuBPM call our own standard library, and no model was trained on it.&lt;/p&gt;

&lt;p&gt;So we wrote a CLAUDE.md file that Claude Code loads at the start of every session. It contains:&lt;/p&gt;

&lt;p&gt;the full signature of every Lua function we expose, with argument types and return values&lt;br&gt;
the conventions for process variables, entity access and error handling in scripts&lt;br&gt;
rules for the agent, such as "read the process before changing it" and "never write to production directly"&lt;br&gt;
Without this file, the agent invents Lua functions that sound right but don't exist. With it, the agent uses real signatures, and code review is about logic instead of syntax.&lt;/p&gt;

&lt;p&gt;Walkthrough: adding an approval step&lt;br&gt;
Here is a typical task in our helpdesk application. The developer types one sentence into Claude Code:&lt;/p&gt;

&lt;p&gt;In the ticket process, tickets with priority "Critical" must be approved by the department head before they go to the engineer. The head can approve or reject with a comment.&lt;/p&gt;

&lt;p&gt;The agent then works through the platform step by step:&lt;/p&gt;

&lt;p&gt;Reads before writing. It calls get_bp_process_list_ and get_bp_process_details to find the ticket process and see its current steps and flows. Then it calls get_entity_detail to learn the ticket's real fields, including how priority is stored.&lt;br&gt;
Extends the data model. It adds the fields the new step needs, such as the approval decision and the comment, with add_entity_attr, and registers new process variables with add_vars_to_bp_process.&lt;br&gt;
Changes the diagram. It inserts a user task and an exclusive gateway with update_bp_process_diagram, then rewires the arrows with update_bp_sequence_flows.&lt;br&gt;
Writes the logic. It puts a Lua script on the gateway step with update_bp_points_script_. The script uses only functions from CLAUDE.md.&lt;br&gt;
Builds the form. It configures the approval user task with update_bp_points_usertask, a form with Approve and Reject and a comment field.&lt;br&gt;
Checks the result. It reads the process back and checks app_journal_logs after a test run.&lt;br&gt;
The developer reviews each change as it happens, because each one is a separate, named tool call. Nothing is pasted from a chat window. When the change is right on the test instance, it moves on as a patch.&lt;/p&gt;

&lt;p&gt;Guardrails: giving an agent write access safely&lt;br&gt;
An agent that can change live business processes is powerful, and it can also break things. These are the rules we follow:&lt;/p&gt;

&lt;p&gt;One MCP server per environment. Test and production instances are separate servers with separate credentials. The agent works on the test instance by default, and production is a deliberate choice.&lt;br&gt;
Changes travel as patches. Instead of repeating the work on production, we collect the changed objects into a patch (patch_out_create, patch_out_add_objects) and promote it the usual way.&lt;br&gt;
SQL is the sharpest tool. db_execute_sql is useful for exploring data and dangerous for everything else. Give it a read-only database role wherever you can.&lt;br&gt;
Read first, always. The rule "read the current state before changing it" lives in CLAUDE.md. It prevents most bad edits, because the agent stops working from assumptions.&lt;br&gt;
A human approves writes. Claude Code asks before each tool call that changes something, unless you allow it. We keep confirmations on for every write tool.&lt;br&gt;
What we learned&lt;br&gt;
Low-code and AI agents fit together better than either fits alone.&lt;br&gt;
A low-code platform has a structured model of every process, form and entity. That structure is exactly what an agent needs to act precisely. In return, the agent removes the part of low-code nobody likes: clicking through dozens of admin screens.&lt;br&gt;
Small tools beat smart tools.&lt;br&gt;
Tools that mirror the platform's own concepts are easy for the model to combine and easy for a human to review. Big "do everything" tools hide what happened.&lt;br&gt;
Documentation is now an input, not an afterthought.&lt;br&gt;
The quality of the agent's Lua depends directly on the quality of CLAUDE.md. Keeping that file accurate belongs in the definition of done.&lt;br&gt;
Name tools for the model, not for yourself.&lt;br&gt;
Some of our tool names grew historically, like get_dashboads_list with its typo. The model copes, but clear names and descriptions make its choices more reliable.&lt;br&gt;
What's next&lt;br&gt;
The same MCP layer already reaches beyond processes: it also drives our builder for Flutter mobile apps.&lt;/p&gt;

&lt;p&gt;If you build internal platforms, low-code tools or BPM systems, our advice is simple. Don't ask the AI to guess your platform. Give it tools to read the real state, a reference for your APIs, and a test environment to work in.&lt;/p&gt;

&lt;p&gt;Want to see DamuBPM in action, or compare notes on MCP for enterprise systems? Try the cloud edition at onedoc.kz or reach the team at bapps.kz.&lt;/p&gt;

&lt;p&gt;Yeldar, technical lead at B-Apps, the team behind DamuBPM.&lt;/p&gt;

</description>
      <category>bpm</category>
      <category>kazakhstan</category>
    </item>
  </channel>
</rss>
