Skip to content

Docs: AG2 integration page uses pre-1.0 autogen.beta imports #143

Description

@vvlrff

Why this is filed here

The same report is open as perplexity-py#103 and has had no response in three weeks. Filing it here because this repo is the most active public repo tied to docs.perplexity.ai — its own README points at docs.perplexity.ai/docs/getting-started/integrations/mcp-server, so the integrations section of that site appears to be in scope for whoever maintains this. Happy to have it closed as a duplicate of #103.

This is a docs-only fix: two import lines and a version pin.

Problem

The AG2 integration page at
https://docs.perplexity.ai/docs/getting-started/integrations/ag2
shows imports from the pre-1.0 AG2 layout:

from autogen.beta import Agent
from autogen.beta.tools.search import PerplexitySearchToolkit

AG2 moved to the ag2 package at v1.0.0 (published 2026-07-27) and ships no autogen/ package at all — the current release is 1.0.4. The current path, per AG2's own docs
(https://docs.ag2.ai/docs/user-guide/tools/common_toolkits/#perplexitysearchtoolkit), is:

from ag2 import Agent
from ag2.tools import PerplexitySearchToolkit

The install command on the same page is unpinned:

pip install "ag2[perplexity]"

so it resolves to 1.x — meaning the Quick Start's own install produces an environment where the Quick Start's first two lines raise ModuleNotFoundError. Anyone following the page top to bottom hits this immediately.

Suggested fix

Update the imports and pin the version, so the snippet matches what the install produces:

pip install "ag2[perplexity]>=1.0.0"
from ag2 import Agent
from ag2.tools import PerplexitySearchToolkit

The rest of the page (toolkit construction, toolkit.search(), the configuration and response-shape sections) is unaffected — the change is the import block and the pin. For reference, ag2[perplexity] pins perplexityai>=0.30.0,<1.

Happy to send the fix

We maintain AG2, so we can open the PR ourselves and keep the page current as the toolkit evolves — just point us at the repo that backs docs.perplexity.ai. We also have an AG2 integration guide open as api-cookbook#82, written against the 1.x API, and we'd like the two to agree rather than drift.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions