Skip to main content
praisonai init creates a working .praisonai/ project — config, a starter agent, a starter command, and a starter tool — so the next commands you type already run.
For a multi-agent team project (agents.yaml + tasks.yaml + a Python entry point), use praisonai init team <name> instead. praisonai init (this page) scaffolds the single-agent .praisonai/ convention.
For a single agent without commands or tools, use praisonai agent create instead. For a multi-agent team, use praisonai init team.

Quick Start

1

Scaffold the project

This writes four files under .praisonai/ — skipping any that already exist.
2

Run the scaffolded agent

3

Run the scaffolded command

How It Works

Project vs global

Flags

Scaffolded files

Scaffolded model is provider-aware

praisonai init reads your available provider credentials (OPENAI_API_KEY, ANTHROPIC_API_KEY, GEMINI_API_KEY, GOOGLE_API_KEY, GROQ_API_KEY, COHERE_API_KEY, OLLAMA_HOST) and writes the matching default model into both config.yaml and agents/assistant.md. Falls back to gpt-4o-mini when no credential is detected. This choice is not persisted as your recent model — subsequent praisonai run invocations resolve independently. See Models → Provider Auto-Detection for the full credential-to-model precedence table. config.yaml — project-wide defaults:
The model: value shown below (gpt-4o-mini) is the terminal fallback. With only ANTHROPIC_API_KEY set, the scaffolded model: is anthropic/claude-3-5-sonnet-latest; with only GEMINI_API_KEY, it is gemini/gemini-1.5-flash. See Models → Provider Auto-Detection for the full precedence.
The # yaml-language-server: line enables editor autocomplete and inline error highlighting in VS Code (YAML extension) and other LSP-aware editors. The nested agent: / output: shape is exactly what ConfigResolver reads — flat top-level model: / output: keys will now produce a warning.

agents.yaml editor header

Any scaffold path that emits an agents.yaml now prepends a matching header so editors validate agent definitions immediately — no manual setup.
The header is a plain YAML comment, so runtime parsing is unaffected. See Editor Support for full setup across VS Code, Neovim, and JetBrains IDEs. agents/assistant.md — ready-to-run starter agent:
The model: field is written with the provider-detected default (same logic as config.yaml above). The value shown here is the terminal fallback.
commands/review.md — starter command using $ARGUMENTS and @file:
tools/example.py — commented @tool starter, auto-discovered on run:
Uncomment the stub and pass --allow-local-tools (or set PRAISONAI_ALLOW_LOCAL_TOOLS=true), then every praisonai run in this project auto-loads example.greet. See Project-local tools for discovery and safety rules.
After a successful praisonai init, the CLI also prints a one-line opt-in reminder:

AGENTS.md generation (—generate)

praisonai init --generate runs a short analysis agent that reads a cheap snapshot of your repo and writes a tailored AGENTS.md at the repo root — so your next praisonai run starts with real project context instead of boilerplate.
--generate only runs when a provider credential is present. With no credential, or if the agent fails, init keeps the static scaffold, writes no AGENTS.md, and still exits 0. The only non-zero exit is a write failure (permissions or disk space).

How the agent sees your repo

The pre-scan is deliberately small so cost and tokens stay bounded:
  • Top-level entries — directories first, first 60 names.
  • Detected manifestspyproject.toml, setup.py, setup.cfg, requirements.txt, package.json, Cargo.toml, go.mod, pom.xml, build.gradle, Makefile, Dockerfile, docker-compose.yml, tox.ini.
  • README head — first 1500 characters of README.md, README.rst, README.txt, or README (first match wins).
The agent never reads your whole tree — only this high-signal snapshot — which bounds token usage and cost while still capturing build/test commands and conventions.
--global changes only where the static scaffold lands (~/.praisonai/). The generated AGENTS.md always writes to the repo root, because the rules loader discovers it there on the next run.

Common Patterns

Scaffold a fresh project

Re-init after editing a file

praisonai init is idempotent — it skips files that already exist. To overwrite with the original starters:

Set up personal shortcuts

Agents and commands land in ~/.praisonai/ and are available in every project. Project-level definitions override global ones on name collision.

Generate a repo-tailored AGENTS.md

Scaffolds .praisonai/ and writes a project-specific AGENTS.md the rules loader picks up automatically. Regenerate after major changes:

Best Practices

Check in .praisonai/agents/, .praisonai/commands/, and .praisonai/tools/ so the whole team shares the same agents, commands, and tools without any extra setup. Project-local tools still require each teammate to pass --allow-local-tools (or set PRAISONAI_ALLOW_LOCAL_TOOLS=true) before they auto-load.PraisonAI also discovers agents and commands from existing .claude/agents/ / .claude/commands/ and .agents/agents/ / .agents/commands/ layouts, so teams that already keep definitions for another tool don’t have to copy them into .praisonai/. See Custom Agents & Commands.
Use --global for shortcuts that are specific to you. Team-shared agents belong in the project directory — project files override global on name collision.
The scaffolded files match the exact shape CustomDefinitionsDiscovery parses: frontmatter fields for agents, $ARGUMENTS / @file substitutions for commands. Keep that structure when customising.
--force overwrites existing files without prompting. Commit or back up your edits first.
The tailored AGENTS.md gives agents the specific build/test/run commands and conventions on first contact — which is what the rules loader ships to every subsequent turn. Keep the flag off for empty scaffolds and demos.

Init Team

Scaffold a multi-agent AgentTeam project (agents.yaml + tasks.yaml)

Custom Agents, Commands & Tools

Agent frontmatter, command templates, and project-local tool discovery

Agent CLI

List and inspect custom agents

Command CLI

List and preview custom commands

Config CLI

Manage project and global configuration

Project AGENTS.md

How the generated AGENTS.md is auto-loaded as project context

Rules CLI

Inspect the auto-discovered instruction files agents load

Editor Support

Autocomplete and inline validation for scaffolded agents.yaml