Documentation
Learn how to use Compozy
Agents in Compozy are defined and configured using the following structure and patterns.
agents: - id: string # Unique identifier for the agent name: string # Optional human-readable name type: string # Agent type (basic, custom, etc.) use: string|object # Agent implementation reference import: string # Path to external agent definition config: # Agent configuration provider: string # AI provider identifier model: string # Model identifier url: string # API URL version: string # Optional model version api_key: string organization: string temperature: number max_tokens: number top_p: number frequency_penalty: number presence_penalty: number schema: # Optional schema definition input: object # Input schema for agent parameters with: object # Agent-specific configuration env: object # Agent-specific environment variables tools: array # Available tools memory: object # Memory configuration # Custom agent specific actions: array # List of actions - id: string # Action identifier instructions: string # Action instructions config: object # Custom action configuration messages: array # List of messages - role: string # Message role content: string # Message content output: object # Action output schema
agents: - id: content_moderator type: basic use: compozy/agents:content-moderator@1.0.0
config
with
agents: - id: content_moderator use: compozy/agents:content-moderator # Override provider configuration config: model: anthropic/claude-3-sonnet temperature: 0.4 max_tokens: 2000 # Override agent parameters with: language: en threshold: 0.7
agents: - id: research_assistant config: provider: openai model: gpt-4o-mini tools: - id: web_search use: compozy/tools:web-search@1.0.0 - id: pdf_reader use: compozy/tools:pdf-reader@1.0.0
Agent Design
Configuration
Tool Integration
Memory Management
tasks: - id: analyze_content type: agent use: compozy/agents:content-moderator@1.0.0 with: content: "{{ trigger.content }}"
# Define memory in workflow memory: support_memory: id: support_memory vector: use: compozy/vector:pg-vector dimensions: 1536 chat_memory: id: chat_memory storage: use: compozy/storage:postgres vector: use: compozy/vector:pinecone dimensions: 1536 options: lastMessages: 10 semanticRecall: enabled: true