| composition | {"steps":[{"id":"intake","kind":"llm_chat","with":{"system":"You parse lead research requests and avoid inventing private contact data.","task":"Parse the lead research contract.\n\nRequest:\n{{ inputs.user_message | xml_escape | truncate(2500) }}\n\nReturn exactly:\nTARGETS:\n - <company/person/domain>\nSALES_GOAL: <meeting|proposal|partnership|renewal|unknown>\nPRODUCT_CONTEXT: <brief or unknown>\nREGION: <region or unknown>\nNEEDS_CLARIFICATION: <yes|no>\nMISSING_FIELDS:\n - <target|sales_goal|none>\n"}},{"id":"clarify","kind":"user_input","depends_on":["intake"],"when":"'NEEDS_CLARIFICATION: yes' in outputs.intake","clarify":{"mode":"form","intro":"销售调研需要目标公司/联系人和拜访目的。","nl_extract":true,"fields":[{"name":"target","type":"string","required":true,"prompt":"目标公司/联系人 / Target","max_chars":240},{"name":"sales_goal","type":"string","prompt":"销售目标 / Sales goal","max_chars":240}],"cancel_keywords":["取消","算了","cancel","stop"],"timeout_hours":24}},{"id":"web_search","kind":"skill_exec","skill":"multi-search-engine","depends_on":["intake","clarify"],"with":{"query":"{{ outputs.intake | truncate(320) }} company news hiring funding product leadership competitors","engines":["duckduckgo","brave"],"max_results":20}},{"id":"source_review","kind":"agent","skill":"sub-agent","depends_on":["web_search"],"with":{"task":"Review the public-source lead evidence. Do not scrape login-gated\nsites or infer private personal data. Summarize official site,\nnews, hiring signals, product clues, pain hypotheses, and weak data.\n\nIntake:\n{{ outputs.intake | truncate(1000) }}\nSearch:\n{{ outputs.web_search | truncate(8000) }}\n"}},{"id":"outreach_drafts","kind":"llm_chat","depends_on":["source_review"],"with":{"system":"You write respectful, source-grounded B2B outreach drafts.","task":"Draft:\n- 3 personalized email options\n- 1 LinkedIn/message variant\n- discovery-call questions\n- objections and responses\n- CRM notes\n\nSource review:\n{{ outputs.source_review | truncate(7000) }}\n"}},{"id":"lead_brief","kind":"llm_chat","depends_on":["source_review","outreach_drafts"],"with":{"system":"You assemble sales account briefs with evidence and caveats.","task":"Return:\n- account snapshot\n- trigger events\n- pain hypotheses\n- stakeholder map if public evidence supports it\n- outreach drafts\n- discovery questions\n- do-not-claim list\n- source links\n\nReview:\n{{ outputs.source_review | truncate(6000) }}\nDrafts:\n{{ outputs.outreach_drafts | truncate(5000) }}\n"}}]} |