One-off vs Conversational

Choosing the right agent pattern

Agents can be designed for one-off tasks or multi-turn conversations. Understanding when to use each pattern helps you build better AI applications.

Two Patterns

PatternHandlerInputOutput
One-offinvokeStructured dataStructured result
ConversationalchatMessage historyAssistant response

One-off Agents (Invoke)

One-off agents process a single request and return a result. They're stateless — each request is independent.

When to Use

  • Data processing and transformation
  • Content generation (articles, summaries, code)
  • API-like operations
  • Batch processing
  • Single-step automation

Use Cases

Use CaseInputOutput
Summarize article{ "text": "..." }{ "summary": "..." }
Extract data{ "document": "..." }{ "entities": [...] }
Generate code{ "prompt": "..." }{ "code": "..." }
Translate text{ "text": "...", "to": "es" }{ "translation": "..." }
Analyze sentiment{ "reviews": [...] }{ "scores": [...] }

Example

POST /agent/summarizer/invoke
{
  "input": {
    "text": "Long article text here...",
    "maxLength": 100
  }
}

Response:
{
  "output": "Brief summary of the article..."
}

Conversational Agents (Chat)

Conversational agents handle multi-turn dialogues. They receive the full message history and generate contextual responses.

When to Use

  • Customer support bots
  • AI assistants
  • Interactive tutorials
  • Guided workflows
  • Any dialogue-based interaction

Use Cases

Use CaseDescription
Support botAnswer questions, troubleshoot issues
Sales assistantGuide users through product selection
Onboarding agentWalk new users through setup
Coding assistantHelp with code, remember context
Personal assistantSchedule, remind, manage tasks

Example

POST /agent/support-bot/chat
{
  "messages": [
    { "role": "user", "content": "I can't log in" },
    { "role": "assistant", "content": "I can help! What error do you see?" },
    { "role": "user", "content": "It says invalid password" }
  ]
}

Response:
{
  "message": {
    "role": "assistant",
    "content": "Try resetting your password at reminix.com/reset"
  }
}

Combining Both

Many agents benefit from both patterns:

ScenarioInvokeChat
Writing assistant"Generate blog post""Help me brainstorm ideas"
Code agent"Refactor this function""Explain this error"
Data agent"Process this CSV""What columns should I include?"

You can implement both handlers in a single agent:

Agent("writing-assistant")
  ├── invoke → Generate content
  └── chat   → Discuss ideas

Quick Decision Guide

Need conversation history?
  ├── Yes → Use Chat
  └── No → Is it a single task?
            ├── Yes → Use Invoke
            └── No → Consider both

Next Steps

On this page