Mission System

Missions are Nestor's core capability: give an objective in natural language, and Nestor decomposes it into sub-agents that execute in parallel, cross-reference findings, iterate on quality, and deliver a structured report.

How It Works

User: "Do an OSINT investigation on John Smith"
  |
  v
[1] PLAN — LLM decomposes into 5-7 sub-objectives
  |         (entity disambiguation, profile harvest,
  |          professional footprint, social media, legal records,
  |          cross-reference, synthesize)
  v
[2] EXECUTE — Each sub-objective gets a specialized agent
  |           Agents share findings via Shared Finding Store
  |           Each agent has access to 28 tools
  v
[3] EVALUATE — LLM scores: completeness, accuracy, depth, relevance
  |            If quality < threshold: ITERATE (max 3x)
  v
[4] CROSS-REFERENCE — Detect contradictions, merge entities, build timeline
  v
[5] REPORT — Professional Markdown report with citations and confidence scores

Create a Mission

Via the Studio

Navigate to Missions in the sidebar, type your objective, and click Plan.

Via the Chat

In the chat, describe a complex task. Nestor will detect it needs a mission and offer to create one.

Via the CLI

npx nestor-sh shell
> /mission "Analyze the competitive landscape of AI agent frameworks in 2026"

Via the API

# Plan a mission
curl -X POST http://localhost:3100/api/missions/plan \
  -H "Content-Type: application/json" \
  -d '{"objective": "OSINT investigation on John Smith"}'

# Execute it
curl -X POST http://localhost:3100/api/missions/{id}/execute

# Get the report
curl http://localhost:3100/api/missions/{id}/report

Mission Types

TypeDescriptionExample
osintInvestigation and intelligence gathering"Investigate company X"
researchComparative analysis and market research"Compare top 5 RAG frameworks"
codeSoftware development and implementation"Build a REST API for task management"
auditSecurity and code quality audits"Security audit of this repository"
creationContent creation and writing"Write a technical blog post about X"
analysisData analysis and reporting"Analyze our website traffic patterns"

Smart Decomposition

Nestor doesn't just split tasks by category (which leads to redundant sub-objectives all doing the same web search). Instead, it decomposes by method:

Self-Improving Tools

If an agent needs a capability that doesn't exist (e.g., "query Crunchbase" or "search arxiv by author"), it can call nestor_build_tool to create a new tool on the fly. The tool is:

  1. Generated by the LLM (TypeScript code + input schema + test)
  2. Tested in a sandbox
  3. Persisted to disk and database
  4. Registered for immediate use and all future sessions

Evaluation and Iteration

After execution, a dedicated EvaluationEngine scores the results:

If the overall score is below the quality threshold (default 80%), Nestor automatically iterates with different strategies — up to 3 times. Each iteration targets the specific gaps identified.

Mission Templates

v3.4.0 introduces 5 built-in mission presets that provide optimized decomposition strategies:

TemplateSub-objectivesBest For
osint-person7 (disambiguation, profiles, professional, social, legal, cross-ref, synthesis)People investigation
osint-company6 (registration, leadership, financials, digital presence, reputation, synthesis)Company due diligence
code-audit5 (dependencies, OWASP, secrets, architecture, report)Security audits
market-research5 (landscape, competitors, features, pricing, synthesis)Competitive analysis
feature-build4 (design, implement, test, document)End-to-end development
# Use a mission template
npx nestor-sh shell
> /mission --template osint-person "John Smith, CEO of Acme Corp"

# Templates can be customized
> /mission --template code-audit --depth thorough

Backpressure Validators

New in v3.4.0, backpressure validators use tests as quality gates with progressive strictness. The --validate flag on loop commands ensures each iteration passes before proceeding:

# Loop with backpressure validation
npx nestor-sh loop --validate "Build a REST API for task management"

# How it works:
# Iteration 1: code the feature
# Iteration 2: run tests → 3/7 pass → iterate
# Iteration 3: fix failures → 6/7 pass → iterate
# Iteration 4: fix edge case → 7/7 pass → done

Progressive strictness means early iterations allow more failures, while later iterations demand higher pass rates. This prevents the agent from getting stuck on perfection too early.

Smart Iteration Strategies

When a mission needs improvement, Nestor selects from 5 strategies per cycle:

  1. Gap Fill — Identify missing sub-objectives and add them
  2. Deep Dive — Re-execute low-scoring sub-objectives with more tools
  3. Cross-Reference — Run additional verification across findings
  4. Alternative Sources — Retry with different search engines or data sources
  5. Synthesis Refinement — Improve the final report structure and citations

The strategy is selected automatically based on which evaluation dimension scored lowest.

Knowledge Graph

After a mission completes, findings are automatically ingested into the Knowledge Graph (Second Brain). Entities, relationships, and facts are extracted and stored. Future missions consult the KG before acting, so Nestor never re-researches what it already knows.

API Reference

MethodEndpointDescription
POST/api/missions/planCreate a mission plan from an objective
GET/api/missionsList all missions
GET/api/missions/search?q=Search missions by content
GET/api/missions/statsAggregate statistics
GET/api/missions/:idGet mission details
POST/api/missions/:id/executeExecute with SSE streaming
POST/api/missions/:id/iterateTrigger additional iteration
POST/api/missions/:id/resumeResume interrupted mission
GET/api/missions/:id/reportGet the final report
POST/api/missions/:id/cancelCancel a running mission