AI Discovery Reports

New
Updated

The Discovery namespace gives you access to Chaos Labs' AI-generated research reports. These reports cover DeFi protocols, market trends, and asset analysis — updated continuously as conditions change.

In this guide you'll learn how to:

  • Browse and filter published reports
  • Read full report details with sources
  • Find reports about a specific asset
  • Send follow-up questions to dig deeper
[@portabletext/react] Unknown block type "callout", specify a component for it in the `components.types` prop

Browse Reports

Start by listing available reports. Results are paginated and can be filtered by tag.

browse-reports.ts
import { Chaos } from '@chaoslabs/ai-sdk';
 
const chaos = new Chaos({ apiKey: process.env.CHAOS_API_KEY! });
 
// List the latest reports
const { data: reports, total } = await chaos.discovery.list({
  page: 1,
  limit: 10,
});
 
console.log(`Found ${total} reports\n`);
for (const report of reports) {
  console.log(`📄 ${report.title}`);
  console.log(`   Tags: ${report.tags.join(', ')}`);
  console.log(`   Updated: ${report.updated_at}\n`);
}

Get Report Details

Fetch the full content of a report, including rendered content blocks, source links, and suggested follow-up questions.

report-details.ts
const reportId = reports[0].id;
const detail = await chaos.discovery.get(reportId);
 
console.log(`Title: ${detail.title}`);
console.log(`Description: ${detail.description}`);
console.log(`\nSources:`);
for (const src of detail.sources) {
  console.log(`  - ${src.title ?? src.url}`);
}
console.log(`\nSuggested follow-ups:`);
for (const q of detail.followup_questions) {
  console.log(`  → ${q}`);
}

Asset-Specific Reports

Filter reports by a specific asset to get targeted research.

asset-reports.ts
const { data: ethReports } = await chaos.discovery.byAsset('crypto', 'ethereum', {
  page: 1,
  limit: 5,
});
 
for (const report of ethReports) {
  console.log(`${report.title} (${report.tags.join(', ')})`);
}

Follow-Up Queries

Continue a research session by asking follow-up questions. This creates a new conversational session based on the report context.

follow-up.ts
const session = await chaos.discovery.followUp(reportId, {
  query: 'What are the main risks mentioned in this report?',
});
 
console.log(`Follow-up session: ${session.sessionId}`);
console.log(`Title: ${session.title}`);

Suggested Queries

Get curated query suggestions to help users explore available research.

suggested-queries.ts
const { reports: suggestions } = await chaos.discovery.suggestedQueries(5);
 
for (const s of suggestions) {
  console.log(`\n${s.title}:`);
  for (const q of s.suggested_user_queries) {
    console.log(`  • ${q.query}`);
  }
}
Was this helpful?