Skip to main content

Agent System Overview

The Junis agent system is a set of four composable agent types — LLM, Sequential, Parallel, and Loop — that you combine into AI teams without writing code. An orchestrator routes every request to the right agent, and each agent can call tools, MCP integrations, and sub-agents. This guide explains each type, when to use it, and how to combine them.

What are the four agent types?

LLM Agent

Uses language models to generate responses, make decisions, and execute tasks

Sequential Agent

Executes agents in order, passing results from one to the next

Parallel Agent

Runs multiple agents simultaneously, combining their results

Loop Agent

Repeats agent execution until a condition is met or max iterations reached

LLM Agent

What It Does

LLM Agents are the workhorses of your AI system. They use language models (like Claude, gpt, or Gemini) to:
  • Generate natural language responses
  • Analyze and summarize text
  • Make decisions based on input
  • Call tools and APIs
  • Query knowledge bases (RAG)

When to Use

✅ Answering user questions ✅ Content generation (blogs, emails, summaries) ✅ Data analysis and insights ✅ Decision-making tasks ✅ Any task requiring language understanding

Configuration Options

LLM Agent Settings

Example: Customer Support Agent


Sequential Agent

What It Does

Sequential Agents execute a series of agents in order, where each agent’s output becomes the next agent’s input. Think of it as a pipeline or assembly line.

When to Use

✅ Multi-step workflows (research → analyze → report) ✅ Data transformation pipelines ✅ Quality assurance (generate → review → refine) ✅ Complex decision trees ✅ When output of one task informs the next

Configuration Options

Sequential Agent Settings

Example: Content Creation Pipeline

Best Practices

  • Each sub-agent should have ONE clear responsibility
  • Don’t try to do too much in a single step
  • Break complex tasks into 3-5 discrete steps
Bad Example: “Research, analyze, and write report” (one agent) Good Example: Research Agent → Analysis Agent → Writing Agent (three agents)
When you need specific data from a step, use output_key to extract it:
This prevents information overload in later steps.
Insert validation agents to ensure quality:

Parallel Agent

What It Does

Parallel Agents run multiple agents simultaneously and combine their results. Perfect for gathering information from multiple sources or performing independent tasks concurrently.

When to Use

✅ Data collection from multiple sources ✅ Independent analyses that can run concurrently ✅ Speeding up workflows with parallelization ✅ Comparing different approaches ✅ Aggregating diverse perspectives

Configuration Options

Parallel Agent Settings

Example: Multi-Source Data Aggregator

Best Practices

Parallel agents should NOT depend on each other’s results:Bad Example: Agent A calculates total, Agent B calculates percentage of total Good Example: Agent A analyzes Dataset 1, Agent B analyzes Dataset 2 (independent)
If one parallel agent fails, others should still complete:
After parallel execution, add a Sequential step to combine results:The Compiler Agent synthesizes parallel results into a coherent response.

Loop Agent

What It Does

Loop Agents repeat execution until a condition is met or maximum iterations reached. Useful for iterative refinement, retry logic, and self-correcting workflows.

When to Use

✅ Iterative refinement (generate → evaluate → improve) ✅ Retry logic with exponential backoff ✅ Quality assurance loops ✅ Self-correcting systems ✅ Tasks requiring multiple attempts

Configuration Options

Loop Agent Settings

Example: Code Review and Refinement

Best Practices

The sub-agent should explicitly signal when to exit:
  • 2-3 iterations: Quick refinement tasks
  • 3-5 iterations: Moderate complexity
  • 5-10 iterations: Complex optimization (rare)
Higher values increase cost and latency. Most tasks converge in 2-3 iterations.
Pass iteration count to the agent for context:
Handle max iterations gracefully:

Combining Agent Types

The real power of Junis comes from combining different agent types to build sophisticated workflows.

Example: Full Blog Post System

1

Orchestrator Routes Request

User says: “Write a blog post about quantum computing”Orchestrator recognizes this as a content creation task and routes to Content Pipeline (Sequential Agent).
2

Sequential Agent Coordinates Workflow

Content Pipeline executes three stages:
  1. Research (Parallel Agent)
  2. Writing (Loop Agent)
  3. Optimization (LLM Agent)
3

Parallel Agent Gathers Research

Research Team runs three agents simultaneously:
  • Web Researcher: Latest quantum computing news
  • Doc Researcher: Academic papers from knowledge base
  • Expert Interview Agent: Queries interview transcripts
Results feed into Compiler Agent that synthesizes a research brief.
4

Loop Agent Refines Content

Writer + Reviewer Loop:
  • Writer drafts blog post from research
  • Reviewer checks quality, accuracy, readability
  • Loop continues until approved (max 3 iterations)
5

Final Agent Optimizes for SEO

SEO Optimizer adds:
  • Meta description
  • Keywords
  • Heading structure
  • Internal links
Output: Publication-ready blog post delivered in ~45 seconds.

Which agent type should you use?

Not sure which agent type to use? Follow this decision tree:

Common Patterns

Use Case: Generate insights from data
Use Case: Quality assurance
Use Case: Smart routing
Use Case: Evaluate multiple approaches

Performance Considerations

Latency

  • LLM Agent: 2-10 seconds
  • Sequential Agent: Sum of sub-agents
  • Parallel Agent: Max of sub-agents
  • Loop Agent: Iterations × agent time

Cost

  • LLM Agent: 1 LLM call
  • Sequential Agent: N LLM calls
  • Parallel Agent: N LLM calls (concurrent)
  • Loop Agent: Up to max_iterations × calls

Optimization Tips

1

Use Faster Models

  • Development: Claude Haiku (fast, cheap)
  • Production: Claude Sonnet (balanced)
  • Complex Tasks Only: Claude Opus / GPT-4
Switching from Opus to Haiku can reduce latency by 5-10x and costs by 60x.
2

Enable Streaming

Improves perceived performance even if total time is the same.
3

Limit Parallel Agents

  • 2-3 parallel agents: Optimal for most cases
  • 4-5 parallel agents: Acceptable with monitoring
  • 6+ parallel agents: Risk rate limiting and high costs
Consider Sequential + Parallel hybrid instead of large Parallel groups.
4

Set Conservative max_llm_calls

Most loops converge in 2-3 iterations. Higher values rarely improve output quality.

Next Steps

Add Tools to Agents

Connect agents to APIs and external services

MCP Integration

Integrate GitHub, Firecrawl, and custom services

Tools Overview

Let agents query your documents

Squad Collaboration

Let one squad’s orchestrator ask another squad and relay the answer

Organization Wiki

Give every agent a shared second brain that persists across conversations

Questions? Contact us at contact@junis.ai to discuss agent architectures and get expert guidance.