Skip to main content
The ECP Context manifest is defined by a JSON Schema and TypeScript types. Use them to validate manifests, generate UIs, or build runtimes.

JSON Schema

The canonical schema for an ECP Context is generated from the TypeScript types and emitted as: packages/spec/dist/ecp-context.schema.json Generate it from the repo root (after a build):
npm run build
npm run generate:schema
Then validate a manifest (e.g. spec.yaml) with the spec package validator:
npm run validate
The schema covers the root ECPContext and all nested types: metadata, inputs, outputs, schemas, triggers, orchestration, orchestrator, executors, plugins, and policy/mount/schema definition shapes.

System configuration

The host system config file is usually named ecp.config.yaml (YAML or JSON). It is not part of the Context JSON Schema above. It is documented in the protocol spec and enforced by the reference runtime’s loader and structural validation. Authoritative references There is no separate checked-in JSON Schema for system config today; implementers should treat SPEC.md plus the example file and ECPSystemConfig as the source of truth.

TypeScript types

The single source of truth for the schema is: packages/spec/src/types/ecp.ts All types are exported from @executioncontrolprotocol/spec (or packages/spec/src/types/index.ts). Key exports include:
  • ECPContext — Root manifest interface
  • Metadata, InputDefinition, OutputDefinition — Context-level fields
  • SchemaDefinition, SchemaProperty — JSON Schema-aligned definitions
  • Trigger, Orchestration, Orchestrator, Executor — Execution model
  • Mount, ToolAccessPolicy, BudgetsPolicy, WriteControlsPolicy — Per-executor configuration
  • Plugins, PluginReference — Declared plugins (provider, executor, logger, memory, …)
Naming follows OpenAPI conventions: camelCase for field names, kebab-case for enum/union literals (e.g. "controller-specialist", "propose-only"), PascalCase for types and schema names.

TypeDoc (API docs)

For full JSDoc and category-based API documentation of every type and property, the repo can generate TypeDoc output. From the repo root:
npm run build
npm run docs
This builds the TypeDoc site into packages/docs/dist (when using the existing TypeDoc config). TypeDoc is useful for a browsable programmatic API reference of the TypeScript types. If you publish TypeDoc elsewhere (e.g. GitHub Pages), link to it from this page or the footer.

Example: minimal Context

A minimal valid Context in YAML:
specVersion: ecp/v0.5-draft
kind: Context
metadata:
  name: hello-agent
  version: 1.0.0
inputs:
  topic:
    type: string
    required: true
outputs:
  - name: summary
    fromSchema: Summary
schemas:
  Summary:
    type: object
    required: [headline, body]
    properties:
      headline: { type: string }
      body: { type: string }
plugins:
  version: 1.0.0
  providers:
    - name: openai
      kind: provider
      type: builtin
      version: 0.3.0
  security: {}
orchestration:
  entrypoint: summarizer
  strategy: single
  produces: Summary
executors:
  - name: summarizer
    type: agent
    model:
      provider: { name: openai, type: builtin, version: 0.3.0 }
      name: gpt-4o-mini
    instructions: Given a topic, produce a JSON object with headline and body.
    outputSchemaRef: "#/schemas/Summary"

See also