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 Perl and AI is: rewrite the glue in Python.
It sounds reasonable. Python has the agent libraries, the model clients, the
tooling, and the hiring pool. Perl has the cron jobs, the log parsers, the data
munging, and the integrations that keep the estate running.
But “glue” is a misleading word. A load-bearing Perl script often holds the
credentials, the file paths, the retry logic, and the operational knowledge that
nobody wants to rediscover. Rewriting it is not a syntax cleanup. It is a
migration with its own failure modes.
PRAXO-CORE is testing a different answer: keep the Perl process, and put a
governed agent loop inside it.
Not a bridge. Not a Python wrapper. A native Perl 5.20+ implementation of the
agent contract.
The third path
The usual integration pattern is a sidecar. A Python service owns the agent loop,
and the Perl script exposes a tool or an API. This is often the right engineering
choice. It isolates the new runtime and avoids touching a fragile script.
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. And the credentials that the
Perl script already has may have to be copied or delegated.
The third path is to put the loop where the glue already runs. The Perl program
calls the agent loop, passes a prompt and options, dispatches tools, applies
policy, and receives a result.
This is a narrower claim than “AI for Perl” and a more useful one: a governed
loop inside the process that already has the data and the credentials.
What native Perl means
The Perl SDK is implemented in Perl 5.20+. It is not a bridge to Go, Python, C,
or another SDK. The agent loop, tools, events, policy, memory, checkpoints,
context, JSON Schema, plugin manifests, and middleware are native Perl packages.
The dependency footprint is deliberately small: core modules only (JSON::PP,
File::Spec, Cwd). There is no heavy CPAN tree and no Python host at runtime.
The source tag is perl/v0.7.0. It targets SPEC_VERSION 0.2.0. CPAN has indexed
Praxo::Core 0.7.0; the isolated 0.6.1 install smoke is recorded, while 0.7.0
installation was not rerun. The SDK is MIT-licensed.
Architecture
The core call is small:
use lib 'language/perl/lib';
use Praxo::Models ();
use Praxo::Agent ();
my $model = Praxo::Agent::StaticModel->new('hello');
my $options = Praxo::Agent::AgentOptions->new($model);
my $result = Praxo::Agent::run_agent(
$options,
Praxo::Models::session(id => 'demo'),
'hello',
);
print $result->{output};
Tools register on the options object:
use Praxo::Agent ();
my $registry = Praxo::Agent::ToolRegistry->new;
$registry->register(Praxo::Agent::FuncTool->new('echo', 'Echo arguments', sub {
return $_[0];
}));
my $options = Praxo::Agent::AgentOptions->new($model);
$options->{tools} = $registry;
$options->{max_steps} = 8;
The surfaces include:
Praxo::Agent: agent loop and options.Praxo::Models: messages, requests, responses, usage, sessions, events,
decisions, stream kinds.Praxo::Runtime: path checking, memory store, checkpoint allowlist, context
budget, token estimation, event sinks.Praxo::Toolcall: tool-call parsing and markup stripping.Praxo::JsonSchema: schema validation.Praxo::Plugin: manifest parsing.Praxo::Middleware: call limits, fallback, PII redaction, structured output,
tool selection.
The evidence is specific: all 11 vector groups pass, the native test suite passes, and the public API snapshot is checked. The perl-conformance CI job runs
the vectors, the API snapshot, and the tests.
The three partial surfaces
The honest version of the story is more interesting than “full parity.”
Three surfaces are explicitly partial in the parity inventory:
- Event sink. The vector behavior and common path are covered; not every
optional Go hook is. - Stream part. Stream kinds are represented, but this is not an async
runtime claim. - JSON Schema. The vector-defined behavior is covered; this is not full
JSON Schema.
The rest of the declared Core scope passes. The partial surfaces are named
because a multi-language claim without them is just a larger README.
The dependency story
Perl has a reputation for dependency sprawl. This SDK is deliberately the
opposite: core modules only.
JSON::PPfor JSON.File::Specfor paths.Cwdfor working-directory behavior.
No Python host. No provider SDK. No compiled extension requirement for the core
loop.
That does not make it dependency-free in the abstract; it makes the dependency
surface small and auditable.
Governance and credentials
An operations team does not need an agent that can talk about Perl. It needs an
agent that can participate in a workflow without bypassing the controls around
that workflow.
That means:
- policy checks that see the final tool arguments;
- explicit tool authorization;
- 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 Perl process, the credentials, the file paths, and the
policy decision can stay closer together. That reduces one kind of boundary
crossing. It does not automatically make the system secure or compliant.
What it does not do
- It is not full Go feature parity.
- CPAN has indexed 0.7.0; the
0.6.1install smoke is recorded, while0.7.0installation was not rerun. - It ships OpenAI-compatible, Anthropic, and Gemini adapters over caller-supplied transports; it is not a hosted provider runtime.
- It does not claim an async runtime.
- It does not provide full JSON Schema, full event-sink, or full stream-part
coverage. - It does not provide general PII compliance.
- It does not claim production readiness or a security certification.
These limits are not footnotes. They are the boundary that makes the native claim
credible.
How to evaluate
Do not start with “AI in Perl.” Start with the Perl README and the matrix.
- Confirm the tier, tag, and current scope.
- Run the conformance, API snapshot, and test commands.
- Check the three partial surfaces against your workload.
- Test the security behavior you depend on: policy ordering, path handling,
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
Perl docs: https://axisvela.github.io/praxo-core/languages/perl/
Perl source: https://github.com/axisvela/praxo-core/tree/main/language/perl
Matrix: https://github.com/axisvela/praxo-core/blob/main/spec/languages.md
Invitation
The interesting question is not “Can Perl call a model?” It can.
The interesting question is whether a governed agent loop can be made dependable
in the process that already holds the operational knowledge — and whether the
partial surfaces can be stated clearly enough that an operator trusts the failure
modes.
If you run load-bearing Perl glue, 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 Perl?
That conversation is more useful than another rewrite demo.
- 登录 发表评论
- 4 次浏览