Junis provides four types of agents that work together to handle any workflow, from simple Q&A to complex multi-step processes. This guide explains each agent type, when to use them, and how to combine them effectively.
✅ Answering user questions
✅ Content generation (blogs, emails, summaries)
✅ Data analysis and insights
✅ Decision-making tasks
✅ Any task requiring language understanding
name: Support Agentagent_type: LLM_AGENTmodel: claude-haikutemperature: 0.5instruction: | You are a customer support agent for Acme Corp. Responsibilities: 1. Answer product questions using the knowledge base 2. Troubleshoot common issues 3. Escalate complex problems to human agents Always be empathetic and solution-oriented.rag_tools: - rag_product_documentation - rag_faq_database
User: How do I reset my password?Support Agent: I’d be happy to help you reset your password! Here’s how:
Go to the login page at acme.com/login
Click “Forgot Password?” below the login button
Enter your registered email address
Check your email for a reset link (arrives within 5 minutes)
Click the link and create a new password
If you don’t receive the email, check your spam folder or contact us at support@acme.com.Is there anything else I can help you with?
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.
✅ 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
name: Blog Post Generatoragent_type: SEQUENTIAL_AGENTsub_agents: # Step 1: Research - agent: Topic Researcher order: 1 role: Search web and knowledge base for relevant information # Step 2: Outline - agent: Content Outliner order: 2 role: Create structured outline from research # Step 3: Writing - agent: Blog Writer order: 3 role: Write engaging blog post following outline # Step 4: SEO Optimization - agent: SEO Optimizer order: 4 role: Add keywords, meta description, headings
Input: “Write a blog post about AI safety”Step 1 (Topic Researcher):
Searches web for latest AI safety news
Queries knowledge base for expert opinions
Output: Comprehensive research notes (2000 words)
Step 2 (Content Outliner):
Reads research notes from Step 1
Creates structured outline with sections
Output: 5-section outline with key points
Step 3 (Blog Writer):
Follows outline from Step 2
Writes engaging 1500-word blog post
Output: Draft blog post with intro, body, conclusion
Step 4 (SEO Optimizer):
Analyzes draft from Step 3
Adds SEO metadata and formatting
Final Output: Publication-ready blog post
Each step only sees the output from the previous step, keeping context focused and efficient.
Parallel Agents run multiple agents simultaneously and combine their results. Perfect for gathering information from multiple sources or performing independent tasks concurrently.
✅ Data collection from multiple sources
✅ Independent analyses that can run concurrently
✅ Speeding up workflows with parallelization
✅ Comparing different approaches
✅ Aggregating diverse perspectives
name: My Parallel Workflowagent_type: PARALLEL_AGENT# Sub-Agents (executed simultaneously)sub_agents: - agent_id: source_a_collector description: Fetches data from Source A - agent_id: source_b_collector description: Fetches data from Source B - agent_id: source_c_collector description: Fetches data from Source C# Results are automatically combined# Order doesn't matter for parallel execution
name: Market Research Aggregatoragent_type: PARALLEL_AGENTsub_agents: # All run simultaneously - agent: Competitor Analysis Agent role: Analyze competitor websites and pricing - agent: Social Media Insights Agent role: Gather sentiment from Twitter, Reddit, LinkedIn - agent: Industry News Agent role: Summarize latest industry news and trends - agent: Customer Feedback Agent role: Analyze recent customer reviews and support tickets
Copy
t=0s: All agents start simultaneously ├─ Competitor Analysis (15s) ├─ Social Media Insights (20s) ├─ Industry News (10s) └─ Customer Feedback (18s)t=20s: All agents complete Results are combined into single reportTotal Time: 20 seconds (vs 63 seconds if sequential)
Parallel execution requires sufficient API rate limits and resources. Monitor usage to avoid throttling.
The Parallel Agent automatically combines results:
Copy
{ "competitor_analysis": "Our pricing is 15% lower than competitors...", "social_sentiment": "Positive sentiment at 68%, trending topics include...", "industry_news": "New regulations announced today...", "customer_feedback": "Top feature requests: mobile app, API access..."}
You can add a Compiler Agent after the Parallel Agent to synthesize results into a cohesive narrative.
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)
Handle Failures Gracefully
If one parallel agent fails, others should still complete:
Copy
# Enable fault toleranceparallel_agent: continue_on_error: true # Don't stop if one agent fails timeout: 30 # Max wait time per agent (seconds)
Add a Compiler Step
After parallel execution, add a Sequential step to combine results:The Compiler Agent synthesizes parallel results into a coherent response.
Loop Agents repeat execution until a condition is met or maximum iterations reached. Useful for iterative refinement, retry logic, and self-correcting workflows.
name: Code Quality Loopagent_type: LOOP_AGENTmax_llm_calls: 3sub_agents: - agent: Code Generator role: Generate Python function based on requirements - agent: Code Reviewer role: | Review code for: - Correctness - Edge cases - Best practices - Security issues If issues found, provide specific feedback for next iteration. If code is acceptable, respond with "APPROVED".
The sub-agent should explicitly signal when to exit:
Copy
instruction: | Review the output. If quality is acceptable, respond with: "EXIT: Quality standards met" Otherwise, provide specific improvement suggestions.
Set Reasonable Max Iterations
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.
Track Iteration Count
Pass iteration count to the agent for context:
Copy
instruction: | This is iteration {{iteration_count}} of {{max_iterations}}. Previous feedback: {{previous_feedback}} Improve the output based on feedback.
Implement Degradation Strategy
Handle max iterations gracefully:
Copy
# After loop exitsif iterations >= max_llm_calls: escalate_to_human_review() log_warning("Loop did not converge") return best_attempt
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:
Research (Parallel Agent)
Writing (Loop Agent)
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