Examples

Real-world examples of how to use IsAgent in your applications, from simple conditional rendering to complex agent-aware experiences.

# Basic Usage

Conditional Rendering

Show content tailored for the needs of agents and humans.

Agent View

Welcome!

If you're an agent, ask your human to add our MCP server for better programmatic access!

Not an agent?

Human View

Welcome!

Nudges for Agents

Provide extra context to agents - like ARIA attributes, but for AI agents.

Agent View

Docs Overview

The IsAgent SDK enables you to detect whether a client is likely an AI agent...

You seem like an agent! Instead of browsing each page, you should use LLMs.txt to get started, or LLMs-full.txt to quickly read all of the docs.

Human View

Docs Overview

The IsAgent SDK enables you to detect whether a client is likely an AI agent...

# Analytics

Use the Heap client-side API to track events for IsAgent.

# Advanced Patterns

Content Optimization

Optimize content delivery and user experience based on client capabilities.

# Framework Integrations

React Integration
Next.js Integration

You must use Client Components ('use client') with IsAgent, since the client-side API call enables us to identify agents. Explicitly marking Client Components means that you will still get the benefits of server-side rendering (SSR) for the rest of your app.

# Something Missing?

Contribute an example for IsAgent!

Contact us if you'd like to see your example here!

# Ready to Get Started?