Skip to main content
Connic
Build

Agent Types

Choose the execution model that fits the job: model-driven reasoning, a deterministic tool call, or a multi-agent sequence.

Last updated

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 AgentStandard AI agents powered by language models

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.

agents/assistant.yaml
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 AgentChain multiple agents together in a pipeline

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.

agents/document-pipeline.yaml
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-processor

Required: agents list. Each agent must be defined in its own YAML file.

Tool AgentExecute one tool directly without AI reasoning

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.

agents/tax-calculator.yaml
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_tax

Required: 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

FeatureLLMSequentialTool
AI modelYesDepends on chainNo
Uses toolsMultiple toolsVia sub-agentsSingle tool
SpeedModel-dependentSum of chainFastest
CostPer-tokenSum of chainNo model cost

Complete examples

Full-featured LLM agent

An invoice processor with multiple tools, detailed instructions, retries, reasoning, and guardrails:

agents/invoice-processor.yaml
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: block

Customer inquiry pipeline

A three-step sequential agent for validation, database lookup, and response formatting:

agents/customer-inquiry.yaml
version: "1.0"

name: customer-inquiry
type: sequential
description: "Validate input → fetch account → format response"

agents:
  - validate-inquiry
  - fetch-account
  - format-response

Define each step as its own agent:

agents/validate-inquiry.yaml
version: "1.0"

name: validate-inquiry
type: tool
description: "Validate and normalize customer inquiry payload"
tool_name: validation.validate_inquiry
agents/fetch-account.yaml
version: "1.0"

name: fetch-account
type: tool
description: "Lookup account details from Postgres"
tool_name: postgres.fetch_user_account
agents/format-response.yaml
version: "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.