Skip to content

docs(articles): VC investment memo agent with LangGraph + Perplexity Agent API#74

Closed
rbuchmayer-pplx wants to merge 4 commits into
perplexityai:mainfrom
rbuchmayer-pplx:add-langchain-vc-memo-agent
Closed

docs(articles): VC investment memo agent with LangGraph + Perplexity Agent API#74
rbuchmayer-pplx wants to merge 4 commits into
perplexityai:mainfrom
rbuchmayer-pplx:add-langchain-vc-memo-agent

Conversation

@rbuchmayer-pplx

@rbuchmayer-pplx rbuchmayer-pplx commented Jun 4, 2026

Copy link
Copy Markdown

Description

Adds an Articles integration guide: an auditable VC investment-memo agent built with LangGraph + the Perplexity Agent API (built-in web_search / finance_search), plus a LangSmith eval harness that compares search providers. Self-contained runnable code under scripts/memo/.

The design highlight: four research nodes fan out in parallel, and a tool-less synthesizer can only cite evidence the research nodes gathered — a structural guard against fabricated citations, fully auditable in LangSmith.

Type of Contribution

  • Article/Integration Guide

Checklist

  • My code follows the cookbook's style guidelines
  • I have included comprehensive documentation
  • I have tested my code and it works as expected
  • I have included all necessary dependencies and setup instructions
  • My MDX file includes proper frontmatter (title, description, keywords)
  • I have linked to any external repositories or live demos

Project Details

What problem does this solve?
A first-pass VC memo takes an analyst 4–8 hours across Crunchbase, PitchBook, IR pages, and news, with every number hand-checked. This agent produces a seven-section, primary-source-cited memo in ~90s for ~$0.40.

What makes this contribution valuable to other developers?
It demonstrates the Agent API's built-in tools end-to-end, a reusable reliability pattern (split search from synthesis → auditable citation chain), and a LangSmith workflow for turning "which search provider?" into a measured decision.

External Links (if applicable):

  • Companion blog post: forthcoming on the LangChain blog

Testing

Ran the agent end-to-end (python -m memo --company "Anthropic") and the LangSmith comparison across 10 companies on openai/gpt-5.5. MDX validated with scripts/validate-mdx.js (all files pass).

Additional Notes

Companion to an upcoming Perplexity × LangChain blog post; the article URL is referenced there, so this is ready for review and merge.

Recent updates:

  • langchain-perplexity 1.4.0 shipped client-side tool calling (langchain-ai/langchain#37934), so the provider comparison now uses the standard bind_tools API and the temporary _compat.py shim is gone.
  • README aligned with the shipped code and the blog's voice.

Note on CI: the mdx-validation red X is the workflow failing at setup (org policy requires SHA-pinned actions; pr-validation.yml on main uses @v6 tags), so it fails for every PR in this repo. All three of its checks pass locally on this branch: scripts/validate-mdx.js (42/42 valid), no localhost links, frontmatter present.

@rbuchmayer-pplx rbuchmayer-pplx marked this pull request as ready for review June 10, 2026 20:27
An auditable, citation-grounded VC research agent built with LangGraph and
the Perplexity Agent API (built-in web_search/finance_search), plus a
LangSmith eval harness comparing search providers. Self-contained code
under scripts/memo/.
…tool-loop shim

The client-side tool round-trip shipped upstream in langchain-ai/langchain#37934
(langchain-perplexity 1.4.0), so the _compat.py shim is no longer needed.
Section 2 now binds search tools with the standard bind_tools API, and the
Perplexity tool gets an explicit parameter schema so model tool calls stay
well-formed.
- build_graph() snippet now matches scripts/memo/graph.py
- synthesizer section states the 7-sections-from-4-nodes citation model
  (sections 1-6 cite, Thesis is analysis-only)
- results paragraph states the run's numbers and invites re-scoring
- rename Code explanation -> Directory structure, trim keywords
- no em dashes; feature/limitation bullets use the blog's bolded-lead style
- synthesizer, wiring, and limitations wording now identical to the blog
- remove undefined 'Section 2' references (notebook-speak); say
  'provider comparison'
- add the blog's source-availability limitation for parity
@rbuchmayer-pplx rbuchmayer-pplx force-pushed the add-langchain-vc-memo-agent branch from 8b7c917 to 0f97f0c Compare June 10, 2026 20:38
@rbuchmayer-pplx

Copy link
Copy Markdown
Author

Closing in favor of ppl-ai/api-docs#451 — per discussion with Albert, new cookbook content goes directly into the api-docs repo (docs/cookbook/). Same content, adapted to api-docs conventions.

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