Skip to main content

How to Create Templates Using CLI

1

Initialize New Template

praisonai templates init my-template
2

Navigate to Template

cd my-template
3

Customize Generated Files

Edit TEMPLATE.yaml and agents.yaml to match your requirements.

How to Create Templates Manually

1

Create Directory Structure

mkdir my-template
cd my-template
touch TEMPLATE.yaml agents.yaml
2

Write TEMPLATE.yaml

name: my-template
version: "1.0.0"
description: "My custom template"

variables:
  task:
    description: "Task to perform"
    required: true

requires:
  tools: [internet_search]
3

Write agents.yaml

framework: praisonai
topic: "{{task}}"

roles:
  agent:
    role: Assistant
    goal: Complete the task
    tasks:
      main:
        description: "{{task}}"

How to Create Templates from Existing Agents

1

Export Running Agent

from praisonaiagents import Agent

agent = Agent(
    name="researcher",
    role="Research Specialist",
    goal="Research topics thoroughly",
    tools=["internet_search"]
)

# Export to template format
agent.export_template("./my-research-template")
2

Customize Exported Template

cd my-research-template
# Edit TEMPLATE.yaml to add variables

How to Create Templates by Cloning

1

Clone Existing Template

praisonai templates clone ai-video-editor my-editor
2

Modify Cloned Template

cd my-editor
# Update TEMPLATE.yaml with new name/version
# Modify agents.yaml as needed

How to Create Templates from GitHub

1

Fork Repository

Fork the Agent-Recipes repository on GitHub.
2

Clone Your Fork

git clone https://github.com/YOUR_USERNAME/Agent-Recipes
cd Agent-Recipes/agent_recipes/templates
3

Create New Template Directory

mkdir my-new-template
# Copy structure from existing template
cp -r ai-video-editor/* my-new-template/
4

Customize and Push

# Edit files
git add .
git commit -m "Add my-new-template"
git push

Template Creation Methods Comparison

MethodBest ForComplexity
CLI initQuick startLow
ManualFull controlMedium
From AgentConverting existing codeMedium
CloneModifying existing templatesLow
GitHub ForkContributing to communityMedium