The first programming language for instructing LLMs

Most workflow engines add AI.Diaphora starts with it.

The runtime that turns a prompt into a deterministic, callable AI service you can deploy anywhere — in minutes.

Chat to plan

API + MCP

LLM-first runtime

Validated output

Open source

Chat to plan

AI-native backend services in under 10 minutes.

Describe the workflow in plain English. Diaphora's sub-agent explores your connected tools, writes the FML, fixes its own routing, and hands you a deterministic, schema-validated service — callable over API and MCP. No boilerplate. No glue code.

Sub-agent mode

Bring your own LLM key

Web IDE + VS Code

API + MCP callable

sales-plan.fml

Copy

VALID

1

system("You are an expert sales assistant.")

2

 

3

require mcp Salesforce

4

require mcp Slack

5

 

6

session("sales_plan") {

7

    use mcp Salesforce

8

 

9

    # Fetch open opportunities for the current quarter

10

    call("queryOpportunity") -> opportunities {

11

        fields = "Id, Name, Amount, CloseDate, StageName"

12

        where  = "CloseDate = THIS_QUARTER AND IsClosed = false"

13

        limit  = 50

14

    }

15

 

16

    + Review my open opportunities for this quarter:

17

      {{ .vars.opportunities | json }}

18

 

19

      Analyze these opportunities and create a weekly sales plan for me.

20

      Identify priority deals, group them logically, and outline the key

21

      actions I should take this week to move them forward.

22

 

23

    - Produce the detailed weekly sales plan, plus a concise summary

24

      that I can share with the broader team.

25

 

26

    schema {

27

        salesPlan: string # The detailed weekly sales plan with steps

28

        summary:   string # A concise summary ready for Slack

29

    }

30

}

31

 

32

session("notify_team", after="sales_plan") {

33

    use mcp Slack

34

 

35

    # Automatically send the summary to the sales channel

36

    call("chat_postMessage") {

37

        channel = "123456789"

38

        text    = $(context.sales_plan.summary)

39

    }

40

 

41

    - Confirm the summary was posted to the sales channel.

42

 

43

    schema {

44

        posted:  bool    # Whether the summary was delivered to Slack

45

        channel: string  # The Slack channel the summary was sent to

46

    }

47

}

Create plan

~4 min elapsed

Build me an automation that pulls my opportunities for the quarter and creates my weekly sales plan. Additionally, Slack the sales summary to my sales channel — 123456789

Tool: list_available_tools

Tool: list_mcp_commands

Tool: list_mcp_commands

This plan fetches your open opportunities for the current quarter from Salesforce, drafts a weekly sales plan with a concise summary, then uses a deterministic tool call to send that summary to your Slack channel (123456789). Just make sure the Salesforce and Slack MCP tools are connected.

Tool: update_plan

Tool: update_plan

Compiled and schema-validated — the plan is clean and ready to run. It will query your Salesforce opportunities for the quarter, assemble the weekly sales plan and summary, and post that summary directly to your Slack channel.

Type a message…
Frags Runtime

The OSS runtime for AI-powered backend services.

Frags is an advanced LLM agent built to execute complex workflows of data retrieval, transformation, extraction, and aggregation. It optimizes for precision and focus — a system for engineers and specialists, not a code-free quick fix. It ships as a CLI tool and a Go library.

CLI tool

Go library

Multi-LLM

Open-source runtime

View the open-source runtime on GitHub

frags · cli

$ frags run sales-plan.fml --llm claude

▸ compiling FML plan ............ ok

▸ session sales_plan

queryOpportunity → 42 rows

schema validated → 2 fields

▸ session notify_team

chat_postMessage → #sales

schema validated → 2 fields

✓ plan complete · structured output ready

Multi-LLM

Bring the model that best fits the task — and your own API key. Frags routes to any supported LLM: Claude, GPT, Gemini, or a local Ollama model.

frags · cli

# Pick the model at run time — your key, your choice

$ frags run plan.fml --llm claude

Structured output

Frags exists to produce predictable, machine-consumable data — not chat. Every output is typed and validated.

plan.fml

schema {

title: string

score: int # validated on every run

}

Orchestration system

Describe complex retrieval, transformation, extraction, and aggregation to build rich data structures — not one-shot answers.

plan.fml

session("gather") { ... }

session("rank", after="gather") {

- Rank what "gather" produced.

}

Advanced tooling

A standardized system for integrating internal tools you provide and external MCP servers.

plan.fml

require mcp Slack

session("summary") {

use mcp Slack

}

Anti-context-bloating

The multi-session model scopes exactly what enters each LLM context, improving focus and cutting hallucination risk.

plan.fml

session("rank", after="gather") {

# only this lands in context — nothing else

context "{{ json .context.gather }}"

}

Output segmentation

Split output across sessions to beat token limits and raise answer quality on large results.

plan.fml

session("expand", after="gather",

iterate="context.gather.points") {

schema string[] # one result per item

}

Pre / post-processing

Custom scripts, tools, and transformers do the deterministic work — less LLM load, lower cost, better performance.

plan.fml

transformer("clean") {

onFunctionOutput = "history"

jmesPath = "messages"

}

Modularity

Built to be extended — add capabilities and wire Frags into your own tools and processes.

plan.fml

components {

schema("SourceRef") {

url: string

}

}

How you build

There's no drag-and-drop canvas. That's the point.

Node-wiring builders feel friendly until the workflow gets real — then you're untangling spaghetti on an infinite canvas that no one can review, diff, or trust. Diaphora builds plans the way engineers actually work.

Drag 40 nodes across a canvas, connect them by hand, and pray the arrows still hold in production.

Describe it, or write it in FML. Ship a typed, deterministic plan you can review, diff, and version like real code.

Chat to plan

Describe what you want. The built-in assistant writes the FML plan for you — no canvas, no node wiring.

Convert Skill to Plan

Drop your skill into Diaphora and it will generate a typed, deterministic plan you can review, diff, and version like real code.

FML in your IDE

Write plans as code with a real Language Server — live diagnostics, validation, and syntax highlighting as you type.

VS Code extension

Build, edit, and validate plans without leaving your editor. Version them in git like the code they are.

Platform Architecture

Instruction Engine Core

Five tightly integrated components turn an FML plan into a governed, callable service — instruction, identity, routing, persistence, and execution.

01

FML, the plan language

Instruction Engine

Workflows are written in FML — the Frags Modeling Language — and compiled for a deterministic, open-source runtime. Define once; run reliably every time with full schema validation.

02

Secure by design

IAM & Gateway

The authenticated entry point for everything calling Diaphora — enterprise SSO, federation, role-based access, and multi-tenant isolation, with a full audit trail.

03

Intelligent dispatch

Router

Routes every workflow step to the right LLM, tool, or system while keeping execution deterministic — model-agnostic, with fallback chains and cost-aware scheduling.

04

Persistent state

Storage

Versioned plans, parametrized configs, connections, and immutable execution history — full auditability for every run.

05

Execution environment

Runner

Sandboxed, observable execution of each session with per-step guardrails, retries, timeouts, and integration hooks.

The Problem

Your best skills are still just prompts.

You shouldn't need a hardening guide just to trust your own skill in production. Diaphora makes that work unnecessary.

Non-deterministic
Deterministic
Context rot
Scoped sessions
Free-form output
Typed schema
Silent failures
Full auditability
One-off prompts
Production services

Prompt Journey

Every failure mode. One deterministic fix.

Overloaded

Unreliable

Brittle

Invisible

Step 1 of 4

Prompt journey today

01

Overloaded

Cram it all into one prompt

Paste the context, instructions, format requirements, and a prayer into one giant string.

"Please analyze this data and also summarize and also extract and format it nicely and make sure to..."

With Diaphora

FIXED

Define a typed plan

Declare tools, parameters, sessions, and schema once. Versioned, reusable, and explicit.

requiredTools: - gcal - salesforce parameters: meetingQuery: string

Prompt journey today

02

Unreliable

Hope the model cooperates

Cross your fingers the LLM doesn't drift, hallucinate, or ignore half your instructions.

Output varies. Sometimes brilliant. Sometimes garbage. No way to know which until it's too late.

With Diaphora

FIXED

Sessions with scoped context

Each LLM call gets exactly what it needs — nothing more. No bloat. No drift. No surprises.

sessions: fetch-signals build-prep publish Each step is isolated and deterministic.

Prompt journey today

03

Brittle

Wrestle the output into shape

Write fragile regex or a second prompt just to extract the data you actually needed all along.

if output.contains("sorry") { retry() } // yes, for real

With Diaphora

FIXED

Schema-validated output

Every run returns a typed, validated object. Same shape, every time. Machine-consumable by design.

schema: meeting_details: object signals: array prep_summary: object notion_publish: object

Prompt journey today

04

Invisible

It silently breaks on the next run

Model update? New input? Edge case? Your workflow happily produces garbage with zero warning.

❌ TypeError: Cannot read properties of undefined ❌ Output schema mismatch ❌ Silent hallucination

With Diaphora

FIXED

Complete auditability

Every execution is logged, versioned, and traceable. You always know what ran, when, and why.

run_id: abc123 plan_version: v2.1 sessions: 3 pre_calls: 4 errors: 0

Sound familiar?

Graduate your skills into services. Get early access →

Why Diaphora

Skills deserve better infrastructure.

A skill is a great starting point. A service is what your business actually runs on. Diaphora closes the gap — deterministic, typed, and production-grade.

0

variance between runs

Zero Prompt Drift. By Design.

Every Diaphora plan is a versioned contract. LLM sessions fire with exactly the context they need — scoped, isolated, schema-validated. Run 1 and run 10,000 behave identically. That's not a promise. It's architecture.

more focused than monolithic prompts

Scoped Sessions, Not Bloated Prompts

Instead of one giant prompt doing everything, Diaphora chains focused sessions with dependsOn — each LLM call sees only what it needs. No context rot. No hardening guides.

100%

schema-validated outputs

Every Output Is a Typed Schema

Plans don't return text you have to parse. They return typed, validated objects — pinned to the session that produced them. Pipe directly into your CRM, BI tool, or any downstream system.

reusable across any input

Plans Are Reusable Infrastructure

Parametrizable plans work like real APIs. One sales-call-prep plan serves every meeting. Versioned, auditable, shareable — not a one-off prompt buried in someone's Notion doc.

Use Cases

Real services. Real workflows.

One plan language. Any tool. Any team. From revenue and customer success to platform analytics — if it touches data and an LLM, Diaphora can make it a service.

All

Sales

Executive

Customer Success

Product

Platform

IT Ops

Marketing

Pull the upcoming calendar event, mine every past Avoma meeting with the account, reconcile Salesforce contacts, and synthesize one prep document — before the call starts.

A full prep brief from calendar, Avoma, and CRM — before the call.

Tools

Google Calendar

Avoma

Salesforce

Sessions

1

calendar-details

2

find_meetings

3

analyze_meetings

4

generate_prep_report

Schema Output

calendar_details

meeting_analyses

crm_report

prep_document

Plot twist

Does building reliable AI automations make you want to say FML?

Good news — that’s just the name of the language. FML is the first programming language for instructing LLMs, running on the Frags runtime. We built it to own the entire vertical stack — language, runtime, and tooling — so the web editor and local IDE experience have no limits.

Hover FML for the full breakdown.

Plan Anatomy

A plan is the engine's manifest.

Declare your tools, parameters, sessions, and typed schema in FML — the Frags Modeling Language. Diaphora compiles and executes it deterministically — every time.

Visit Plan Marketplace

sales-call-prep.fml

Copy

VALID

1

require mcp gcal

2

require mcp salesforce

3

require mcp slack

4

require mcp notion

6

parameter("meetingQuery", type=string)

8

session("fetch-signals") {

9

use mcp gcal

10

use mcp salesforce

11

use mcp slack

12

+ Pull calendar, Salesforce, and Slack

13

signals for {{ .params.meetingQuery }}.

14

- Extract only what's relevant to the call.

15

schema {

16

meeting_details: {

17

title: string

18

participants: string[]

19

}

20

signals: string[]

21

}

22

}

24

session("build-prep", after="fetch-signals") {

25

context true

26

- Build structured prep from the signals only.

27

schema {

28

overview: string

29

talking_points: string[]

30

open_items: string[]

31

suggested_agenda: string[]

32

}

33

}

35

session("publish-to-notion", after="build-prep") {

36

use mcp notion

37

- Create a Notion page, return its URL.

38

schema {

39

page_url: string

40

published_at: string

41

success: bool

42

}

43

}

Tools

Declare the MCP tools your plan needs with require. Diaphora handles auth, routing, and retries — you just name them.

Tools

L14

Parameters

L66

Sessions

L837

Typed Schema

L1541

✓ schema-validated  ·  ✓ versioned
✓ parametrizable  ·  ✓ auditable

Limited Beta Access

Stop re-prompting.
Start shipping.

Join engineers, operators, and builders who are done shipping skills and ready to ship services. Deterministic, repeatable, production-grade — by design.

No credit card · Invite only