You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PraisonAI PR #3437 (merged 2026-07-29) publishes a JSON Schema for agents.yaml and wires it into the authoring loop:
A stable, published schema file at src/praisonai/praisonai/config/agents.schema.json (raw URL below).
A new CLI surface: praisonai validate schema --agents and praisonai validate schema -o <file>.
A # yaml-language-server: $schema=…agents.schema.json header prepended to every scaffolded agents.yaml so VS Code (YAML extension) and any LSP-aware editor light up autocomplete, inline validation, and hover docs out of the box.
Today the PraisonAI docs cover the same feature for the CLI config file (config.schema.json) but say nothing about the analogous authoring-time support for agents.yaml — the very surface most users spend the most time editing. This issue captures every doc change needed to bring agents.yaml editor tooling to the same visibility as the CLI-config schema.
Source of truth (all inspected while drafting this issue):
The published (authoring) schema is deliberately a touch more permissive than the strict runtime validator so editors accept every YAML shape the runtime accepts — list-form roles/agents, plus configs that rely on runtime normalisation (instructions → backstory, auto-filled role/goal).
Emit the machine-readable JSON Schema for agents.yaml (derived from YAMLConfig) to stdout, instead of the human-readable summary.
--output / -o
str (path)
None
Write the JSON Schema to a file instead of stdout. Implies --agents. Useful for offline / pinned editor setups.
Existing behaviour (no flags → human-readable summary) is unchanged.
3. Scaffold writer prepends the header
src/praisonai/praisonai/auto.py::convert_and_save now prepends AGENTS_SCHEMA_HEADER when writing a scaffolded agents.yaml. A leading YAML comment is ignored by yaml.safe_load, so runtime parsing/execution is unaffected.
4. Fully backwards-compatible
No change to how agents.yaml is parsed or executed at runtime.
Existing agents.yaml files without the header continue to work; users can add the header manually to get editor support.
No change to the strict ConfigValidator used by praisonai validate (the published schema loosens only the editor view).
Documentation changes required
Follow the AGENTS.md rules: all new content goes under docs/features/; edits to docs/cli/*.mdx are updates to existing pages. Nothing in docs/concepts/ may change.
A. NEW PAGE — docs/features/editor-support.mdx
A dedicated feature page for the whole editor-tooling story (CLI config + agents.yaml + init header + local schema emission). This is the primary deliverable.
Frontmatter:
---
title: "Editor Support"sidebarTitle: "Editor Support"description: "Autocomplete, inline validation, and hover docs for agents.yaml and CLI config in any LSP-aware editor"icon: "file-code"
---
Required sections (in this order):
Hero one-liner + Mermaid — see diagram spec below.
Quick Start (<Steps>) with two steps:
Step 1: Scaffold a new project — praisonai init writes agents.yaml with the # yaml-language-server: $schema=… header already in place; opening it in VS Code with the YAML extension immediately yields autocomplete for roles/agents/tasks/tools/llm/workflow.
Step 2: Add editor support to an existing agents.yaml — paste one comment line at the top:
# yaml-language-server: $schema=https://raw.githubusercontent.com/MervinPraison/PraisonAI/main/src/praisonai/praisonai/config/agents.schema.jsonroles:
researcher:
role: Research Analystgoal: Find and summarise the latest info on {topic}backstory: Expert at spotting reliable primary sources.
What you get — bullet list of the four editor affordances: key/value autocomplete, inline error markers on unknown keys, hover docs sourced from the Pydantic description=… fields, structural checks (e.g. workflow steps needing agent+task).
Emit the schema locally (offline / pinned editor setups) — cover the new CLI:
praisonai validate schema --agents # print to stdout
praisonai validate schema -o agents.schema.json # write to a file
Show a screenshot-shaped code block of the first ~20 lines of the emitted JSON so users can recognise the artefact. Then show pointing an editor at the local file:
Editor setup — three <Tab> panels inside a <Tabs> block:
VS Code: install the YAML extension by Red Hat; the header is enough — no settings.json change needed. Optional: pin via yaml.schemas if you cannot embed the header (e.g. shared config).
Neovim / Helix / any LSP editor: install yaml-language-server; the header is respected.
JetBrains IDEs (PyCharm/WebStorm): Settings → Languages & Frameworks → Schemas and DTDs → JSON Schema Mappings — add either the URL or the file emitted by -o, with the file mask agents*.yaml.
Two schemas, two files — a small table so users don't confuse the CLI-config schema with the agents-YAML schema:
Runtime is unaffected — a single <Note> reminding readers that the header is a YAML comment; yaml.safe_load ignores it, so praisonai start agents.yaml behaves identically with or without the header.
Related — <CardGroup cols={2}> linking to /docs/cli/validate, /docs/cli/config, /docs/cli/init, /docs/features/cli-configuration.
B. UPDATE — docs/cli/validate.mdx
The current page (as of SHA 8b9549e) documents praisonai validate schema as taking no extra flags. That is now out of date.
Two concrete edits:
Extend the praisonai validate schema flag table (currently reads "no extra flags"):
Flag
Type
Default
Description
--agents
bool
False
Emit the machine-readable JSON Schema for agents.yaml (derived from YAMLConfig) instead of the human-readable summary.
--output / -o
str
None
Write the JSON Schema to a file. Implies --agents. Prints ✓ Wrote agents JSON Schema to <path> on success.
Add a new "Emit machine-readable schema" <Step> to the Quick Start<Steps> block, right after the current "CI usage" step:
Cross-link to the new Editor Support page from the Related<CardGroup> at the bottom.
C. UPDATE — docs/cli/init.mdx
The page today (SHA a6f6b0a) already shows the CLI-config schema header injected into .praisonai/config.yaml. It does not mention that praisonai init (and any scaffold path that emits an agents.yaml) now prepends an analogous header to agents.yaml.
Add a short new subsection agents.yaml editor header with:
A one-sentence explainer that scaffolded agents.yaml files now include the # yaml-language-server: $schema=…agents.schema.json header so editors validate them immediately.
The exact header text that will appear at the top of a freshly scaffolded agents.yaml.
A pointer to /docs/features/editor-support for full setup.
D. UPDATE — docs/features/cli-configuration.mdx
The existing <Note> block near the bottom mentions only config.schema.json. Extend it (or add a peer <Note>) so the reader learns that both files get schema-driven editor support:
Editor autocomplete works for both the CLI config file (.praisonai/config.yaml, validated against config.schema.json) and the agent definition file (agents.yaml, validated against agents.schema.json). Full setup: Editor Support.
E. UPDATE — docs.json
Add the new page to the Features sidebar group (per AGENTS.md §1.8, never under Concepts):
Path to add: docs/features/editor-support
Suggested placement: adjacent to docs/features/cli-configuration in the same group.
Do not modify any auto-generated docs/js/… or docs/rust/… entries.
Required Mermaid diagrams
Follow AGENTS.md §3 — same colour scheme, white text, classDef declarations, and the mandatory hero diagram at the top of every new page.
D1. Hero diagram for docs/features/editor-support.mdx
graph LR
subgraph "Editor Support"
Y["📄 agents.yaml"] --> H["📝 $schema header"]
H --> LSP["🧠 YAML LSP"]
LSP --> A["✨ Autocomplete"]
LSP --> V["❌ Inline validation"]
LSP --> D["💡 Hover docs"]
end
classDef input fill:#8B0000,stroke:#7C90A0,color:#fff
classDef process fill:#189AB4,stroke:#7C90A0,color:#fff
classDef output fill:#10B981,stroke:#7C90A0,color:#fff
class Y input
class H,LSP process
class A,V,D output
Loading
D2. "How the header wires it up" flow (also on the new page)
sequenceDiagram
participant User
participant Init as praisonai init
participant File as agents.yaml
participant Editor as VS Code + YAML LSP
participant Schema as agents.schema.json
User->>Init: praisonai init
Init->>File: write yaml-language-server header + config
User->>Editor: open agents.yaml
Editor->>File: read leading comment
Editor->>Schema: fetch schema URL (or local -o file)
Schema-->>Editor: JSON Schema
Editor-->>User: autocomplete + inline errors + hover docs
Loading
D3. "Which schema for which file" chooser (on the new page and echoed in cli-configuration.mdx)
graph TB
Q{Which YAML<br/>am I editing?}
Q -->|CLI defaults| C["📄 .praisonai/config.yaml"]
Q -->|Agents / tasks / workflow| A["📄 agents.yaml"]
C --> CS["🔗 config.schema.json"]
A --> AS["🔗 agents.schema.json"]
classDef decision fill:#F59E0B,stroke:#7C90A0,color:#fff
classDef file fill:#8B0000,stroke:#7C90A0,color:#fff
classDef schema fill:#10B981,stroke:#7C90A0,color:#fff
class Q decision
class C,A file
class CS,AS schema
Loading
Runnable code examples (all should copy-paste without edits)
Add editor support to an existing agents.yaml
# yaml-language-server: $schema=https://raw.githubusercontent.com/MervinPraison/PraisonAI/main/src/praisonai/praisonai/config/agents.schema.jsonroles:
researcher:
role: Research Analystgoal: Find and summarise the latest info on {topic}backstory: Expert at spotting reliable primary sources.tasks:
collect_sources:
description: Collect 5 recent, authoritative sources on {topic}.expected_output: A bulleted list of sources with one-line summaries.
Emit the schema locally (offline / pinned setup)
# Print to stdout (useful for piping to jq / diff)
praisonai validate schema --agents
# Write a local file the editor can point at
praisonai validate schema -o agents.schema.json
Agent-centric example (per AGENTS.md §1.1 — start with an Agent Centric code example)
frompraisonaiagentsimportAgent# The scaffolded agents.yaml now ships with editor autocomplete out of the box.# Runtime behaviour is unchanged — the header is a YAML comment.agent=Agent(
name="Researcher",
instructions="Find and summarise the latest info on {topic}",
)
agent.start("quantum error correction breakthroughs in 2026")
User interaction flow (per AGENTS.md §1.1 rule 10)
User runs praisonai init → gets .praisonai/config.yamlandagents.yaml, both with the language-server header.
User opens agents.yaml in VS Code (YAML extension installed).
Typing ro under the root shows autocomplete for roles / role at the correct nesting level with hover docs sourced from the Pydantic description=….
User misspells backstroy: — a red squiggle appears immediately (before hitting save, before running any command).
User has no network / is on an air-gapped machine: runs praisonai validate schema -o agents.schema.json once, commits the file, and swaps the header to # yaml-language-server: $schema=./agents.schema.json.
Acceptance criteria
docs/features/editor-support.mdx created, following the AGENTS.md §2 page template exactly (frontmatter, hero Mermaid with standard palette, <Steps> Quick Start, <Tabs> for editor-specific setup, <AccordionGroup> best practices, <CardGroup> related).
docs/cli/validate.mdx updated so the praisonai validate schema flag table includes --agents and --output/-o, and the Quick Start<Steps> gains a "machine-readable schema" step.
docs/cli/init.mdx updated with a subsection describing the agents.yaml editor header.
docs/features/cli-configuration.mdx updated so the existing <Note> mentions both schemas (or a peer <Note> is added).
docs.json gains one entry — docs/features/editor-support — under the Features group only. No changes to Concepts, docs/js/, or docs/rust/.
All code blocks are copy-paste runnable — no your-key-here-style placeholders (per AGENTS.md §9.3).
Every Mermaid block uses the standard palette (#8B0000 / #189AB4 / #10B981 / #F59E0B / #6366F1) with white text and classDef declarations.
Field types, defaults, and behaviour on any new/updated table match src/praisonai/praisonai/cli/commands/validate.py::schema and src/praisonai/praisonai/config/schema.py exactly — no invented flags, no invented defaults.
docs.json remains valid JSON after edits (AGENTS.md §1.9 rule 8).
Out of scope for this issue
The following user-facing changes also landed on 2026-07-29 and each deserves its own issue rather than being bundled here:
PR #3442 — gateway safe-by-default reliability (admission ceiling + drain based on bind posture, reliability="off" opt-out).
Summary
PraisonAI PR #3437 (merged 2026-07-29) publishes a JSON Schema for
agents.yamland wires it into the authoring loop:src/praisonai/praisonai/config/agents.schema.json(raw URL below).praisonai validate schema --agentsandpraisonai validate schema -o <file>.# yaml-language-server: $schema=…agents.schema.jsonheader prepended to every scaffoldedagents.yamlso VS Code (YAML extension) and any LSP-aware editor light up autocomplete, inline validation, and hover docs out of the box.Today the PraisonAI docs cover the same feature for the CLI config file (
config.schema.json) but say nothing about the analogous authoring-time support foragents.yaml— the very surface most users spend the most time editing. This issue captures every doc change needed to bringagents.yamleditor tooling to the same visibility as the CLI-config schema.Source of truth (all inspected while drafting this issue):
agents.yamland wire live editor autocomplete/validation PraisonAI#3427src/praisonai/praisonai/config/schema.py(AGENTS_SCHEMA_URL,AGENTS_SCHEMA_HEADER,generate_agents_schema())src/praisonai/praisonai/cli/commands/validate.py(schemasubcommand,--agents,--output/-o)src/praisonai/praisonai/auto.py::convert_and_save(writes the header)src/praisonai/praisonai/config/agents.schema.jsonhttps://raw.githubusercontent.com/MervinPraison/PraisonAI/main/src/praisonai/praisonai/config/agents.schema.jsonWhat changed in the SDK (grounded in code)
1. New public schema constants (
src/praisonai/praisonai/config/schema.py)The published (authoring) schema is deliberately a touch more permissive than the strict runtime validator so editors accept every YAML shape the runtime accepts — list-form
roles/agents, plus configs that rely on runtime normalisation (instructions→backstory, auto-filledrole/goal).2. New CLI flags on
praisonai validate schemasrc/praisonai/praisonai/cli/commands/validate.py::schema:--agentsboolFalseagents.yaml(derived fromYAMLConfig) to stdout, instead of the human-readable summary.--output/-ostr(path)None--agents. Useful for offline / pinned editor setups.Existing behaviour (no flags → human-readable summary) is unchanged.
3. Scaffold writer prepends the header
src/praisonai/praisonai/auto.py::convert_and_savenow prependsAGENTS_SCHEMA_HEADERwhen writing a scaffoldedagents.yaml. A leading YAML comment is ignored byyaml.safe_load, so runtime parsing/execution is unaffected.4. Fully backwards-compatible
agents.yamlis parsed or executed at runtime.agents.yamlfiles without the header continue to work; users can add the header manually to get editor support.ConfigValidatorused bypraisonai validate(the published schema loosens only the editor view).Documentation changes required
Follow the AGENTS.md rules: all new content goes under
docs/features/; edits todocs/cli/*.mdxare updates to existing pages. Nothing indocs/concepts/may change.A. NEW PAGE —
docs/features/editor-support.mdxA dedicated feature page for the whole editor-tooling story (CLI config + agents.yaml + init header + local schema emission). This is the primary deliverable.
Frontmatter:
Required sections (in this order):
Hero one-liner + Mermaid — see diagram spec below.
Quick Start (
<Steps>) with two steps:praisonai initwritesagents.yamlwith the# yaml-language-server: $schema=…header already in place; opening it in VS Code with the YAML extension immediately yields autocomplete forroles/agents/tasks/tools/llm/workflow.agents.yaml— paste one comment line at the top:What you get — bullet list of the four editor affordances: key/value autocomplete, inline error markers on unknown keys, hover docs sourced from the Pydantic
description=…fields, structural checks (e.g. workflow steps needingagent+task).Emit the schema locally (offline / pinned editor setups) — cover the new CLI:
Show a screenshot-shaped code block of the first ~20 lines of the emitted JSON so users can recognise the artefact. Then show pointing an editor at the local file:
# yaml-language-server: $schema=./agents.schema.jsonEditor setup — three
<Tab>panels inside a<Tabs>block:settings.jsonchange needed. Optional: pin viayaml.schemasif you cannot embed the header (e.g. shared config).yaml-language-server; the header is respected.-o, with the file maskagents*.yaml.Two schemas, two files — a small table so users don't confuse the CLI-config schema with the agents-YAML schema:
.praisonai/config.yaml(CLI defaults)config.schema.jsonagents.yaml(agent/task/workflow definitions)agents.schema.jsonRuntime is unaffected — a single
<Note>reminding readers that the header is a YAML comment;yaml.safe_loadignores it, sopraisonai start agents.yamlbehaves identically with or without the header.Related —
<CardGroup cols={2}>linking to/docs/cli/validate,/docs/cli/config,/docs/cli/init,/docs/features/cli-configuration.B. UPDATE —
docs/cli/validate.mdxThe current page (as of SHA
8b9549e) documentspraisonai validate schemaas taking no extra flags. That is now out of date.Two concrete edits:
Extend the
praisonai validate schemaflag table (currently reads "no extra flags"):--agentsboolFalseagents.yaml(derived fromYAMLConfig) instead of the human-readable summary.--output/-ostrNone--agents. Prints✓ Wrote agents JSON Schema to <path>on success.Add a new "Emit machine-readable schema"
<Step>to the Quick Start<Steps>block, right after the current "CI usage" step:Cross-link to the new Editor Support page from the Related
<CardGroup>at the bottom.C. UPDATE —
docs/cli/init.mdxThe page today (SHA
a6f6b0a) already shows the CLI-config schema header injected into.praisonai/config.yaml. It does not mention thatpraisonai init(and any scaffold path that emits anagents.yaml) now prepends an analogous header toagents.yaml.Add a short new subsection
agents.yaml editor headerwith:agents.yamlfiles now include the# yaml-language-server: $schema=…agents.schema.jsonheader so editors validate them immediately.agents.yaml./docs/features/editor-supportfor full setup.D. UPDATE —
docs/features/cli-configuration.mdxThe existing
<Note>block near the bottom mentions onlyconfig.schema.json. Extend it (or add a peer<Note>) so the reader learns that both files get schema-driven editor support:E. UPDATE —
docs.jsonAdd the new page to the Features sidebar group (per AGENTS.md §1.8, never under Concepts):
docs/features/editor-supportdocs/features/cli-configurationin the same group.docs/js/…ordocs/rust/…entries.Required Mermaid diagrams
Follow AGENTS.md §3 — same colour scheme, white text,
classDefdeclarations, and the mandatory hero diagram at the top of every new page.D1. Hero diagram for
docs/features/editor-support.mdxgraph LR subgraph "Editor Support" Y["📄 agents.yaml"] --> H["📝 $schema header"] H --> LSP["🧠 YAML LSP"] LSP --> A["✨ Autocomplete"] LSP --> V["❌ Inline validation"] LSP --> D["💡 Hover docs"] end classDef input fill:#8B0000,stroke:#7C90A0,color:#fff classDef process fill:#189AB4,stroke:#7C90A0,color:#fff classDef output fill:#10B981,stroke:#7C90A0,color:#fff class Y input class H,LSP process class A,V,D outputD2. "How the header wires it up" flow (also on the new page)
sequenceDiagram participant User participant Init as praisonai init participant File as agents.yaml participant Editor as VS Code + YAML LSP participant Schema as agents.schema.json User->>Init: praisonai init Init->>File: write yaml-language-server header + config User->>Editor: open agents.yaml Editor->>File: read leading comment Editor->>Schema: fetch schema URL (or local -o file) Schema-->>Editor: JSON Schema Editor-->>User: autocomplete + inline errors + hover docsD3. "Which schema for which file" chooser (on the new page and echoed in
cli-configuration.mdx)graph TB Q{Which YAML<br/>am I editing?} Q -->|CLI defaults| C["📄 .praisonai/config.yaml"] Q -->|Agents / tasks / workflow| A["📄 agents.yaml"] C --> CS["🔗 config.schema.json"] A --> AS["🔗 agents.schema.json"] classDef decision fill:#F59E0B,stroke:#7C90A0,color:#fff classDef file fill:#8B0000,stroke:#7C90A0,color:#fff classDef schema fill:#10B981,stroke:#7C90A0,color:#fff class Q decision class C,A file class CS,AS schemaRunnable code examples (all should copy-paste without edits)
Add editor support to an existing
agents.yamlEmit the schema locally (offline / pinned setup)
Successful write output:
Then in
agents.yaml:# yaml-language-server: $schema=./agents.schema.jsonAgent-centric example (per AGENTS.md §1.1 — start with an Agent Centric code example)
User interaction flow (per AGENTS.md §1.1 rule 10)
praisonai init→ gets.praisonai/config.yamlandagents.yaml, both with the language-server header.agents.yamlin VS Code (YAML extension installed).rounder the root shows autocomplete forroles/roleat the correct nesting level with hover docs sourced from the Pydanticdescription=….backstroy:— a red squiggle appears immediately (before hitting save, before running any command).praisonai validate schema -o agents.schema.jsononce, commits the file, and swaps the header to# yaml-language-server: $schema=./agents.schema.json.Acceptance criteria
docs/features/editor-support.mdxcreated, following the AGENTS.md §2 page template exactly (frontmatter, hero Mermaid with standard palette,<Steps>Quick Start,<Tabs>for editor-specific setup,<AccordionGroup>best practices,<CardGroup>related).docs/cli/validate.mdxupdated so thepraisonai validate schemaflag table includes--agentsand--output/-o, and the Quick Start<Steps>gains a "machine-readable schema" step.docs/cli/init.mdxupdated with a subsection describing theagents.yamleditor header.docs/features/cli-configuration.mdxupdated so the existing<Note>mentions both schemas (or a peer<Note>is added).docs.jsongains one entry —docs/features/editor-support— under the Features group only. No changes to Concepts,docs/js/, ordocs/rust/.your-key-here-style placeholders (per AGENTS.md §9.3).#8B0000/#189AB4/#10B981/#F59E0B/#6366F1) with white text andclassDefdeclarations.src/praisonai/praisonai/cli/commands/validate.py::schemaandsrc/praisonai/praisonai/config/schema.pyexactly — no invented flags, no invented defaults.docs.jsonremains valid JSON after edits (AGENTS.md §1.9 rule 8).Out of scope for this issue
The following user-facing changes also landed on 2026-07-29 and each deserves its own issue rather than being bundled here:
reliability="off"opt-out)./stopcommand,abortcapability, andgateway.per_turn_timeoutconfig.small_model.markdown_dialectcapability.If any of those need doc coverage, please open separate issues so each stays focused.