Skip to content

Repository files navigation

A comprehensive collection of practical examples, integration guides, and community showcases for building with Perplexity's Agent API — the new primary API for building hosted agents with native web access, citations, code execution, subagents, and durable, long-running work.

Agent API is now the primary Perplexity API. New projects should build on the Agent API. The Sonar API (/chat/completions) is deprecated — if you're on Sonar, see the migrate from Sonar guide to move to the Agent API.

📖 View the full cookbook →

What's Inside

🛠️ Examples

Ready-to-run applications demonstrating real-world use cases:

Community-built applications including:

  • News and finance apps
  • AI-powered search tools
  • Browser extensions
  • Educational platforms
  • And many more innovative projects

In-depth tutorials for advanced implementations:

  • Migrating from Sonar to the Agent API
  • Memory management patterns
  • OpenAI agents integration
  • Multi-modal implementations

Quick Start

  1. Browse the documentation to find examples that match your needs
  2. Clone this repository and navigate to any example directory
  3. Follow the setup instructions in each example's README
  4. Get your API key from Perplexity
  5. Build and customize for your specific use case

API Key Setup

All examples require a Perplexity API key:

export PPLX_API_KEY="your-api-key-here"

Get your API key at docs.perplexity.ai.

Contributing

Have a project built with the Agent API? We'd love to feature it!

Resources


This repository syncs to docs.perplexity.ai/cookbook on every commit.

About

A collection of projects and guides with Perplexity's API Platform

Resources

Contributing

Stars

198 stars

Watchers

6 watching

Forks

Releases

Packages

Used by

Contributors

Languages