nao sync
Thenao sync command populates your context folder with content from configured sources.
--provider (or -p).
databasesrepositoriesnotion
provider:connection-name:
nao sync, the following happens:
1. Database Schemas
For each database in your nao_config.yaml:
- Connect to the database
- Extract schema information (tables, columns, data types)
- Generate context files in
databases/folder - Create structured files for each table:
columns.md- Column definitions and typesdescription.md- Table description (if available)preview.md- Sample data previewprofiling.md- Data profiling information
- Clone or pull the latest code
- Extract relevant files from specified paths
- Index content for the agent
- Store in
docs/folder
- Content is indexed for fast semantic search
- Embeddings are created for relevant context retrieval
- Agent can access all synced information
Scheduling
GitHub Actions
Set up automated syncing with GitHub Actions to keep your context up to date. 1. Create Workflow File This workflow will regularly runnao sync on GitHub’s servers, commit any changes to your context files (like updated database schemas or docs), and push them back to your repository so your context stays in sync without manual commands.
Create .github/workflows/nao_sync.yml in your repository:
- Go to Settings → Secrets and variables → Actions
- Click “New repository secret”
- Add secrets for all environment variables used in your
nao_config.yaml:GCP_SERVICE_ACCOUNT_KEY_JSON- Full JSON content of your BigQuery service accountNOTION_API_KEY- If using Notion integration- Any other credentials referenced in your config
- Go to Actions tab in your repository
- Select “Nao Sync” workflow
- Click “Run workflow”
- Check the Actions tab to see sync history
- Review logs if sync fails
- Verify changes are committed to your repository
The workflow automatically commits and pushes any changes from
nao sync back to your repository, keeping your context files up to date.Context Providers
Learn about configuring databases and repos
Context Engineering Playbook
Learn how to measure, iterate, and optimize your context
Start Chatting
Use your synced context with the agent
Context Principles
Understand core principles for effective context engineering