Skip to content

Latest commit

 

History

History
145 lines (100 loc) · 3.11 KB

File metadata and controls

145 lines (100 loc) · 3.11 KB

Adapt This Agent

Morning Signal is a GTM intelligence example, but the useful part is the agent pattern:

approved context -> live search -> structured extraction -> evidence packet -> grounded synthesis

Use this guide when turning the starter kit into another source-grounded agent.

1. Change The Domain Context

Start with the context a human should approve before retrieval begins.

For GTM intelligence, that context is:

  • company profile
  • products
  • competitors
  • ICP
  • target markets

For other domains, replace those fields with the decisions that shape search quality.

Examples:

  • Recruiting: role families, target companies, locations, seniority, hiring signals
  • Finance: tickers, filing types, watchlist companies, risk categories
  • Product: competitors, features, docs areas, release surfaces
  • Market research: category, geography, customer segments, trusted sources

2. Redesign The Search Lanes

Search lanes are the bridge between approved context and live web evidence.

In lib/agent.ts, adapt planQueries() so every query has:

  • a business purpose
  • a freshness expectation
  • a source type
  • a downstream section in the final report

Good lanes are narrow enough to retrieve useful evidence, but broad enough to surface new signals.

3. Keep Retrieval Separate From Synthesis

Avoid asking the LLM to "research this" directly. Keep the stages separate:

  1. Plan queries.
  2. Search the web.
  3. Extract selected URLs.
  4. Assemble evidence.
  5. Synthesize from the evidence packet.

That separation makes the agent easier to debug, evaluate, and trust.

4. Change The Output Schema

Update lib/types.ts for your new report structure, then update:

  • lib/llm.ts for synthesis instructions
  • app/page.tsx for rendering
  • any validation logic that checks sources or sections

Useful output sections usually answer:

  • What changed?
  • Why does it matter?
  • What evidence supports it?
  • What action should the user take?

5. Preserve Source Inspectability

Every important claim should keep a path back to source evidence.

At minimum, preserve:

  • title
  • URL
  • publisher or hostname
  • date if available
  • search snippet
  • extracted content

Do not add citations as decoration after synthesis. Pass sources through the data model from retrieval to final output.

Example Adaptations

Recruiting Signal Agent

Search lanes:

  • hiring pages for target companies
  • recent funding announcements
  • layoffs or team expansion news
  • role-specific job postings
  • executive announcements

Output:

  • top hiring signal
  • companies to contact
  • role demand trend
  • candidate sourcing angle
  • source-backed next steps

Competitor Pricing Monitor

Search lanes:

  • pricing pages
  • docs pages
  • changelogs
  • help center billing pages
  • comparison pages

Output:

  • pricing change detected
  • packaging implication
  • affected customer segment
  • sales response
  • source links

Docs Change Watcher

Search lanes:

  • docs sitemap
  • changelog
  • release notes
  • API reference pages
  • GitHub releases

Output:

  • changed surface
  • likely product implication
  • developer-facing message
  • affected competitors or partners
  • source links