Early Access · beta. Help test and shape the 1.0 release. Where the project stands →

Optional AI assistance

Optional AI help for writing interfaces

The optional coding assistant helps draft and explain interface code. The engine routes and transforms messages without an AI model.

Use the model configured in your editor, such as Copilot or Claude. MessageFoundry bundles no model or provider keys. Review and test generated code before using it.

What to know about AI assistance up front

Optional, always

You can build every interface with guided wizards or Python. Turning AI assistance off does not change how the engine runs.

No AI in the message path

The engine processes messages with ordinary code. It does not call a model to run a feed.

Editor context goes to your provider

The assistant sends code and configuration names to your chosen provider. Keep patient data out of code and prompts.

In your editor

A chat assistant that speaks MessageFoundry

The optional VS Code extension adds a @messagefoundry chat participant. Ask about interfaces using context for the Router and Handler APIs, including msg[...] and Send(...).

Requests go directly from your editor to your model provider. The engine does not send them.

The chat is one part of the MessageFoundry editor — see the whole editor →

Slash commands, primed with the API

  • /explain — walk through what a router or handler does, in plain language.
  • /transform — draft a @handler transform from a description of the mapping you need.
  • /review — get a review of the handler you're writing, against the real MessageFoundry API.

More commands are in progress. Provider-agnostic by design — you bring the model; MessageFoundry holds no keys.

Why it's fast

Your logic becomes plain, reviewable Python

Migration involves translating connection settings, routing rules, and transforms from your existing engine.

Open a channel export to draft Python Connections, a Router, and Handlers. Review the changes and test their behavior against the original interface.

What the assistant can draft for you

The assistant can draft these parts for review:

  • Connections — MLLP, TCP, X12/EDI, HTTP/REST, SOAP, FHIR REST, database, and file endpoints (local and SFTP/FTP/FTPS) mapped from your existing source/destination config.
  • Routing — a @router that mirrors your channel's filter and routing rules.
  • Transforms@handler functions that reproduce field mappings and reshaping as pure Python.
  • Tests — starting points for harness scenarios so you can prove parity before cutover.
The migration loop

From legacy channel to running route

Point the assistant at your legacy logic

Open a channel export, such as a Mirth transformer or Cloverleaf Tcl procedure. Remove patient data and secrets before sharing code with a provider.

It drafts the MessageFoundry equivalent

The assistant drafts Python Connections, a Router, and Handlers for the original routing, filtering, and mapping rules.

Review it like any code change

Read the diff, correct the draft, and review it through your normal pull request process.

Prove parity in the test harness

Dry-run synthetic, PHI-free messages through the new route and compare before/after. The headless scenario runner keeps the check green in CI.

Stage → Promote, then repeat in parallel

Promote the tested route through a staged rollout with a rollback path. Repeat for each interface.

Governed & PHI-safe

Control what the assistant can access

The assistant uses code and configuration names, not the engine message store. Administrators set a central policy that each workstation checks before sending requests.

Code context and request limits

  • The assistant sends code and configuration names. Do not include patient data or secrets in that context.
  • Bounded context — what it sends is capped (default 8,000 characters, tunable), and any truncation is line-aligned and clearly marked.
  • The engine binds to 127.0.0.1 and requires authentication. Assistant requests travel separately from the editor to your provider.

Your model, centrally governed

  • Choose the provider configured in VS Code and review its terms for your intended use. MessageFoundry bundles no model or provider keys.
  • Hard kill-switch — ops/admin sets the policy per install; a central off is honored on every workstation and can't be overridden locally.
  • RBAC-gated — an ai:assist permission controls who may use it, deny-by-default like the rest of the engine.
  • Fails safe — the editor checks the policy before every request and disables the assistant rather than guess.

Test generated code with synthetic data before cutover. Historical messages and live traffic are not part of the assistant context.

Plan a migration one interface at a time

Inventory your channels, draft the code, compare results, and plan the cutover.