Skip to content

Add Deep Agents Launch Intelligence cookbook (Perplexity Agent API)#68

Open
jliounis wants to merge 2 commits into
mainfrom
add-deep-agents-launch-intelligence
Open

Add Deep Agents Launch Intelligence cookbook (Perplexity Agent API)#68
jliounis wants to merge 2 commits into
mainfrom
add-deep-agents-launch-intelligence

Conversation

@jliounis
Copy link
Copy Markdown
Collaborator

@jliounis jliounis commented May 9, 2026

Description

Adds a new in-depth cookbook article under docs/articles/deep-agents-launch-intelligence/ showing how to build a multi-agent Product Launch Intelligence Agent with a Deep Agents-style planner/sub-agent/workpaper pattern powered entirely by the Perplexity Agent API.

The agent takes a product launch topic (for example, "NVIDIA Rubin GPU announcement" or "Apple Vision Pro 2") and produces a structured, citation-rich brief covering the official announcement, independent reception, competitive landscape, and execution risks. Four narrowly-scoped sub-agents — announcement-scout, reception-analyst, competitor-mapper, and risk-auditor — each make an Agent API call with preset="pro-search" and the built-in web_search and fetch_url tools. Their Markdown notes become workpapers (announcement.md, reception.md, competitors.md, and risks.md), then a final orchestrator Agent API call synthesizes final_report.md from those saved workpapers.

There is no Sonar chat-completions path, no sonar-pro model selection, no ChatPerplexity, no langchain-openai fallback, and no standalone Search API tool in this rewrite.

Type of Contribution

  • Article / Integration Guide

What's in the PR

File Purpose
docs/articles/deep-agents-launch-intelligence/README.mdx Full article: Agent API architecture, sub-agent/workpaper pattern, grounding rules, CLI/programmatic usage, troubleshooting, and adaptation notes
docs/articles/deep-agents-launch-intelligence/launch_intelligence_agent.py Runnable implementation: Agent API client, four sub-agent specs, workpaper handoff, orchestrator synthesis, CLI + streaming-style progress
docs/articles/deep-agents-launch-intelligence/requirements.txt Minimal dependency set: perplexityai>=0.6.0
README.md New navigation entry under "Integration Guides"

APIs / integrations used

  • Perplexity Agent API via client.responses.create for every model call.
  • Agent API built-in tools: web_search and fetch_url for the research sub-agents.
  • Deep Agents pattern: planner + narrowly scoped sub-agents + workpaper files + final synthesis from saved evidence.
  • Attribution header: X-Pplx-Integration: cookbook/deep-agents-launch-intelligence/0.1.0 is forwarded on Agent API calls through SDK default headers.

Citation / grounding rules baked in

  • Each sub-agent cites only URLs returned by Agent API tool-backed research.
  • The orchestrator runs without web tools and may only use the saved workpapers as evidence.
  • Numbers are attributed to a date and source; missing fields render as "not disclosed" rather than guesses.

Validation performed

  • node scripts/validate-mdx.js — ✅ all 40 MDX files valid.
  • python -m py_compile docs/articles/deep-agents-launch-intelligence/launch_intelligence_agent.py — ✅ compiles clean.
  • Module import smoke test — ✅ confirms sub-agent specs, DEFAULT_SUBAGENT_PRESET=pro-search, and attribution slug.
  • No secrets, no committed .env, no notebook outputs.

Checklist

  • Uses Perplexity Agent API only for model/research calls
  • Removes Sonar chat-completions / sonar-pro implementation path
  • Includes comprehensive documentation
  • MDX frontmatter is filled in
  • No API keys committed; environment-variable based setup
  • Linked from the root README.md for discoverability

Claude Agent and others added 2 commits May 9, 2026 09:05
…Search)

Adds a multi-agent cookbook under docs/articles/ that uses LangChain Deep
Agents for orchestration, the Perplexity Search API as the only external
tool, and the langchain-perplexity chat integration for the model.

The agent investigates a product launch and produces a citation-rich brief
covering the official announcement, independent reception, the competitive
landscape, and execution risks. Four narrowly-scoped sub-agents each write
notes to a virtual workpaper file; the orchestrator synthesizes the final
report from those workpapers so the brief is grounded in saved evidence
rather than the model's parametric memory.

Includes a runnable CLI (with a streaming progress mode for notebooks),
a programmatic entry point, and an mdx article walking through the
architecture, prompts, citation rules, observability, and how to adapt the
four-sub-agent scaffold to other intelligence scenarios.
Switches the cookbook to use only the Perplexity Agent API. Removes the
sonar-pro chat-completions framing, the langchain-perplexity / langchain-openai
dependencies, and the standalone Search API tool. Keeps the Deep Agents pattern
(planner + narrowly-scoped sub-agents + virtual workpaper filesystem) and
implements every stage as a client.responses.create call with the pro-search
preset and the built-in web_search + fetch_url tools.

- Sub-agents are Agent API calls with web_search + fetch_url enabled and write
  Markdown workpapers (announcement.md, reception.md, competitors.md, risks.md).
- Orchestrator is a final Agent API call with no tools that synthesizes the
  brief from the four workpapers.
- requirements.txt reduces to just perplexityai>=0.6.0.
- CLI swaps --model sonar-pro for --preset pro-search / --orchestrator-preset.
- X-Pplx-Integration cookbook attribution header preserved on every Agent API
  call via the SDK's default_headers hook.
@jliounis jliounis changed the title Add Deep Agents Launch Intelligence cookbook (LangChain + Perplexity Search) Add Deep Agents Launch Intelligence cookbook (Perplexity Agent API) May 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant