Agent Types
Choose the execution model that fits the job: model-driven reasoning, a deterministic tool call, or a multi-agent sequence.
The type field determines how an agent executes. Connic Composer supports three agent types:
- LLM: tasks requiring AI reasoning, conversation, or complex decisions
- Sequential: multi-step workflows where agents work in a fixed order
- Tool: deterministic operations that do not need AI reasoning
LLM agents use AI models to process requests. They can reason about inputs, use tools, and generate natural-language responses. This is the default type. Use it for conversational AI, reasoning, or intelligent tool selection.
version: "1.0"
name: assistant
type: llm # Default type, can be omitted
model: gemini/gemini-2.5-pro # Provider prefix required
description: "A helpful general-purpose assistant"
system_prompt: "You are a helpful assistant. Be concise and accurate."Required: model and system_prompt
Sequential agents execute a chain of other agents in order. Each agent receives the previous agent's output as its input. Use them for multi-step workflows and data pipelines.
version: "1.0"
name: document-pipeline
type: sequential
description: "Processes documents through extraction and validation"
# Agents execute in order, each receiving the previous agent's output
agents:
- assistant
- invoice-processorRequired: agents list. Each agent must be defined in its own YAML file.
Tool agents execute a single tool with the incoming payload. No AI model is involved, so they are faster and deterministic. Use them for calculations, data transforms, or API calls.
version: "1.0"
name: tax-calculator
type: tool
description: "Calculates tax directly using the calculator tool"
# Executes this tool directly with the incoming payload
tool_name: calculator.calculate_taxRequired: tool_name. Reference one custom tool under tools/, such as validation.validate_inquiry. Predefined tools and api:tools cannot be used as a tool agent's body.
The function must declare a payload parameter and may declare context; any other signature fails deploy validation: def my_tool(payload, context=None). The payload is passed as one dict, never unpacked into individual arguments. When an LLM agent reaches the tool agent through trigger_agent, tell it in the system prompt what to send.
Type comparison
| Feature | LLM | Sequential | Tool |
|---|---|---|---|
| AI model | Yes | Depends on chain | No |
| Uses tools | Multiple tools | Via sub-agents | Single tool |
| Speed | Model-dependent | Sum of chain | Fastest |
| Cost | Per-token | Sum of chain | No model cost |
Complete examples
Full-featured LLM agent
An invoice processor with multiple tools, detailed instructions, retries, reasoning, and guardrails:
version: "1.0"
name: invoice-processor
type: llm
model: openai/gpt-5.2
fallback_model: gemini/gemini-2.5-pro
description: "Extracts data from invoices and validates totals"
system_prompt: |
You are an expert accountant specializing in invoice processing.
Your responsibilities:
1. Extract all relevant fields from invoices (vendor, date, line items, totals)
2. Use the calculator tool to verify mathematical accuracy
3. Flag any discrepancies between line items and totals
4. Format extracted data in a structured JSON format
Always double-check calculations before confirming totals are correct.
max_concurrent_runs: 10
max_iterations: 50
temperature: 0.7
reasoning_effort: medium
retry_options:
attempts: 5
initial_delay: 10
max_delay: 60
tools:
- calculator.add
- calculator.multiply
- pdf.extract_text
- validation.check_totals
guardrails:
input:
- type: prompt_injection
mode: block
- type: pii
mode: redact
output:
- type: moderation
mode: block
- type: system_prompt_leakage
mode: blockCustomer inquiry pipeline
A three-step sequential agent for validation, database lookup, and response formatting:
version: "1.0"
name: customer-inquiry
type: sequential
description: "Validate input → fetch account → format response"
agents:
- validate-inquiry
- fetch-account
- format-responseDefine each step as its own agent:
version: "1.0"
name: validate-inquiry
type: tool
description: "Validate and normalize customer inquiry payload"
tool_name: validation.validate_inquiryversion: "1.0"
name: fetch-account
type: tool
description: "Lookup account details from Postgres"
tool_name: postgres.fetch_user_accountversion: "1.0"
name: format-response
type: llm
model: gemini/gemini-2.5-pro
description: "Format a helpful customer response"
system_prompt: |
You receive validated inquiry data plus account details.
Respond concisely and include next steps when relevant.Middleware linking: create middleware/validate-inquiry.py to attach hooks to agents/validate-inquiry.yaml. No YAML config is required.