agents.yaml unlocks autocomplete, inline validation, and hover docs in any LSP-aware editor.
Quick Start
1
Scaffold a new project
praisonai init writes agents.yaml with the # yaml-language-server: $schema=… header already in place. Open it in VS Code with the YAML extension and you immediately get autocomplete for roles, agents, tasks, tools, llm, and workflow.2
Add editor support to an existing agents.yaml
Paste one comment line at the top of any existing file:
How the header wires it up
The editor reads the leading comment, fetches the schema, and starts validating as you type.What you get
The header enables four editor affordances against the published schema:- Key/value autocomplete —
roles,agents,tasks,tools,llm,workflowat the correct nesting level. - Inline error markers — a red squiggle on unknown keys the moment you type them.
- Hover docs — descriptions sourced from the Pydantic
description=…fields. - Structural checks — e.g. workflow steps needing both
agentandtask.
Emit the schema locally
Offline or air-gapped setups can generate the schema file and point the editor at it.Editor setup
- VS Code
- Neovim / Helix
- JetBrains IDEs
Install the YAML extension by Red Hat. The header is enough — no
settings.json change needed.Optional: pin via yaml.schemas when you cannot embed the header (e.g. a shared config):Which schema for which file
PraisonAI publishes two schemas — one for the CLI config, one for agent definitions.User Interaction Flow
- Run
praisonai init→ get.praisonai/config.yamlandagents.yaml, both with the language-server header. - Open
agents.yamlin VS Code (YAML extension installed). - Type
rounder the root → autocomplete offersroles/roleat the correct nesting level with hover docs. - Misspell
backstroy:→ a red squiggle appears immediately, before saving or running any command. - On an air-gapped machine: run
praisonai validate schema -o agents.schema.jsononce, commit the file, and swap the header to# yaml-language-server: $schema=./agents.schema.json.
The header is a YAML comment —
yaml.safe_load ignores it, so praisonai start agents.yaml behaves identically with or without it.Common Patterns
Add editor support to an existing config
Pin a local schema for offline work
agents.yaml:
Best Practices
Let praisonai init add the header for you
Let praisonai init add the header for you
Scaffolded
agents.yaml files ship with the header already in place — no manual step. Just install the YAML extension and start typing.Pin a local schema for air-gapped machines
Pin a local schema for air-gapped machines
Run
praisonai validate schema -o agents.schema.json once, commit the file, and point the header at ./agents.schema.json so editors work without network access.Use yaml.schemas when you cannot embed the header
Use yaml.schemas when you cannot embed the header
For shared configs where a leading comment is undesirable, map the schema in VS Code
settings.json via yaml.schemas with the agents*.yaml file mask instead.Remember the header never affects runtime
Remember the header never affects runtime
The header is a plain YAML comment. Runtime parsing and execution are unchanged, so it is always safe to keep it committed.
Related
Validate
Emit the machine-readable schema and validate configs
Config CLI
Manage project and global configuration
Init
Scaffold a project with the editor header in place
CLI Configuration
Layered, project-aware CLI defaults

