Agentic YAML Schema

An open specification for describing AI agent architectures as human-readable YAML.

File extension: .agentic.yaml or .agentic.yml

Install

npm install @agenticdiagrams/schema

Quick start

A minimal document:

agentic: "0.1"

A practical starting point:

agentic: "0.1"
diagram:
  name: My Agent System

nodes:
  support-bot:
    type: agent
    edges:
      - to: kb-search

  kb-search:
    type: tool
    sub_type: mcp

Usage

TypeScript types

import type { AgenticYaml, AgenticNode } from '@agenticdiagrams/schema';

Validation

Validate a parsed YAML object against the JSON Schema:

import * as yaml from 'js-yaml';
import { validate } from '@agenticdiagrams/schema';

const doc = yaml.load(yamlString);
const result = validate(doc);

if (!result.valid) {
  console.error(result.errors);
}

JSON Schema

Reference the schema directly for editor support:

https://agenticdiagrams.com/schemas/agentic/0.1.json

Or import it from the package:

import schema from '@agenticdiagrams/schema/schema.json';

Top-level structure

KeyTypeRequiredDescription
agenticstringyesSpec version ("0.1")
diagramobjectnoDiagram metadata
nodesmapnoNode definitions (id → node)
edgesarraynoConnections between nodes
scenariosmapnoFlow definitions (id → scenario)
layoutobjectnoVisual/rendering hints

Defaults

PropertyDefaultNotes
diagram.name"Untitled"Name of the diagram
Node labelnode idmy-agent → displays as “my-agent”
Edge typerequestMost common in agent diagrams
Step typecallMost common in flows
layout.directionTBTop to bottom

Resources