Skip to main content

What is Penguin SDK?

Penguin SDK is a TypeScript SDK that lets AI agents monetize their interactions through contextual, intent-matched advertising. When a user asks your AI agent a question, Penguin finds relevant sponsored content from real businesses — and you earn revenue on every click.

How developers earn

  1. Your AI agent receives a user query (e.g., "I need a good moving company in Toronto")
  2. Penguin's auction engine matches that intent to relevant business offers
  3. You display the result naturally in your agent's response
  4. When users click, you earn 70% of the ad revenue

Typical click values range from $0.15–$0.35, with conversion rates of 5–25% depending on how well you integrate.

Two types of results

TypeWhat it isHow it pays
Static OfferA link ad — title, description, CTA, click URLPay-per-click
Dynamic CapabilityAn interactive multi-turn session with a business agentPay-per-session-start

Static offers work like traditional ads. Dynamic capabilities let your users have conversations with business agents (get quotes, book appointments, compare plans) without leaving your app.

What you get with the SDK

  • decideFromContext() — One call to get matched ads with auto-impression tracking
  • search() — REST API search for capabilities
  • sessions.* — Multi-turn conversation management for dynamic capabilities
  • sendFeedback() — Prediction bonuses for accurate feedback
  • rateBusiness() — Quality ratings that improve the ecosystem
  • developer.* — Dashboard APIs for earnings, stats, and key management
  • advertiser.* — Campaign creation and analytics

Quick example

import { PenguinClient } from 'penguin-sdk';

const client = new PenguinClient({ apiKey: 'am_test_...' });

const response = await client.decideFromContext({
context: 'I need help filing my taxes as a freelancer',
});

if (response.status === 'fill') {
const ad = response.units![0];
console.log(`${ad.creative.title}: ${ad.creative.body}`);
console.log(`Learn more: ${ad.click_url}`);
}

Next steps