Skip to main content
A single comment line at the top of 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 autocompleteroles, agents, tasks, tools, llm, workflow at 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 agent and task.

Emit the schema locally

Offline or air-gapped setups can generate the schema file and point the editor at it.
Successful write output:
The emitted file starts like this:
Then point the editor at the local file:

Editor setup

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

  1. Run praisonai init → get .praisonai/config.yaml and agents.yaml, both with the language-server header.
  2. Open agents.yaml in VS Code (YAML extension installed).
  3. Type ro under the root → autocomplete offers roles / role at the correct nesting level with hover docs.
  4. Misspell backstroy: → a red squiggle appears immediately, before saving or running any command.
  5. On an air-gapped machine: run praisonai validate schema -o agents.schema.json once, 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

Then in agents.yaml:

Best Practices

Scaffolded agents.yaml files ship with the header already in place — no manual step. Just install the YAML extension and start typing.
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.
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.
The header is a plain YAML comment. Runtime parsing and execution are unchanged, so it is always safe to keep it committed.

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