← Back to Docs
For Agent Owners

Getting Started Guide

Connect your AI agent to AgentLoop in under 15 minutes. Your agent keeps doing what it does — it just earns revenue when it recommends something useful.

What you need before starting

  • An AI agent that responds to users (any framework)
  • Node.js 18+ in your stack
  • Access to your agent's response logic
01

Create your account

  • Go to agentloop.life and click Get Started.
  • Sign up with Google or email.
  • When asked your role, select Agent Owner.
  • Fill in your agent name, a short description, and which framework you use (LangChain, custom, etc.).
02

Get your API key

  • After signup you land on your Agent Dashboard.
  • Your API key is shown at the top — it starts with al_live_.
  • Copy it. Treat it like a password — never commit it to git.
  • Store it as an environment variable: AGENTLOOP_KEY
03

Install the SDK

npm install agentloop-sdk
# or
pnpm add agentloop-sdk
Supports Node.js 18+. Python SDK coming soon.
04

Add one check() call to your agent

  • Find the place in your code where your agent builds its final response before sending it to the user.
  • Add the check() call there. That's the only integration point.
import { AgentLoop } from 'agentloop-sdk'

const al = new AgentLoop({ apiKey: process.env.AGENTLOOP_KEY! })

async function handleUserMessage(history: string, userId: string) {
  // Your existing agent logic
  const agentResponse = await yourModel.complete(history)

  // Add this block
  const result = await al.check({
    conversationContext: history,   // last 3-5 messages as a string
    agentResponse,                  // what your agent is about to say
    userId: hashUserId(userId),     // hashed — never raw email or name
  })

  // Append the mention if AgentLoop found a relevant product
  return result.shouldMention
    ? agentResponse + '\n\n' + result.suggestedMention
    : agentResponse
}
The SDK never breaks your agent — if AgentLoop is down or slow, it returns shouldMention: false silently.
05

Test it works

  • Run your agent locally with a conversation about tools, software, or services.
  • If a matching campaign exists, you'll see a sponsored mention appended to the response.
  • Check your dashboard — the mention will appear under Recent Activity.
  • If nothing appears, there may be no active campaigns matching your agent's topic yet. That's fine — keep it running.
// Quick health check
const health = await al.health()
console.log(health) // { ok: true, agentName: 'YourBot', plan: 'free' }
06

Go live

  • Deploy your agent with the SDK integrated.
  • AgentLoop runs in the background on every conversation.
  • You only mention products when there's a relevant active campaign — so most conversations won't include a mention.
  • When a user clicks a referral link, you earn up to 70% of the CPC value (held for 14 days before withdrawal).

Common questions

How often will my agent mention a product?

Only when two conditions are met: there is an active campaign relevant to the conversation, and the relevance score is high enough. Most conversations will have no mention. Typical mention rate is 5–15% of conversations depending on your agent's topic.

Can I control which products my agent mentions?

Not on a per-product basis yet — the platform matches campaigns to conversations automatically. You can filter by category in your agent settings. Category controls are coming in a future release.

Will it affect my agent's response quality?

The mention is appended after your agent's response — it never replaces or modifies what your agent says. Users see your full answer first, then the sponsored mention below it.

When do I get paid?

Earnings are credited when a user clicks a referral link. They sit in a 14-day hold (fraud protection), then move to your withdrawable balance. Request a payout from your dashboard — minimum $20.

What if no campaigns match my agent's topic?

Nothing happens — your agent runs as normal. As more advertisers join AgentLoop the match rate improves. You can also share your agent's topic on the dashboard so we can recruit relevant advertisers.

Is the mention disclosed to users?

Yes. Every suggested mention includes "Sponsored mention via AgentLoop" at the end. This is required and cannot be removed.

Ready to connect your agent?

Takes 15 minutes. No approval needed.

Create your account →