Documents
as Code.
Enable AI agents to automate business and compliance documents.
import { w9 } from '@open-form/essentials';
const filing = await w9
.fill({
taxpayer: { name: 'John Doe' },
ssn: '123-45-6789',
address: { line1: '123 Main St', /* ... */ },
// ...
})
.render({ renderer: pdfRenderer() });import { openFormTools } from "@open-form/ai-sdk"
import { streamText } from "ai"
const result = streamText({
model: "anthropic/claude-opus-4-6",
tools: {
...openFormTools({
defaultRegistryUrl: "https://registry.example.com",
}),
// ...your custom tools
},
prompt:
"Prepare a W-9 for John Smith.",
})The problem
Document infrastructure wasn't built for AI.
The world runs on regulated documents — but document infrastructure is fragile and fragmented.
Rebuilt everywhere
Every app reimplements forms. Revisions mean rebuilding non-core logic.
Scattered infrastructure
Schemas, validation, rendering, and field mappings live across disconnected systems.
Not machine-readable
Back-end logic isn't portable. Agents reconstruct context at runtime — unreliably.
The OpenForm Model
One artifact. Multiple consumers.
A schema defines a document's context. Shared tools access it across software and agents.
Source Documents
Traditional SaaS
AI agents today
OpenForm
Machine-readable context. Deterministic execution.
How it Works
The full document lifecycle — in code.
Define the document once as a typed artifact. Populate, validate, and render it through shared tools — across software and agents.
import { open } from '@open-form/sdk';
const lease = open
.form()
.name('lease-agreement')
.version('1.0.0')
.title('Residential Lease Agreement')
.parties({
landlord: open.party().signature({ required: true }),
tenant: open.party().signature({ required: true }),
})
.fields({
address: open.field.address().required(),
monthlyRent: open.field.money().required(),
startDate: open.field.date().required(),
endDate: open.field.date().required(),
})
.defaultLayer('markdown')
.layers({
markdown: open.layer.inline()
.mimeType('text/markdown')
.text('# Residential Lease Agreement'),
})
.build();Composable Artifacts
Model more than a single form.
Artifacts represent structured forms, static documents, procedural checklists, and composable bundles — all defined and executed the same way.
Form
Structured, fillable documents with validation and rendering.
Document
Static documents defined as machine-readable artifacts.
Checklist
Procedural steps tracked and verified outside a single document.
Bundle
Composable collections of artifacts that move together.
One model. Multiple artifact types. Composable by design.
Across Surfaces
One artifact. Every surface.
The same artifact executes across product code, CI pipelines, and agent systems.
TypeScript
Embed artifacts directly in product and backend code.
@open-form/sdk
CLI
Author, validate, and render in local and CI pipelines.
@open-form/cli
JSON Schema
Validate artifacts in any language or stack.
@open-form/schemas
MCP Server
Expose fill, validate, and render tools to agents via MCP.
mcp.open-form.dev
AI Tools
AI tools for AI SDK and TanStack AI.
@open-form/ai-sdk
@open-form/tanstack-ai
Registry
Pre-built, production-grade artifacts.
Import instead of building from scratch. Built for regulated industries where documents must be correct, traceable, and auditable.
| Artifact | Title | Category | Layers |
|---|---|---|---|
| w9 | Request for Taxpayer Identification Number | Tax | PDFMarkdown |
| 1099-nec | Nonemployee Compensation | Tax | PDFMarkdown |
| ach-debit-auth | ACH Debit Authorization | Banking | PDFMarkdown |
| ach-credit-auth | ACH Credit Authorization | Banking | PDFMarkdown |
| ach-direct-deposit | ACH Direct Deposit Enrollment | Banking | PDFMarkdown |
Start with the @open-form/essentials package.
Need a specific form? Talk to us or build your own.
AI-native by design
Embed into agents
Enable agents to reason over and generate structured documents inside conversational and agent-driven workflows…