Files
cleveragents-core/examples/actors/simple_graph.yaml
aditya 41f90afaf9 docs(actor): add comprehensive actor YAML examples
Add 5 example actor configurations demonstrating all actor types:

Simple Examples:
- simple_llm.yaml: Basic LLM actor with code review prompt
- llm_with_tools.yaml: LLM with mix of tool references and inline tools
- tool_collection.yaml: Tool-only actor (no LLM)

Graph Examples:
- simple_graph.yaml: 3-node linear workflow (extract → analyze → summarize)
- graph_workflow.yaml: Complex TDD workflow with 10 nodes
  * Conditional routing based on test results
  * Retry logic with max attempts
  * Subgraph composition (code review)
  * Error escalation paths

Each example demonstrates:
- Proper namespaced naming (namespace/name)
- Type-specific configurations
- Context and memory settings
- Environment variable usage
- Tool definitions (inline and references)

Part 5 of C1.schema implementation (Actor YAML Schema Models).
2026-02-17 12:52:07 +00:00

79 lines
1.8 KiB
YAML

# Simple Graph Actor - Sequential Processing
# Demonstrates a simple 3-node graph with linear execution
name: workflows/document_processor
type: graph
description: Simple document processing workflow (extract → analyze → summarize)
version: "1.0"
# LLM model
model: gpt-3.5-turbo
# Graph topology
route:
nodes:
# Node 1: Extract text from document
- id: extractor
type: tool
name: Text Extractor
description: Extracts text from various document formats
config:
tool_name: documents/extract_text
parameters:
formats:
- pdf
- docx
- txt
# Node 2: Analyze content
- id: analyzer
type: agent
name: Content Analyzer
description: Analyzes document structure and content
config:
model: gpt-3.5-turbo
prompt: |
Analyze the document content and identify:
- Main topics and themes
- Key entities (people, places, organizations)
- Sentiment and tone
- Document structure
tools:
- analysis/extract_entities
- analysis/sentiment_analysis
# Node 3: Generate summary
- id: summarizer
type: agent
name: Summarizer
description: Creates concise summary of document
config:
model: gpt-3.5-turbo
prompt: |
Create a concise summary of the document including:
- Main points (3-5 bullet points)
- Key findings
- Actionable insights
Keep it under 200 words.
# Linear edges
edges:
- from_node: extractor
to_node: analyzer
- from_node: analyzer
to_node: summarizer
# Entry and exit
entry_node: extractor
exit_nodes:
- summarizer
# Context settings
context_view: executor
memory:
enabled: true
max_messages: 10
context:
max_context_tokens: 4000