OpenForm
Open SourceMIT licensed

Documents
as Code.

Enable AI agents to automate business and compliance documents.

Structured context and tools
Type safe
Define once, render anywhere
Deterministic guarantees
index.ts
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.

Compliance riskErrors & omissionsMaintenance burdenToolchain overheadNo audit trail

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

Field mapping configs
Validation spreadsheets
Template engines
Glue code + maintenance
Tribal knowledge
Software

AI agents today

PDF-to-image conversion
Vision API parsing
Field inference loops
Back-and-forth retries
Manual error patching
Agents

OpenForm

Artifact
PartiesFieldsDefsRulesLayersInstructionsMetadata
Tools
FillValidateRender
Software+Agents

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

Agent Skills

Pre-built agent workflows built on OpenForm artifacts.

GitHubopen-form/skills

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.

ArtifactTitleCategoryLayers
w9Request for Taxpayer Identification NumberTax
PDFMarkdown
1099-necNonemployee CompensationTax
PDFMarkdown
ach-debit-authACH Debit AuthorizationBanking
PDFMarkdown
ach-credit-authACH Credit AuthorizationBanking
PDFMarkdown
ach-direct-depositACH Direct Deposit EnrollmentBanking
PDFMarkdown
TaxBankingLendingInsuranceHealthcare

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…

Intake agentApplication agentPurchase order agentOnboarding agentClaims agent

See it in action with the interactive demo.

I need to fill out a W-9 form.
Sure, let me help you do that.
searchRegistry("w-9 form")
getArtifact(w-9)
preFillForm
Alright, let's start with your full name?

Start building in minutes

No signup. No cloud.

$ npm install @open-form/sdk