Skip to content

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

Description

@vvlrff

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

Filing here because I couldn't find a public repo for the docs site — happy to move this
if there's a better venue.

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. 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 don't import. 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.

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 in flight against perplexityai/api-cookbook, written against the 1.x
API, and we'd like the two to agree rather than drift.

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