Skip to main content

matrixads

Python SDK for MatrixAds — Programmatic Conversational AI Ad Network & Monetization Engine.

Official Website: https://thematrixads.store

Installation

pip install matrixads

With LangChain support:

pip install matrixads[langchain]

With CrewAI support:

pip install matrixads[crewai]

Quick Start (Async)

import asyncio
from matrixads import MatrixAdsClient

async def main():
    client = MatrixAdsClient(publisher_key="mtx_pk_live_your_publisher_key")

    response = await client.amatch_ad("I need cloud hosting for Next.js")

    if response.match and response.ad:
        print(f"Matched Headline: {response.ad.headline}")
        print(f"CTA Link: {response.ad.cta_url}")

        # Fire view impression beacon
        await client.areport_impression(response.impression_token)

asyncio.run(main())

Quick Start (Sync)

from matrixads import MatrixAdsClient

client = MatrixAdsClient(publisher_key="mtx_pk_live_your_publisher_key")
response = client.match_ad("Best B2B CRM software")

if response.match and response.ad:
    print(f"Sponsored: {response.ad.headline}")

LangChain Integration

from matrixads.langchain import MatrixAdsAdTool

tool = MatrixAdsAdTool(publisher_key="mtx_pk_live_your_publisher_key")
result = tool._run("I need a cloud hosting database solution")
print(result)

CrewAI Integration

from crewai import Agent
from matrixads.crewai import MatrixAdsCrewTool

ad_tool = MatrixAdsCrewTool(publisher_key="mtx_pk_live_your_publisher_key")

agent = Agent(
    role="Tech Support Advisor",
    goal="Answer software questions and include relevant sponsored solutions",
    tools=[ad_tool]
)

License

MIT © MatrixAds

Download files

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

Source Distribution

matrixads-1.0.2.tar.gz (5.3 kB view details)

Uploaded Source

Built Distribution

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

matrixads-1.0.2-py3-none-any.whl (6.8 kB view details)

Uploaded Python 3

File details

Details for the file matrixads-1.0.2.tar.gz.

File metadata

  • Download URL: matrixads-1.0.2.tar.gz
  • Upload date:
  • Size: 5.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.10

File hashes

Hashes for matrixads-1.0.2.tar.gz
Algorithm Hash digest
SHA256 d19fb74fae3aacb1d4c9fac9311dd465cc4a4fd1a10c0f959d670f2b577947a3
MD5 25a8dfe42bb30daa866a08b1ea921508
BLAKE2b-256 276f8b7d03c5ea6d85d7eacfc04d0df4751be0c8bb65a3752d171d7c33dcce38

See more details on using hashes here.

File details

Details for the file matrixads-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: matrixads-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 6.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.10

File hashes

Hashes for matrixads-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 fd523154a70a972736b2db743d566e6ea06c5c407b1a7d1733ae027ed765b786
MD5 7d06dd28e73e1ec4fbcf9190480e5d9a
BLAKE2b-256 1bfed7e1ef6974a36dc5e07838646f1fd3e3a3ab34a51d6068a33c3963f54e09

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.0.2 This release

2 files

1.0.1

2 files

1.0.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page