Back to Plano

Use `planoai init` Templates to Bootstrap New Projects Correctly

skills/rules/cli-init.md

0.4.222.2 KB
Original Source

Use planoai init Templates to Bootstrap New Projects Correctly

planoai init generates a valid config.yaml from built-in templates. Each template demonstrates a specific Plano capability with correct structure, realistic examples, and comments. Use this instead of writing config from scratch — it ensures you start with a valid, working configuration.

Available templates:

Template IDWhat It DemonstratesBest For
sub_agent_orchestrationMulti-agent routing with specialized sub-agentsBuilding agentic applications
coding_agent_routingRouting preferences + model aliases for coding workflowsClaude Code and coding assistants
preference_aware_routingAutomatic LLM routing based on task typeMulti-model cost optimization
filter_chain_guardrailsInput guards, query rewrite, context builderRAG + safety pipelines
conversational_state_v1_responsesStateful conversations with memoryChatbots, multi-turn assistants

Usage:

bash
# Initialize with a template
planoai init --template sub_agent_orchestration

# Initialize coding agent routing setup
planoai init --template coding_agent_routing

# Initialize a RAG with guardrails project
planoai init --template filter_chain_guardrails

Typical project setup workflow:

bash
# 1. Create project directory
mkdir my-plano-agent && cd my-plano-agent

# 2. Bootstrap with the closest matching template
planoai init --template preference_aware_routing

# 3. Edit config.yaml to add your specific models, agents, and API keys
#    (keys are already using $VAR substitution — just set your env vars)

# 4. Create .env file for local development
cat > .env << EOF
OPENAI_API_KEY=sk-proj-...
ANTHROPIC_API_KEY=sk-ant-...
EOF

echo ".env" >> .gitignore

# 5. Start Plano
planoai up

# 6. Test your configuration
curl http://localhost:12000/v1/chat/completions \
  -H "Content-Type: application/json" \
  -d '{"model": "gpt-4o", "messages": [{"role": "user", "content": "Hello"}]}'

Start with preference_aware_routing for most LLM gateway use cases and sub_agent_orchestration for multi-agent applications. Both can be combined after you understand each independently.

Reference: https://github.com/katanemo/archgw