AI sub-agents are specialized assistants that run in parallel to speed up research, fetching, and complex tasks. On-device sub-agents coordinate their work on your phone, delegating and synthesizing results—all offline and private.
What Are Sub-Agents?
A sub-agent is a second (or third, or fourth) AI agent tasked with a specific job while you're having a conversation. Imagine you ask the main MyBenAI assistant: "Research the top 5 climbing destinations in South America and compare their difficulty and cost."
Instead of doing all the research sequentially (search for destination 1, then 2, then 3...), the assistant can spawn sub-agents: one searches climbing destinations, another compares difficulty levels, a third researches travel costs. All three work in parallel, then report back their findings. The main assistant synthesizes the results into a coherent answer.
This is much faster than sequential research, especially on-device where resources are shared. Sub-agents are especially useful for tasks requiring multiple searches, data gathering, or cross-domain synthesis.
How On-Device Sub-Agents Work
On-device sub-agents operate under a strict model: they share a single LLM context and inference queue.
- Main assistant decides to delegate: You ask a complex question. The main chat assistant analyzes it and decides that sub-agents would speed things up. It creates 2–4 sub-tasks with specific instructions for each agent.
- Parallel fetching and research: Each sub-agent runs its assigned task in parallel—fetching web data, searching documents, or calling tools. These are I/O operations (network requests, file reads), so they can overlap without blocking each other.
- Results queue for inference: While sub-agents fetch in parallel, inference (LLM execution) queues them FIFO on a single global mutex. Only one agent thinks at a time. This prevents two models from running simultaneously and overwhelming your device.
- Main agent synthesizes: Once all sub-agents report back, the main assistant reads their findings and generates a unified answer for you.
The key insight: parallelization happens at I/O (network, file read), but inference stays sequential. This balances speed (parallel fetching) with resource efficiency (one model context).
Types of Sub-Agent Tasks
Research agents: Tasked with searching and summarizing information on a specific topic. Useful when you need multiple perspectives or comprehensive coverage.
Analysis agents: Tasked with examining data, comparing options, or evaluating trade-offs. E.g., "Compare these three vacation destinations on safety, cost, and climate."
Data gathering agents: Tasked with pulling specific information from documents, web search, or personal knowledge base. Useful for extracting structured data (e.g., "List all dependencies in this codebase").
Synthesis agents: Tasked with combining information from multiple sources into a coherent narrative or recommendation. E.g., "Based on my travel notes, research on X destination, and current exchange rates, recommend a trip itinerary."
Performance Benefits
Sub-agents shine when your task involves multiple independent research steps. On a typical smartphone with 8 GB of RAM and a 7B-parameter model:
- Sequential task (no sub-agents): One agent searches destination 1 (~2 seconds), then destination 2 (~2 seconds), then destination 3 (~2 seconds). Total: ~6 seconds of waiting, then 30 seconds of model thinking to synthesize. Total time: ~36 seconds.
- Parallel sub-agents: Three agents fetch destinations 1, 2, and 3 in parallel (~2 seconds combined, thanks to overlapping network I/O). Then the model synthesizes. Total time: ~10–15 seconds. Speed-up of 2–3x.
The gains are largest when tasks are I/O-heavy (network-bound) and parallelizable. Word-heavy synthesis (like writing an essay) doesn't benefit from sub-agents because it's compute-bound, not I/O-bound.
Guardrails and Resource Limits
Sub-agents are bounded by design. MyBenAI enforces strict limits to prevent runaway behavior:
- Token budgets: Each sub-agent gets an allocation of tokens (e.g., 2000 tokens per agent). If it exceeds the budget, inference stops and the agent reports what it found so far.
- Timeouts: Each sub-agent has a wall-clock timeout (typically 30–60 seconds). If a task takes longer, it's killed and results so far are returned.
- Depth limits: Sub-agents can't spawn further sub-agents (no inception). This prevents combinatorial explosion and keeps resource usage predictable.
- Battery and thermal checks: BatteryGuard (MyBenAI's power manager) can pause or cancel sub-agent tasks if your battery drops below a threshold or your phone overheats. You see this in the UI: "Paused due to low battery."
These guardrails are transparent. You see the budget, timeout, and any resource blocks in the chat interface. If a task is paused, you're told why and when it'll resume.
Use Cases for Sub-Agents
Travel planning: Researching a multi-destination trip requires gathering info on flights, accommodations, attractions, and safety for each location. Sub-agents parallelize this gathering, then the main assistant creates an itinerary.
Job or school research: "Find 3 companies in X industry, research their leadership and recent news, then rank them by innovation." Sub-agents research each company in parallel; the main assistant ranks and summarizes.
Document analysis: "Review these 5 research papers on Y topic and extract the key findings." Sub-agents can each analyze one paper in parallel, then the main agent synthesizes the key insights.
Decision-making: "Should I switch jobs? Research this new role, compare it to my current salary and benefits, and factor in my career goals." Sub-agents gather role details, compensation data, and growth potential; the main agent weighs them.
Learning and study: A student studying for an exam asks: "Explain photosynthesis, compare it to cellular respiration, and give practice questions." Sub-agents research each topic; the main assistant creates a study guide.
Sub-Agents and Privacy
All sub-agent work happens on-device. If a sub-agent needs to fetch from the web (web search results, public APIs), that fetch happens under your privacy controls. You can set MyBenAI to "offline only" mode, in which case sub-agents are limited to local searches (your documents, local RAG, function calls).
Sub-agent interactions aren't logged to the cloud. Your chat, sub-agent research, and the final answer all stay in your local chat history. If you delete a chat, all sub-agent work is deleted too.
Stopping and Controlling Sub-Agents
The main chat interface shows sub-agent progress. You see a collapsible "Sub-agents" section that lists active agents and their current tasks. You can view the work in progress, and hit a "Stop" button to cancel all agents and move to synthesis immediately.
This is critical for avoiding the "waiting forever" problem. If a sub-agent is stuck or taking longer than expected, you can stop and move forward with partial results.
Practical Limits
On typical phones, MyBenAI spawns 2–4 sub-agents per request. More than that overwhelms the inference queue and battery. The model learns when to spawn agents vs. when to research sequentially. Over time, as the model gets better at task breakdown, spawning becomes more efficient.
Getting Started
Sub-agents are automatic in MyBenAI. When you ask a complex question that benefits from parallelization, the main assistant spawns sub-agents. You don't need to configure anything. If you prefer sequential research for a particular chat, you can disable sub-agents in settings.
Sub-agents transform your on-device AI from a single assistant into a research team. Start using MyBenAI's multi-agent system and tackle complex research faster. Learn how function calling powers agents, or explore how agents can research your personal documents in parallel. For a deeper look at on-device AI capabilities, check out our on-device AI overview.