We are thrilled to announce ColdBox 8.1.0, a targeted minor release packed with powerful new features, important improvements, and critical bug fixes across ColdBox, WireBox, and CacheBox. While minor in version number, this release delivers some truly exciting capabilities β especially for BoxLang developers building AI-powered applications.
You can view the full what's new here: https://coldbox.ortusbooks.com/readme/release-history/whats-new-with-8.1.0
π Major Highlights at a Glance
- π€
toAi()routing β auto-scaffold a full AI REST API from anyIAiRunnablein one line - π
toMCP()routing β expose BoxLang MCP servers as HTTP endpoints for Claude, Copilot, and more - β° Scheduler
started/startedAtproperties β health checks and cluster-aware task management - π Upgraded cluster lock algorithm β resolves long-standing scheduled task edge cases
- π Engine-agnostic internals β further aligning ColdBox with BoxLang as a first-class runtime
- ποΈ
cfmappingdeprecation β unifiedclassMappingacross CFML and BoxLang
Let's dive in!
π€ toAi() and toMCP() β First-Class AI Routing
This is the headline feature of 8.1.0 and it is exclusively powered by BoxLang. ColdBox now ships with two powerful new routing terminators that bring first-class AI and MCP support directly into your router. More information here: https://coldbox.ortusbooks.com/digging-deeper/ai
toAi() β Auto-Scaffold a Complete AI REST API
Think of toAi() as the AI equivalent of resources(). A single call automatically registers four sub-endpoints for any BoxLang IAiRunnable:
| Verb | Endpoint | Description |
|---|---|---|
POST | {base}/invoke | Synchronous execution β runs the runnable and returns JSON |
POST | {base}/stream | SSE streaming β pushes chunks via BoxLang's SSE() BIF |
POST | {base}/batch | Parallel batch execution over an inputs[] array |
GET | {base}/info | Self-describing metadata β lists the runnable and all endpoints |
// One line β four REST endpoints for your AI agent
route( "/api/chat" ).toAi( "MyChatAgent" );
// With a live WireBox instance
route( "/api/embeddings" ).toAi( getInstance( "EmbeddingRunnable" ) );
// With auth guard inherited by all four sub-routes
route( "/api/chat" )
.withCondition( ( route, params, event ) => event.isAuthenticated() )
.toAi( "MyChatAgent" );
The runnable parameter accepts a WireBox ID string (resolved lazily at request time) or a live IAiRunnable instance. Every route modifier you chain β conditions, domain restrictions, SSL, headers β is automatically inherited by all four generated sub-routes. Misconfigurations surface on startup, not at request time.
π‘
toAi()requires BoxLang as the active runtime and thebxaimodule installed (box install bxai).
toMCP() β Expose MCP Servers Over HTTP/HTTPS
toMCP() exposes any registered BoxLang Model Context Protocol (MCP) server as an HTTP endpoint that Claude, GitHub Copilot, Cursor, and any other MCP-compatible AI client can connect to. The full HTTP request is delegated to the server's MCPRequestProcessor, making your BoxLang tools, resources, and prompts available to the world.
// Expose a named MCP server on a fixed route
route( "/mcp/filesystem" ).toMCP( "FileSystemServer" );
// With an auth condition
route( "/mcp/database" )
.withCondition( ( route, params, event ) => event.isAuthenticated() )
.toMCP( "DatabaseServer" );
// Dynamic β resolve server name from the :mcpServer URL placeholder
route( "/mcp/:mcpServer" ).toMCP();
Combined, toAi() and toMCP() let you go from zero to a fully-functional, streaming-capable AI REST API and an MCP-compliant tool server with just a few lines of routing configuration. This is BoxLang-powered AI development at its finest. π₯
β° Scheduler Enhancements β started and startedAt
Schedulers now expose two new properties:
started(boolean) β whether the scheduler is currently runningstartedAt(datetime) β when the scheduler was started
These are especially useful for health checks, monitoring dashboards, and cluster-aware task management where you need programmatic visibility into scheduler state.
π Cluster Lock Algorithm Upgrade
The scheduled task server fixation algorithm for cluster locking has been upgraded, resolving long-standing edge cases that could occur when tasks are distributed across multiple servers. Rock-solid reliability for your distributed workloads.
π Engine-Agnostic Internals
Several internal CF-specific variable names and entries have been renamed to engine-agnostic alternatives. This continues ColdBox's commitment to treating BoxLang as a first-class runtime and reduces CFML-only assumptions embedded in the codebase.
ποΈ Module cfmapping Deprecation
this.cfmapping in ModuleConfig.cfc is now deprecated in favor of this.classMapping, which works consistently across both CFML and BoxLang runtimes. Update your module configurations to stay forward-compatible.
π Notable Bug Fixes
renderDatanow correctly sends encoding with thecontent-typeheader- Whoops error handler now uses a local AlpineJS reference instead of an external CDN URL
MockRequestContext.getResponseHeaders()now returns the correct struct in integration tests aftersetup()- ColdBox proxy now correctly disallows
.bxmproxies - Double serialization issue in JSON responses resolved
CacheBox statusCheck()typo fixed β now correctly callsisEnabled()- WireBox threading concurrent modification issues in
Mapping.cfcresolved - WireBox race condition when loading namespaced modules patched
π Get Started
# Upgrade ColdBox
box install coldbox
# Or upgrade the native BoxLang edition
box install bx-coldbox
# Install bxai for toAi() / toMCP() routing support
box install bxai
π Resources
- BoxLang AI: https://ai.boxlang.io
- BoxLang: https://www.boxlang.io
- Documentation: https://coldbox.ortusbooks.com
- Release Notes: https://coldbox.ortusbooks.com/readme/release-history/whats-new-with-8.1.0
- BoxLang AI Module: https://forgebox.io/view/bxai
- Community: Join us on the Ortus Community Slack
π Thank You
Thank you to every contributor, subscriber, and community member who filed issues, submitted PRs, and provided feedback that shaped this release. ColdBox keeps getting better because of you!
Happy coding! π
Add Your Comment