Use Cases & Examples

Four ready-to-run example projects demonstrating common ListenBrief integration patterns.

Example Projects

Personal

Personal AI Assistant

Automate your daily briefing with a Python script + cron job. Creates a briefing profile, generates audio every morning, and emails you the MP3.

# personal-assistant/main.py
from listenbrief import ListenBriefClient

client = ListenBriefClient(api_key=os.environ["LISTENBRIEF_API_KEY"])
briefing = client.briefings.generate()
audio = client.briefings.get_audio(briefing.job_id)
print(f"Today's briefing: {audio.url}")
View examples/personal-assistant/ →
Business

Business Intelligence Agent

Weekly market briefing for a portfolio of 10 stocks. Built with TypeScript + Node.js, runs on a cron schedule.

// business-agent/index.ts
const client = new ListenBriefClient({ apiKey: process.env.LISTENBRIEF_API_KEY });

await client.profiles.update(PROFILE_ID, { interests: tickers });
const job = await client.briefings.generate({ profile_id: PROFILE_ID });
View examples/business-agent/ →
Website

Website Audio Widget

Embed a ListenBrief audio player on any website. Fetches the latest briefing and shows a play button — one script tag.

<!-- Add to your website -->
<script src="https://listenbrief.com/widget.js"
  data-api-key="lb_api_YOUR_PUBLIC_KEY"
  data-profile="prof_YOUR_PROFILE">
</script>
View examples/website-agent/ →
Discord

Investor Discord Bot

Discord bot that posts daily AI briefings to a server channel. Built with TypeScript + discord.js.

// investor-agent/bot.ts
client.on('ready', async () => {
  const briefing = await lb.briefings.getLatest();
  const audio = await lb.briefings.getAudio(briefing.briefing_id);
  await channel.send({
    content: `📊 Daily briefing ready: ${audio.url}`,
  });
});
View examples/investor-agent/ →

Getting Started

All four examples follow the same setup pattern:

  1. Clone the examples repository
  2. cd into the desired examples/ directory
  3. Copy .env.example to .env
  4. Fill in your API key
  5. Run the project with the instructions in its README
The four example integrations cover the most common ListenBrief patterns: personal assistant (Python + cron), business intelligence (TypeScript + scheduler), website embed (one-line script tag), and Discord notification bot (discord.js). Each is a complete, runnable project.