Ag2 integration - #82
Open
vvlrff wants to merge 3 commits into
Open
Conversation
Add documentation for AG2 (AutoGen) integration, including Perplexity search tools for AG2 agents. Update README and index pages to include links to the new integration guide.
Refine the AG2 resources section by linking directly to the `PerplexitySearchToolkit` documentation instead of the general common tools page.
Update the `PerplexitySearchToolkit` code examples in the AG2 integration guides to use `http://proxy.internal:8080` instead of `http://localhost:8080` to ensure the examples reflect the correct internal proxy configuration.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds an integration guide for AG2 (AutoGen): how to give AG2 agents live web access
through Perplexity's first-party
PerplexitySearchToolkit— raw ranked sources via theSearch API, and grounded answers with citations via Sonar. Includes a runnable example
script and per-tool filtering (domains, recency, date ranges, search mode).
AG2 >= 1.0.0 ships Perplexity support in-tree, so there is no adapter package to write
or maintain. The tools run as local function tools, so they work with every model
provider AG2 supports, not just OpenAI-compatible ones.
Type of Contribution
Checklist
Project Details
What problem does this solve?
AG2 agents have no built-in web access — they answer from model weights alone and go
stale. The cookbook has integration guides for OpenAI Agents and memory management, but
nothing for AG2, which is one of the more widely used multi-agent frameworks. This guide
closes that gap and shows both Perplexity endpoints side by side, so readers can pick
the cheap path (Search API, no LLM hop, no extra token cost) or the grounded path
(Sonar with citations) per tool rather than per agent.
What makes this contribution valuable to other developers?
get wrong on first integration.
of which model powers the agent.
External Links (if applicable):
Testing
node scripts/validate-mdx.jspasses — 42/42 MDX files valid, includingdocs/articles/ag2-integration/README.mdx.openai-agents-integrationarticle.ag2_perplexity.pysyntax-checked viaast.parse.Additional Notes
Files added:
docs/articles/ag2-integration/README.mdx— docs-site pagedocs/articles/ag2-integration/README.md— GitHub-facing versiondocs/articles/ag2-integration/ag2_perplexity.py— runnable exampleFiles changed:
README.md— AG2 added to the Integration Guides listdocs/index.mdx— direct links to the AG2 and OpenAI Agents guidesOpen questions for reviewers:
/chat/completions), which docs(README): mark Agent API as primary, mark Sonar deprecated #78marked deprecated in favour of the Agent API. AG2's toolkit targets Sonar today, so
the guide reflects what actually ships — but if the cookbook should no longer document
Sonar at all, say so and I'll restructure around the Agent API.
ag2installed plusboth a Perplexity key and a model-provider key, so the script is syntax-checked but
not executed. Would appreciate someone running it once before merge.