Agent Framework
Synero + AutoGen
Register Synero as a function tool in your AutoGen agents. When an agent needs a verified answer, it queries four models and gets a synthesized response.
Setup
Get started in minutes
1
Install dependencies
Install the required packages.
pip install requests autogen-agentchat2
Register the tool
Register the Synero tool with your AutoGen agents.
import os, requests
from autogen import register_function
def query_council(prompt: str) -> dict:
"""Query 4 AI models simultaneously for a verified answer."""
resp = requests.post(
"https://synero.ai/api/query",
headers={
"Authorization": f"Bearer {os.environ['SYNERO_API_KEY']}",
"Content-Type": "application/json",
},
json={"prompt": prompt, "format": "json"},
)
return resp.json()
register_function(
query_council,
caller=assistant,
executor=user_proxy,
description="Query 4 AI models for multi-perspective verification",
)Full Example
Complete integration
import os, requests
from autogen import ConversableAgent, register_function
def query_council(prompt: str) -> dict:
"""Query 4 AI models simultaneously for a verified answer."""
resp = requests.post(
"https://synero.ai/api/query",
headers={
"Authorization": f"Bearer {os.environ['SYNERO_API_KEY']}",
"Content-Type": "application/json",
},
json={"prompt": prompt, "format": "json"},
)
return resp.json()
assistant = ConversableAgent("assistant", llm_config=llm_config)
user_proxy = ConversableAgent("user", human_input_mode="NEVER")
register_function(
query_council,
caller=assistant,
executor=user_proxy,
description="Query 4 AI models for multi-perspective verification",
)FAQ
Does this work with AutoGen's GroupChat?
Yes. Register the tool on any agent in your group chat. That agent can invoke Synero whenever it needs multi-model verification.
Related
Start using Synero with AutoGen
Four AI models. One synthesized answer. Integrated into your workflow.