Skip to main content

ag2-webzio

Search global news with Webz.io from AG2 agents — in natural language, with the most relevant articles first.

Webz.io News Search covers news and current events from sources worldwide. Ask a question in plain language, narrow results with filters (language, country, date, sentiment, domain, ticker, and more), and get back focused article excerpts with titles, URLs, and metadata.

Use this package with AG2 agents, or construct the toolkit directly to verify MCP connectivity.

What you get

  • Natural-language search — no keyword hacking. Example: "EU AI Act enforcement updates" or "How is Tesla stock reacting to earnings?"
  • Worldwide coverage — semantic search over Webz.io's global news index.
  • Rich filters — language, country, days, sentiment, domain, ticker, person, organization, topic, and more. See the MCP tool reference.
  • Live schema — filters are loaded from the hosted MCP server (tools/list). New Webz filters appear automatically, without republishing this package.
  • AG2 toolkit — pass WebzioNewsSearchToolkit(...) to Agent(tools=[...]), or use toolkit.search() to register only news search.

Install

pip install ag2-webzio
export WEBZ_API_TOKEN="your-webz-api-token"

Get a token from your Webz.io dashboard (same token as the News Search API).

Requires AG2 v1 with MCP support (ag2[mcp]>=1.0, installed automatically).

Full setup and client options: MCP Server docs.

With an AG2 agent

import os
from ag2 import Agent
from ag2.config import AnthropicConfig
from ag2_webzio import WebzioNewsSearchToolkit

agent = Agent(
    "researcher",
    config=AnthropicConfig(model="claude-sonnet-4-6"),
    tools=[WebzioNewsSearchToolkit(api_token=os.environ["WEBZ_API_TOKEN"])],
)

The model discovers the live news_search_by_webz schema and picks filters itself. Example prompts:

  • "Search Webz news for recent Nvidia supply-chain risk coverage and summarize with sources."
  • "Find negative coverage about Boeing from the last 7 days using Webz news search."
  • "Use the Webz news tool to compare EU and US AI regulation news from the past month."

Register only news search

When the MCP server exposes more than one tool, register news search with search():

toolkit = WebzioNewsSearchToolkit(api_token="your-webz-api-token")
agent = Agent("researcher", config=config, tools=[toolkit.search()])

Today the server exposes a single tool, so toolkit and toolkit.search() are equivalent.

Verify MCP connectivity (no LLM)

export WEBZ_API_TOKEN="your-token"
python examples/run_news_search.py

How it works

This package wraps AG2's client-side MCPToolkit around the hosted Webz News Search MCP server at https://news-search-mcp.webz.io/mcp. Each tool call runs a regular News Search API request with your token (same credits and rate limits). Filter fields are not hardcoded — the tool schema comes from the live server.

Configuration

Name Default Purpose
WEBZ_API_TOKEN required Webz API token from the dashboard
WEBZ_MCP_URL https://news-search-mcp.webz.io/mcp Override for local MCP testing

You can also pass api_token= and mcp_url= to WebzioNewsSearchToolkit().

Links

Metadata

Release files for ag2-webzio 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ag2-webzio 0.1.0
File Size Uploaded
ag2_webzio-0.1.0.tar.gz 5.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ag2-webzio 0.1.0
File Interpreter ABI Platform
ag2_webzio-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 11.3 kB

Release files / ag2_webzio-0.1.0.tar.gz

Download URL ag2_webzio-0.1.0.tar.gz
Size 5.8 kB
Tags Source
SHA-256 checksum
How to use checksums
9c12aaa10f91850f93dc85aa2cfc3fe083634febf76dafdd38ee3ecaccae84c8
BLAKE2b-256 checksum
How to use checksums
4dc49e887028887cc8fb9c97d591bd1704ebea5c88e5b7008120e88bcf615a86
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.0

Release files / ag2_webzio-0.1.0-py3-none-any.whl

Download URL ag2_webzio-0.1.0-py3-none-any.whl
Size 5.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cf0909bc3b225ef5945ead5c6f593ef3f3df1f2a2ac051cfca2d8c2eecff8093
BLAKE2b-256 checksum
How to use checksums
e009a81f54e51811ef0b09e36120354627b35b80e9988b0a522b3e0e85e788f8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.0

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release 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