nao init
Thenao init command sets up your context repository with all necessary files and structure.
Run nao init
nao_config.yaml already exists, nao init runs an update flow and lets you adjust existing configuration values instead of starting from scratch.
nao init keeps the interactive setup to the essentials - project name, one database, one LLM, and one git repository. Everything else (extra databases and repos, Slack, Notion, MCP servers, skills, profiling) is configured afterwards by editing nao_config.yaml.
1. Project Name
columns and preview templates (plus ai_summary when you configure an LLM); profiling and query_history are written as commented-out options you can enable later. See Databases for the full template and connection reference.
3. LLM API Key (Optional)
llm.providers list in nao_config.yaml afterwards - see LLM providers and models.
4. Git Repository (Optional)
nao init sets up a single database, LLM, and repo. To add more, or to configure Slack, Notion, MCP servers, or skills, edit nao_config.yaml directly - re-running nao init on an existing project opens an update flow instead of starting over.nao init, you’ll have a folder with the architecture of your context:
agent/mcps/mcp.json file, while skills are defined as markdown files in the agent/skills/ folder. Both are part of your project context and are discovered automatically by the agent.
nao sync
Once initialized, populate your context with actual content:- Connect to configured databases and pull schemas
- Clone configured repositories
- Sync configured Notion pages into markdown files under
docs/notion/ - Generate structured context files
- Index content for your agent
nao debug
Verify your configuration:- Configuration file syntax
- Database connectivity
- LLM API access
- Environment variables
- File permissions
nao_config.yaml
Thenao_config.yaml file is the central configuration for your analytics agent.
You can always edit it and re-launch a sync with this configuration.
Basic Structure
llm block is detailed in LLM providers and models below, and the test block in Evaluation.
Environment Variables
Store sensitive values in environment variables (examples for different providers and warehouses):
Use
credentials_json for cloud deployments (Cloud Run, GitHub Actions, etc.) where you store the full JSON content in an environment variable or secret manager. Use credentials_path for local development with credential files.LLM providers and models
Thellm block holds a list of providers under providers, and each provider lists the models it exposes. Use it to offer your users a choice of models, to expose models nao doesn’t know about (a proxy alias, a fine-tune, a model released after your nao version), and to price each of them.
default. Leave models out to expose the provider’s built-in model list, which is what nao init writes.
Every provider you declare is picked up by nao chat, nao debug and nao test. The chat server reads the block directly, so models, display names, inference settings and prices reach the app without any extra environment variable.
Providers declared in
nao_config.yaml show up in the admin UI under Settings -> Project -> Models, badged nao_config.yaml. Editing one there saves an override in the database that keeps winning over the file until you delete it, so the file remains the durable source of truth. Resolution order per provider is admin UI -> nao_config.yaml -> environment variables. See Choose LLM models.Provider credentials
AWS Bedrock with a bearer token:aws_profile to use a named AWS CLI profile, such as an SSO one, instead of inline keys.
Google Vertex AI, authenticating with Application Default Credentials, an inline service account or a key file:
OpenAI-compatible proxy (LiteLLM)
To route the agent through an LLM proxy such as LiteLLM, keep the underlying provider and addbase_url pointing at the proxy endpoint:
base_url is supported on the openai, anthropic, and openrouter providers. nao debug runs its connectivity check against this base URL, so the test reflects the endpoint your agent actually calls.
Because a proxy exposes model IDs nao has no price for, list them under models with their costs to keep cost tracking accurate.
Model costs
nao ships a price table for the models it knows and computes the cost of every call from it. Acosts block on a model overrides that table token type by token type:
nao test.
Migrating an older config
Before multiple providers were supported, thellm block declared a single provider inline:
providers list — but it prints a deprecation warning and cannot express several providers or per-model costs. Rewrite it with:
llm block and rewrites it as text, so comments and {{ env('...') }} references survive untouched.
Next Steps
Context Synchronization
Learn how to sync and update your agent’s context
Context Principles
Learn how to optimize your context for reliability, speed, and cost