category
Disclosure: I maintain PRAXO-CORE. This article reflects the 2.10.0 source state; it is not a production or security certification.
The default answer for COBOL and AI is migration.
Use an agent to read the COBOL, translate it into Java or C#, and move the
workload to a new runtime. It is a familiar story: the old system is a liability,
the new system is the future, and the agent is the translator.
For some estates, that is the right answer. But it is not the only one, and it is
rarely a small project. A core ledger, a claims batch, a benefits system, or a
reservation engine is not just code. It is a set of transactions, reconciliations,
audit trails, and change-control procedures that have survived for decades
because they work.
PRAXO-CORE is testing a different answer: keep the COBOL runtime, and put a
governed agent loop in place.
Not a bridge. Not a migration translator. A native GnuCOBOL implementation of the
agent contract that a COBOL program can call directly.
The third path
The usual integration pattern is a sidecar. A new Python or Java service owns the
agent loop, and the COBOL program exposes a tool or an API. This is often the
right engineering choice. It isolates the new runtime, avoids touching fragile
code, and lets the AI team move quickly.
But the governance boundary moves with the agent. Policy, tool authorization,
checkpoints, audit events, and human approval now live in the sidecar. Every
control has to cross a process or network boundary. That can be made to work, but
it is a larger integration surface than it first appears.
The third path is to put the agent loop where the transaction already lives. The
COBOL program calls the loop, passes a prompt and options, dispatches tools,
applies policy, and receives a result. The batch job keeps its runtime. The agent
meets it there.
This is the claim behind the COBOL SDK. It is narrower than “AI for COBOL” and
more useful: a governed loop inside the runtime that already owns the data and
the change-control process.
What “native COBOL” actually means
The COBOL SDK is implemented in GnuCOBOL. It is not a bridge to Go, Python, C, or
another SDK. The agent loop, JSON parsing, schema validation, tool-call parsing,
context estimation, checkpoint envelopes, memory, policy, events, and middleware
are native COBOL programs.
The current target is GnuCOBOL 2.0 or later. Python 3.10 or later is used by the
test driver to generate and launch native tests; a compiled SDK consumer does not
need Python at runtime.
IBM z/OS is not verified. This matters. “COBOL” is not one runtime, and a
GnuCOBOL implementation is not automatically a z/OS implementation. The campaign
should say GnuCOBOL in the first paragraph and put z/OS in the limits.
The source tag is cobol/v0.8.0. It is a source release, not a package-registry
release. The SDK sources are MIT-licensed; GnuCOBOL and its runtime are
separately licensed external toolchain dependencies.
Architecture
The core entry point is praxo-run:
call "praxo-run" using px-options px-session px-prompt
px-result px-user-data
px-options names the model, tool dispatcher, policy, and event programs.
px-user-data is a caller-owned 4096-byte callback context. A blank callback
status means success; model and tool statuses propagate; a nonblank policy status
denies the action. The input session is not mutated, and each run uses local
history.
Around that loop, the SDK provides a set of native programs:
| Program | Purpose |
|---|---|
praxo-run |
Agent loop with model, tool dispatcher, policy, and event callbacks |
praxo-checkpoint |
Registered payload-type JSON envelopes |
praxo-context |
Token estimate and context compaction |
praxo-event |
Filter and multi-sink event delivery |
praxo-jsonschema |
Object/array schema validation |
praxo-memory |
In-memory session records and search |
praxo-middleware |
Call limits, tool selection, fallback, structured output, email redaction |
praxo-path-normalize |
Lexical path normalization |
praxo-pattern-check |
Bounded ASCII pattern matcher |
praxo-plugin |
Strict manifest parsing and validation |
praxo-policy |
Lexical path grants |
praxo-stream |
Stream-kind constants |
praxo-toolcall |
JSON, XML-style, dotted-tag, and plain tool-call parsing |
praxo-json-*, praxo-utf8 |
Native JSON and UTF-8 utilities |
This is a serious amount of infrastructure for a language that is often described
as having no modern libraries. The interesting part is not that it is possible.
It is that the behavior can be checked: 63 normative vectors across 11 groups,
plus native agent, JSON, contract-boundary, tooling, and API declaration checks.
The remote cobol-conformance job passes.
The physical limits are the feature
COBOL is not Python. It does not have dynamic memory allocation, an async network
stack, or a modern JSON parser in the standard library. The SDK makes the
constraints explicit:
- JSON input is limited to 32,768 bytes, 512 nodes, and 64 nested containers.
- Generated JSON is limited to 16,384 bytes.
- Invalid UTF-8, lone surrogates, malformed numbers, and trailing data are
rejected. - Duplicate object keys are retained; lookup uses the last value.
- Schema patterns are a bounded ASCII subset. Groups, alternation, counted
repetition, Unicode pattern matching, and unsupported escapes fail explicitly
withSCHEMA_PATTERN_UNSUPPORTEDinstead of silently accepting data. - Path policy is lexical normalization, not OS confinement. It rejects UNC,
drive-relative, and traversal-outside-root paths in the exercised cases, but it
does not resolve symlinks, reparse points, filesystem case rules, or races. - Plugin parsing validates declarations. It does not verify signatures; process
plugin host integration is partial through the C ABI. - Middleware redacts email addresses. It is not a general PII control.
- Event and stream programs exercise contract behavior; they are not an
asynchronous runtime.
For a modern AI workload, 32 KB is small. For a fixed-record COBOL batch, a hard
boundary is the point. The limit makes the failure mode predictable. It prevents
a model-generated payload from quietly becoming an unbounded memory problem.
What it does not do
The campaign is stronger if it says this clearly:
- It is not full Go feature parity. The parity inventory still marks several P1
rowspartial, andtool.Registryispartial. - It ships OpenAI-compatible, Anthropic, and Gemini adapters over caller-supplied transports; it is not a hosted provider runtime.
- It does not carry a full Go-style assistant history; stream parts and event
session/run IDs remain partial. - It does not provide an asynchronous high-throughput runtime.
- It does not support arbitrary-precision numbers.
- It does not provide OS-level sandboxing.
- It does not provide full PII redaction.
- It does not verify signatures; process plugin host integration is partial through the C ABI.
- It does not claim IBM z/OS support.
- It does not claim production readiness for your workload.
These are not footnotes. They are the boundary that makes the native claim
credible.
Governance is the point
A bank does not need an agent that can talk about a COBOL program. It needs an
agent that can participate in a regulated process without bypassing the controls
around that process.
That means:
- policy hooks that see the final tool arguments;
- explicit tool authorization, including a second check after middleware edits;
- path containment and a sandbox seam that are not confused with a lexical
helper; - checkpoints that support recovery;
- structured events for audit and telemetry;
- human-in-the-loop approval at the right boundary;
- a clear statement of what the framework does not own.
If the loop lives in the COBOL runtime, the number of places where a policy
decision can get lost is smaller. That is the practical argument for an in-place
agent boundary.
A small integration sketch
The integration is not “no code.” It is “no rewrite.”
A batch program can call the loop from a procedure division, passing an options
structure, a session, a prompt, a result area, and a callback context. The caller
supplies the model callback, tool dispatcher, policy program, and event program.
The SDK owns the loop and the contract checks; the product owns the provider,
the tools, the policy content, and the operational deployment.
That is a meaningful boundary. It keeps the transaction in the runtime that
already has the data, while leaving model access and business policy with the
integrator.
How to evaluate
Do not start with the phrase “AI in COBOL.” Start with the matrix and the COBOL
README.
- Confirm the tier, tag, and current scope.
- Run
python language/cobol/run-tests.pyin a GnuCOBOL environment. - Read the 32 KB / 512 / 64 limits and decide whether they fit your workload.
- Check the parity inventory for the surfaces you need.
- Test the security behavior you actually depend on: path handling, policy
ordering, cancellation, and callback failure. - Decide whether a native loop, a bridge, or a sidecar is the right fit.
Repo: https://github.com/axisvela/praxo-core
COBOL docs: https://axisvela.github.io/praxo-core/languages/cobol/
COBOL source: https://github.com/axisvela/praxo-core/tree/main/language/cobol
Matrix: https://github.com/axisvela/praxo-core/blob/main/spec/languages.md
Invitation
The interesting question is not “Can COBOL call a model?” It can.
The interesting question is whether a governed agent loop can be made dependable
in the runtime that already owns the transaction — and whether the limits can be
stated clearly enough that an operator trusts the failure modes.
If you run a GnuCOBOL or COBOL batch estate, I would value the hard questions.
What would you test first? Which boundary should be native, and which should stay
behind a bridge? What would you need to see before letting an agent call a
production tool from COBOL?
That conversation is more useful than another migration demo.
- 登录 发表评论
- 3 次浏览