Agent for a proprietary programming language

CGI AI Center of Excellence · 2025 – present · Lead architect

Projected 50% less manual work

An agent that reads legacy code in a proprietary language, documents it, and extracts the business rules inside.

How the agent works Legacy scripts in a proprietary language go into a LangGraph workflow, which coordinates vLLM-served models with retrieval. Guardrails keep personal information out and constrain every output to what the grammar allows. What comes out: documentation, business rules and code prepared for migration. Legacy scripts proprietary language Retrieval LangGraph workflow dual-state, dynamic Models vLLM Documentation Business rules Migration readiness Guardrails: PII filtering · EBNF grammar How the agent works Legacy scripts in a proprietary language go into a LangGraph workflow, which coordinates vLLM-served models with retrieval. Guardrails keep personal information out and constrain every output to what the grammar allows. What comes out: documentation, business rules and code prepared for migration. Legacy scripts proprietary language LangGraph workflow dual-state, dynamic Retrieval Models vLLM Documentation Business rules Migration readiness Guardrails: PII filtering · EBNF grammar
The generic shape of the agent, simplified. No client detail.
Read as steps
  1. Legacy scripts written in the proprietary language come in.
  2. A LangGraph dual-state dynamic workflow coordinates the work.
  3. It calls vLLM-served models, with retrieval finding the relevant context.
  4. PII filtering keeps personal information out.
  5. EBNF grammars constrain every output, so it is always well-formed.
  6. What comes out: documentation, extracted business rules and code prepared for migration.

Context

A client’s business rules live in legacy scripts written in a proprietary programming language. The scripts need maintaining and documenting now, and migrating later. Because the language is proprietary, general-purpose models can’t be trusted with it out of the box.

What I did

I lead the agent’s design and delivery. A LangGraph dual-state dynamic workflow coordinates vLLM-served models with retrieval. EBNF grammars constrain every output to what the grammar allows, and PII filtering keeps personal information out. The agent writes documentation, extracts business rules, and prepares the code for migration.

Outcome

Projected 50% less manual work. In progress.

Evidence

Client work, no public page.

Stack

Python, LangGraph, vLLM, RAG, EBNF structured outputs, PII filtering

Qijin Xu is a Lead AI/ML Architect at CGI’s AI Center of Excellence in Toronto. He designs and ships production AI for banks and insurers: LLM agents, RAG systems, and data platforms.

All six projects →