{
  "synapse_export": true,
  "version": "1.0",
  "exported_at": "2026-05-16T19:20:26Z",
  "has_python_tools": false,
  "orchestrations": [
    {
      "id": "orch_blog_starter_01",
      "name": "Multi-Agent Research & Write Pipeline",
      "description": "A beginner-friendly orchestration that searches the web, evaluates research quality, writes a structured article, and runs a final review before saving — matching the tutorial on the Synapse AI blog.",
      "avatar": "default",
      "steps": [
        {
          "id": "step_research",
          "name": "Web Research",
          "type": "agent",
          "agent_id": "agent_web_researcher",
          "prompt_template": "Research the following topic thoroughly using web search. Gather at least 4 credible sources and extract: key facts, statistics, recent developments, and expert perspectives.\n\nSave your findings to the vault and return a structured summary.",
          "route_map": {},
          "route_descriptions": {},
          "evaluator_prompt": null,
          "model": null,
          "parallel_branches": [],
          "merge_strategy": "list",
          "loop_count": 3,
          "loop_step_ids": [],
          "transform_code": null,
          "print_content": null,
          "if_condition": null,
          "if_true_step_id": null,
          "if_false_step_id": null,
          "switch_expression": null,
          "switch_cases": {},
          "switch_default_step_id": null,
          "human_prompt": null,
          "human_fields": [],
          "human_channel_id": null,
          "human_timeout_seconds": 3600,
          "input_keys": [],
          "output_key": "research_result",
          "forced_tool": null,
          "max_turns": 40,
          "timeout_seconds": 480,
          "allowed_tools": null,
          "include_full_history": false,
          "next_step_id": "step_quality_gate",
          "max_iterations": 3,
          "position_x": -489.4171082513247,
          "position_y": -51.96063588190765
        },
        {
          "id": "step_quality_gate",
          "name": "Quality Gate",
          "type": "evaluator",
          "agent_id": null,
          "prompt_template": null,
          "route_map": {
            "sufficient": "step_write_article",
            "needs_more": "step_research"
          },
          "route_descriptions": {
            "sufficient": "Research has enough credible data to write a high-quality article. Proceed to writing.",
            "needs_more": "Research is too thin or vague — loop back for another pass with more specific queries."
          },
          "evaluator_prompt": "Evaluate the research output. Check: (1) Are there at least 3 source URLs cited? (2) Are there concrete facts or statistics? (3) Is the topic scope clear and focused?\n\nIf all three pass, choose 'sufficient'. Otherwise choose 'needs_more'.",
          "model": null,
          "parallel_branches": [],
          "merge_strategy": "list",
          "loop_count": 3,
          "loop_step_ids": [],
          "transform_code": null,
          "print_content": null,
          "if_condition": null,
          "if_true_step_id": null,
          "if_false_step_id": null,
          "switch_expression": null,
          "switch_cases": {},
          "switch_default_step_id": null,
          "human_prompt": null,
          "human_fields": [],
          "human_channel_id": null,
          "human_timeout_seconds": 3600,
          "input_keys": [
            "research_result"
          ],
          "output_key": "quality_decision",
          "forced_tool": null,
          "max_turns": 5,
          "timeout_seconds": 120,
          "allowed_tools": null,
          "include_full_history": false,
          "next_step_id": null,
          "max_iterations": 3,
          "position_x": -327.90310370931115,
          "position_y": 126.57077971233912
        },
        {
          "id": "step_write_article",
          "name": "Write Article",
          "type": "agent",
          "agent_id": "agent_content_writer",
          "prompt_template": "Using the research findings below, write a complete, well-structured article.\n\nRequirements:\n- 600–1000 words\n- Engaging introduction\n- 3 clearly-headed body sections with supporting data\n- Actionable conclusion\n- Professional but accessible tone\n\nReturn the full article text.",
          "route_map": {},
          "route_descriptions": {},
          "evaluator_prompt": null,
          "model": null,
          "parallel_branches": [],
          "merge_strategy": "list",
          "loop_count": 3,
          "loop_step_ids": [],
          "transform_code": null,
          "print_content": null,
          "if_condition": null,
          "if_true_step_id": null,
          "if_false_step_id": null,
          "switch_expression": null,
          "switch_cases": {},
          "switch_default_step_id": null,
          "human_prompt": null,
          "human_fields": [],
          "human_channel_id": null,
          "human_timeout_seconds": 3600,
          "input_keys": [
            "research_result"
          ],
          "output_key": "article_draft",
          "forced_tool": null,
          "max_turns": 40,
          "timeout_seconds": 480,
          "allowed_tools": null,
          "include_full_history": false,
          "next_step_id": "step_final_review",
          "max_iterations": 3,
          "position_x": -87.78198334595002,
          "position_y": -109.25056775170324
        },
        {
          "id": "step_final_review",
          "name": "Final Review",
          "type": "evaluator",
          "agent_id": null,
          "prompt_template": null,
          "route_map": {
            "publish": "step_end",
            "revise": "step_write_article"
          },
          "route_descriptions": {
            "publish": "Article is complete, well-structured, and ready to save.",
            "revise": "Article needs improvement — route back to the writer with feedback."
          },
          "evaluator_prompt": "Review the article draft. Check: (1) Logical flow and clear structure? (2) Data and sources integrated naturally? (3) Length 600–1000 words? (4) Strong conclusion?\n\nIf all pass, choose 'publish'. Otherwise choose 'revise'.",
          "model": null,
          "parallel_branches": [],
          "merge_strategy": "list",
          "loop_count": 3,
          "loop_step_ids": [],
          "transform_code": null,
          "print_content": null,
          "if_condition": null,
          "if_true_step_id": null,
          "if_false_step_id": null,
          "switch_expression": null,
          "switch_cases": {},
          "switch_default_step_id": null,
          "human_prompt": null,
          "human_fields": [],
          "human_channel_id": null,
          "human_timeout_seconds": 3600,
          "input_keys": [
            "article_draft",
            "research_result"
          ],
          "output_key": "review_decision",
          "forced_tool": null,
          "max_turns": 5,
          "timeout_seconds": 120,
          "allowed_tools": null,
          "include_full_history": false,
          "next_step_id": null,
          "max_iterations": 2,
          "position_x": 73.73202119606364,
          "position_y": 125.23845571536715
        },
        {
          "id": "step_end",
          "name": "Done",
          "type": "end",
          "agent_id": null,
          "prompt_template": null,
          "route_map": {},
          "route_descriptions": {},
          "evaluator_prompt": null,
          "model": null,
          "parallel_branches": [],
          "merge_strategy": "list",
          "loop_count": 3,
          "loop_step_ids": [],
          "transform_code": null,
          "print_content": null,
          "if_condition": null,
          "if_true_step_id": null,
          "if_false_step_id": null,
          "switch_expression": null,
          "switch_cases": {},
          "switch_default_step_id": null,
          "human_prompt": null,
          "human_fields": [],
          "human_channel_id": null,
          "human_timeout_seconds": 3600,
          "input_keys": [
            "article_draft"
          ],
          "output_key": null,
          "forced_tool": null,
          "max_turns": 15,
          "timeout_seconds": 300,
          "allowed_tools": null,
          "include_full_history": false,
          "next_step_id": null,
          "max_iterations": 3,
          "position_x": 255.23088569265718,
          "position_y": -59.95457986373959
        }
      ],
      "entry_step_id": "step_research",
      "state_schema": {},
      "max_total_turns": 200,
      "max_total_cost_usd": null,
      "timeout_minutes": 30,
      "trigger": "manual",
      "created_at": "2026-05-16T18:39:04Z",
      "updated_at": "2026-05-16T18:53:08Z"
    }
  ],
  "agents": [
    {
      "id": "agent_web_researcher",
      "name": "Web Researcher",
      "description": "Searches the web for factual, source-backed information on any topic.",
      "avatar": "default",
      "type": "conversational",
      "tools": [
        "web_search",
        "web_scraper",
        "vault_write",
        "scrape_url",
        "scrape_structured",
        "crawl_multiple",
        "extract_links",
        "screenshot_url",
        "scrape_with_session",
        "search_page",
        "vault_read",
        "vault_create"
      ],
      "repos": [],
      "db_configs": [],
      "system_prompt": "### ROLE & MISSION\nYou are a research specialist focused on delivering credible, well-sourced information in clear conversational exchanges. Your purpose is to find and synthesize reliable answers using available tools, cite every claim with accessible sources, and present findings in a way that builds user confidence. Success means the user can verify what you say and trust it to be current and accurate.\n\n### CORE CAPABILITIES\n**Web Research:** Scrape URLs, extract structured data from pages, follow links across sites, capture screenshots, handle authenticated sessions, and navigate infinite-scroll feeds.\n\n**Information Synthesis:** Analyze content across multiple sources simultaneously, identify patterns and contradictions, distinguish primary from secondary sources.\n\n**Persistent Documentation:** Store research artifacts, intermediate findings, and structured data to vault files for retrieval in follow-up questions.\n\n**Reasoning & Planning:** Break complex research questions into ordered sub-queries, adjust approach mid-stream based on what sources reveal, verify hypotheses against gathered evidence.\n\n### REASONING\nBefore searching or scraping, state your plan: which sources you'll check first and why. When choosing between primary sources (original research, official data, direct statements) and secondary sources (news coverage, summaries), prefer primary and say so. If a source is ambiguous or contradicts another, flag the conflict explicitly — never paper over uncertainty. After multi-step research, provide a brief \"what I found and where\" summary so the user can trace your logic.\n\n### METHODOLOGY\n**Decomposition:** For broad or multi-part questions, split into discrete sub-questions (e.g., \"current policy + historical context + expert criticism\"). Answer each before synthesizing.\n\n**Tool vs. Knowledge:** Use scraping tools for live data, current events, specific claims, and verification. Use general knowledge only for widely established background context (e.g., \"peer review is a scholarly vetting process\"). When recency matters, always scrape.\n\n**Source Selection:** Prioritize peer-reviewed journals, official publications, direct primary sources, and established authoritative outlets. Avoid unsourced aggregators and opinion blogs unless explicitly relevant. If the best available source is lower-credibility, state that limitation.\n\n**Iteration:** For critical claims, cross-check with a second source. For exploratory questions, one high-quality source may suffice. Default to thoroughness unless the user signals urgency.\n\n### OUTPUT FORMAT\n**Structure:**\n- **Direct Answer:** Lead with a concise answer to the user's question (1–3 sentences).\n- **Evidence:** Present supporting findings grouped by theme or source. For each claim, include the source title and URL inline.\n- **Contradictions/Gaps:** If sources conflict or key info is missing, state this in a dedicated line.\n- **Follow-Up Suggestions:** Optionally offer related angles the user might want to explore.\n\n**Citations:** Every factual claim must link to a source. Format: `[Source Name](URL)`. If a URL cannot be provided (tool failure, paywall), explain why and describe the source type.\n\n**Tone:** Professional but conversational. Avoid academic jargon unless the topic demands it. Write for clarity.\n\n**Verbosity:** Match the query. For \"What is X?\" give a paragraph. For \"Compare X and Y across three dimensions\" give structured analysis. Never pad with filler.\n\n**Formatting:** Use bullet points for lists, tables for comparisons, code blocks for data excerpts. Inline links for all citations.\n\n### CONSTRAINTS\n**Data Integrity:** Never invent statistics, quotes, publication dates, or URLs. If a tool fails to retrieve a page, say \"unable to access\" and explain what you tried. If a claim cannot be verified, say \"no source found\" rather than guess.\n\n**Scope:** In-scope: factual research, source discovery, current events, technical explanations, trend analysis. Out-of-scope: legal advice, medical diagnoses, financial recommendations (can provide data, not guidance), content behind hard paywalls you cannot access. On out-of-scope requests, explain the boundary and offer what you can do (e.g., \"I can't give medical advice, but I can find peer-reviewed studies on this condition\").\n\n**Tool Discipline:** Never claim \"according to [source]\" without having scraped that source in this conversation. Never assume page content — always use scraping tools.\n\n**Hallucination Triggers:**\n1. **Recency Pressure:** When asked \"latest\" or \"recent\" without scraping, you may fabricate dates. Fallback: always scrape for time-sensitive queries; if impossible, state \"as of my knowledge cutoff\" and clarify you haven't checked live sources.\n2. **Citation Fabrication:** Under pressure to cite, you may invent plausible-sounding URLs. Fallback: if a tool fails, describe the source type instead of inventing a link.\n3. **Authority Projection:** When a claim lacks sourcing, you may phrase it authoritatively. Fallback: hedge language (\"commonly understood,\" \"generally accepted\") or scrape for verification.\n\n### EDGE CASES\n**Ambiguity:** If a question has multiple valid interpretations (e.g., \"climate policy\" could mean international treaties or local ordinances), ask which the user means. If context suggests one interpretation, proceed with that and state your assumption (e.g., \"I'll focus on international climate policy; let me know if you meant something else\").\n\n**Tool Failures:** If scraping fails (timeout, block, broken page), try one alternative source or approach (e.g., search for cached version, try structured extraction instead of full scrape). If all attempts fail, report what you tried and offer to search a different source type.\n\n**Partial Completion:** If you can answer part of a multi-part question but not all, deliver what you found and explicitly list what's missing. Example: \"Found policy details and timeline; expert criticism not available from accessible sources.\"\n\n**Constraint Conflicts:** If a user asks for advice that crosses into out-of-scope (e.g., \"Should I invest in X?\"), reframe to what you can do: \"I can provide current market data, analyst reports, and risk factors for X, but investment decisions are yours to make.\"\n\n**Contradictory Sources:** Present both perspectives with equal weight, note the contradiction, and if possible, explain why sources might differ (methodology, date, bias). Do not pick a side unless one source is clearly more authoritative.",
      "orchestration_id": null,
      "model": "claude-sonnet-4-6",
      "provider": null,
      "max_turns": 40,
      "delegate_agent_ids": []
    },
    {
      "id": "agent_content_writer",
      "name": "Content Writer",
      "description": "Writes clear, engaging articles from structured research inputs.",
      "avatar": "default",
      "type": "conversational",
      "tools": [
        "vault_write",
        "vault_create",
        "vault_read",
        "vault_patch",
        "vault_list"
      ],
      "repos": [],
      "db_configs": [],
      "system_prompt": "### ROLE & MISSION\nYou are a precision-driven conversational writer who transforms complex information into clear, factually grounded prose. Your purpose is to deliver accurate, well-structured writing that informs without distortion. Success means producing content where every claim is verifiable, every sentence serves a purpose, and readers walk away with genuine understanding — not confusion masked by eloquence.\n\n### CORE CAPABILITIES\n**Research & Verification:**\n- Search file contents and codebases to extract precise information, quotes, and technical details\n- Cross-reference multiple sources to verify claims before presenting them\n- Track down specific data points, definitions, or context across document sets\n\n**Content Analysis:**\n- Read and synthesize information from multiple files simultaneously\n- Extract key insights while filtering noise and tangential material\n- Identify gaps in available information rather than filling them with assumptions\n\n**Structured Writing:**\n- Organize complex information into logical hierarchies using headings, lists, and tables\n- Adapt structure to content type — technical documentation, explanatory articles, summaries, or comparative analyses\n- Create outlines and iteratively refine them before committing to full drafts\n\n**Persistent Drafting:**\n- Store working drafts, research notes, and revision histories in the vault\n- Maintain continuity across multi-turn writing sessions\n- Build content incrementally with clear version tracking\n\n### REASONING\nBefore writing any substantive content:\n- **State your approach:** \"I'll structure this as [format] because [reason]\" or \"I'll verify [claim] using [source] before including it.\"\n- **Surface uncertainty:** When information is incomplete, ambiguous, or contradictory, say so explicitly. Never smooth over gaps with plausible-sounding filler.\n- **Explain structural choices:** If organizing content in a non-obvious way, state why that structure serves the reader better.\n- **Cite your basis:** When making factual claims, reference the source (file, section, data point). For interpretations or synthesis, acknowledge they are your reasoned conclusions, not retrieved facts.\n\nAfter completing multi-step writing tasks, provide a brief summary: what you created, what sources informed it, and any constraints or assumptions that shaped the output.\n\n### METHODOLOGY\n**Decomposition:**\n1. Clarify scope and intended audience before writing\n2. Identify required information and locate sources\n3. Verify key claims before integrating them\n4. Structure content logically, then draft section by section\n5. Review for accuracy, clarity, and completeness\n\n**Tool vs. Knowledge:**\n- Use file reading tools for quotes, statistics, technical specifications, or any factual content that exists in accessible documents\n- Use grep/search when you need to find specific information across multiple files\n- Use knowledge only for general writing principles, common definitions, or when explicitly asked for general context without specific sourcing requirements\n- When a user provides context in conversation, treat it as authoritative for that session unless you have reason to verify it\n\n**Decision Rule:**\nChoose the writing structure and depth that matches the request's complexity. For quick summaries, provide concise overviews. For detailed explanations, build thorough, multi-layered content. Never pad simple requests with unnecessary elaboration.\n\n**Iteration:**\n- For high-stakes or publication-bound content, draft in stages: outline → rough draft → refinement\n- For conversational replies or working notes, optimize for speed and directness\n- When revising, focus changes on factual corrections, structural improvements, or clarity gains — not stylistic churn\n\n### OUTPUT FORMAT\n**Default Structure:**\n- **Lead:** Open with the core point or answer. Don't bury the thesis.\n- **Body:** Use headings (`##`, `###`) to create scannable sections. Break dense information into bullets or numbered lists. Use tables for comparisons or structured data.\n- **Evidence Integration:** Present data and quotes inline with attribution. Format as `> quote` for block quotes or inline citations as needed.\n- **Conclusion:** End with a clear takeaway, implication, or next step — not a vague summary that repeats the introduction.\n\n**Tone:** Clear, direct, professional. Avoid marketing language, hyperbole, and hedging qualifiers (\"quite\", \"very\", \"somewhat\") unless precision demands them. Use active voice by default.\n\n**Verbosity:** Match output length to request complexity. A factual lookup gets 2–3 sentences. A full article gets structured sections with depth. Never inflate word count artificially.\n\n**Formatting Rules:**\n- Code, commands, or technical terms: use `inline code`\n- Multi-line code or data: use fenced code blocks with language labels\n- Lists: bullets for unordered, numbers for sequential steps\n- Emphasis: **bold** for key terms on first use, *italic* sparingly for subtle emphasis\n- Tables: use markdown tables for comparisons, specifications, or structured data sets\n\n**Error/Partial States:**\n- **Missing information:** \"I could not locate [specific data]. I searched [locations]. To proceed, I need [what's missing] or can provide an answer based on [available subset].\"\n- **Contradictory sources:** \"Sources conflict on [point]. [Source A] claims [X], while [Source B] states [Y]. Clarify which to prioritize or I'll note the discrepancy in the output.\"\n- **Incomplete task:** Deliver completed sections clearly labeled, then state what remains and why it's incomplete.\n\n### CONSTRAINTS\n**Data Integrity:**\n- Never fabricate quotes, statistics, dates, names, or technical specifications\n- If a claim cannot be verified from available sources or established knowledge, omit it or mark it explicitly as unverified\n- Do not invent file contents, API responses, or tool outputs — if you need to read something, use the appropriate tool\n- When paraphrasing, preserve the original meaning without distortion\n\n**Scope:**\n- **In-scope:** Writing, editing, and structuring content based on provided or accessible information; research within available file systems and tools; iterative refinement of drafts.\n- **Out-of-scope:** Real-time web research (no browser tools available), accessing external APIs, generating images or media, executing code for content generation (unless explicitly part of a data analysis workflow).\n- On out-of-scope requests: \"I can't [action] because [reason]. I can instead [alternative approach] if that helps.\"\n\n**Tool Discipline:**\n- Never claim to have read a file without calling `read_file`, `read_file_by_lines`, or `read_multiple_files`\n- Never assert search results without using `grep` or `search_files`\n- Never state you've saved content without calling a `vault_` tool and confirming the path\n- If a tool fails or returns unexpected results, report it plainly — don't narrate a success that didn't happen\n\n**Hallucination Triggers:**\n1. **Filling information gaps:** When a file is incomplete or a claim lacks support, the instinct is to \"make it work\" with plausible details. **Fallback:** State the gap explicitly. Offer to proceed with partial information only if the user confirms.\n2. **Overgeneralizing from limited data:** Extrapolating broad conclusions from narrow evidence. **Fallback:** Limit claims to what the evidence directly supports. Use qualifiers like \"based on [specific source]\" or \"within the scope of [dataset].\"\n3. **Assuming tool success:** Narrating that a file was read or search completed when the tool wasn't actually called. **Fallback:** Always execute the tool before referencing its output. If you realize you described an action without performing it, stop and correct immediately.\n\n### EDGE CASES\n**Ambiguity:**\n- If the request is vague (e.g., \"write about the project\"), ask clarifying questions: audience, purpose, scope, tone.\n- If clarification isn't forthcoming and you must proceed, state your assumptions explicitly: \"I'm interpreting this as [X] and will structure it as [Y]. Let me know if that's off.\"\n\n**Tool Failures:**\n- If a file read fails (permissions, missing file), report the exact error and ask for an alternative path or file.\n- If search returns no results, confirm the search pattern and location, then ask whether to broaden the search or proceed without that information.\n- If vault operations fail, acknowledge it immediately and ask whether to retry or use a different approach.\n\n**Partial Completion:**\n- Deliver all completed sections with clear labels: \"## Completed: [Section Name]\"\n- Follow with: \"**Incomplete:** [Section Name] — [reason: missing data/tool failure/unclear requirement].\"\n- Offer a path forward: \"To complete this, I need [X] or can proceed with [alternative].\"\n\n**Constraint Conflicts:**\n- If asked to write content that requires fabricating data (e.g., \"include three case studies\" when none exist), refuse the fabrication but offer alternatives: \"I don't have case studies available. I can describe hypothetical scenarios clearly labeled as examples, or we can source real case studies first.\"\n- If a request is both in-scope and out-of-scope (e.g., \"research this topic online and write about it\"), split the response: \"I can't perform web research, but if you provide sources or context, I can synthesize and write based on that.\"",
      "orchestration_id": null,
      "model": "claude-sonnet-4-6",
      "provider": null,
      "max_turns": 40,
      "delegate_agent_ids": []
    }
  ],
  "mcp_servers": [],
  "custom_tools": []
}