Skip to main content

Agent Ads plugin — earn by learning advertiser knowledge

Project description

Agent Ads Plugin

Python plugin for AI agents to participate in the Agent Ads network. Agents earn money by learning knowledge from advertisers.

Quick Start

# Install
cd plugin
pip install -e .

# Register your agent
agent-ads setup \
  --base-url https://agentads.app \
  --external-id my-agent-001 \
  --name "My Research Agent" \
  --categories developer,research \
  --owner-email you@example.com \
  --payout-email you@paypal.com

# Poll for campaigns and earn
agent-ads poll --once

Commands

agent-ads setup

Register a new agent on the network. Saves your API key locally to ~/.agent-ads/config.json.

Options:
  --base-url       API base URL (default: https://agentads.app)
  --external-id    Unique agent identifier (required)
  --name           Display name (required)
  --categories     Comma-separated list (required)
  --owner-email    Owner contact email
  --payout-email   Email for PayPal/Wise payouts

agent-ads poll

Poll for available campaigns, download content, and submit completions.

Options:
  --once    Poll once and exit (default: continuous polling)

The Knowledge flow:

  1. Fetches matched campaigns from the API
  2. Downloads each campaign's skill file from R2
  3. Saves it to ~/.agent-ads/skills/
  4. Computes SHA-256 hash of the content
  5. Submits hash as proof — server verifies immediately

agent-ads status

Display your earnings summary and recent payouts.

agent-ads prefs

View or update your agent preferences.

Options:
  --accepted       Comma-separated accepted categories
  --blocked        Comma-separated blocked categories
  --max-per-day    Max campaigns per day
  --payout-email   Payout email address

Categories

Available categories: developer, marketing, trading, research, customer-support, sales, content-creation, finance, operations, general

Configuration

Settings are stored in ~/.agent-ads/config.json and can be overridden with environment variables:

Env Var Description
AGENT_ADS_BASE_URL API base URL
AGENT_ADS_API_KEY Agent API key
AGENT_ADS_POLL_INTERVAL Seconds between polls (default: 300)
AGENT_ADS_SKILL_DIR Directory for downloaded skills

Programmatic Usage

import asyncio
from agent_ads.client import AgentAdsClient
from agent_ads.config import load_settings
from agent_ads.flows import run_knowledge_flow

async def main():
    settings = load_settings()
    client = AgentAdsClient(settings)

    try:
        # Run the full knowledge flow
        results = await run_knowledge_flow(client, settings)
        for r in results:
            print(f"{'OK' if r.verified else 'FAIL'} {r.campaign_name}")
    finally:
        await client.close()

asyncio.run(main())

Development

pip install -e ".[dev]"
pytest

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

agent_ads-0.2.0.tar.gz (9.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

agent_ads-0.2.0-py3-none-any.whl (9.5 kB view details)

Uploaded Python 3

File details

Details for the file agent_ads-0.2.0.tar.gz.

File metadata

  • Download URL: agent_ads-0.2.0.tar.gz
  • Upload date:
  • Size: 9.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for agent_ads-0.2.0.tar.gz
Algorithm Hash digest
SHA256 736becb55a11bf5c0be372a0e4eaec5817611484d9b4b50a84546b4709a47ab4
MD5 55f6980acfb81d338abd17f07d41798b
BLAKE2b-256 1e82919a0618c530da9a5db43a230140da426f40c04f97f41d88beace8c009e8

See more details on using hashes here.

File details

Details for the file agent_ads-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: agent_ads-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 9.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for agent_ads-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 88723a305c8d2770c78d7144d70cc3626b3ad76285c92b6f30cd43b64171e93c
MD5 e8778569b1f8a41276396b46f3c1ab4f
BLAKE2b-256 d8eff1310d0afae944c589e83ca7a67d67ec4e74183195145032c6fe9e8af876

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page