AutoGen Integration

Add trust verification to AutoGen multi-agent conversations. Ensure only verified agents participate.

nerq-autogen v0.1.0 Python

Installation

pip install nerq-autogen

Quick Start

Wrap your AutoGen agents with trust verification. The wrapper checks each agent's trust score before allowing it to participate in conversations.

# 1. Import the trust wrapper
from nerq_autogen import TrustVerifiedAgent

# 2. Create a trust-verified agent
import autogen

config_list = autogen.config_list_from_json("OAI_CONFIG_LIST")

agent = TrustVerifiedAgent(
    name="researcher",
    agent_id="researcher-agent-v2",
    nerq_api_key="your-nerq-api-key",
    min_trust_score=60,
    llm_config={"config_list": config_list},
    system_message="You are a research assistant."
)

# 3. Use in a conversation
user_proxy = autogen.UserProxyAgent(
    name="user",
    human_input_mode="NEVER"
)

user_proxy.initiate_chat(
    agent,
    message="Summarize the latest AI safety research."
)

Multi-Agent Conversations

Verify all agents in a group chat before the conversation starts.

from nerq_autogen import TrustVerifiedGroupChat

# Create multiple verified agents
researcher = TrustVerifiedAgent(
    name="researcher",
    agent_id="researcher-v2",
    nerq_api_key="your-key",
    min_trust_score=60,
    llm_config={"config_list": config_list}
)

writer = TrustVerifiedAgent(
    name="writer",
    agent_id="writer-v3",
    nerq_api_key="your-key",
    min_trust_score=70,   # higher threshold for writing agents
    llm_config={"config_list": config_list}
)

# Group chat with trust verification
group_chat = TrustVerifiedGroupChat(
    agents=[researcher, writer, user_proxy],
    messages=[],
    max_round=10
)

manager = autogen.GroupChatManager(groupchat=group_chat)
user_proxy.initiate_chat(manager, message="Write a report on AI trends.")

Configuration

Parameter Type Default Description
agent_idstrrequiredNerq agent identifier for trust lookup
nerq_api_keystrenv NERQ_API_KEYYour Nerq API key
min_trust_scoreint60Minimum trust score to allow participation
verify_on_initboolTrueCheck trust score when agent is created
cache_ttlint300Cache duration in seconds

FAQ

What is nerq-autogen?
nerq-autogen is a Python package that adds trust verification to Microsoft AutoGen multi-agent conversations. It wraps AutoGen agents with trust checks, ensuring only verified agents participate in conversations.
Can I use this with AutoGen Studio?
Yes. nerq-autogen works with both the AutoGen Python SDK and AutoGen Studio. For Studio, configure the trust wrapper in your agent definition file. The package intercepts agent messages and verifies trust scores before allowing execution.
How is trust score calculated?
Nerq Trust Scores (0-100) are calculated from multiple signals: code quality, security audit results, community reputation, maintenance activity, and compliance status across 52 jurisdictions. Scores are updated continuously as new data is collected from 5M+ indexed AI assets.
← All integrations