Files
cleveragents-core/examples/actors/tool_collection.yaml
T
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

46 lines
1.3 KiB
YAML

# Tool-Only Actor
# Demonstrates an actor that only provides tools without LLM interaction
name: utilities/file_operations
type: tool
description: Collection of file operation tools for other actors to use
version: "1.0"
# Tool collection
tools:
# Reference existing tools
- files/read_file
- files/write_file
- files/delete_file
- files/copy_file
- files/move_file
- files/list_directory
- files/create_directory
# Add custom validation tool
- name: validators/check_python_syntax
description: Validate Python file syntax without executing it
parameters:
- name: file_path
type: str
description: Path to Python file to validate
required: true
code: |
import ast
def check_python_syntax(file_path: str) -> dict:
"""Check if a Python file has valid syntax."""
try:
with open(file_path, 'r', encoding='utf-8') as f:
ast.parse(f.read())
return {"valid": True, "error": None}
except SyntaxError as e:
return {
"valid": False,
"error": str(e),
"line": e.lineno,
"offset": e.offset
}
# No LLM configuration needed for tool-only actors
# No system prompt needed