Skip to main content

OmegaEngine governance integration for autogen-omega

Project description

OmegaEngine Logo

autogen-omega

Microsoft AutoGen Integration for OmegaEngine

PyPI CI License

DocumentationPlaygroundIssues


✨ Features

  • 🤖 Agent Wrapper — Add governance to any AutoGen agent
  • 🔄 Conversation Guard — Monitor multi-agent dialogues
  • 🛡️ Tool Execution Control — Validate tool calls before execution
  • 📊 Group Chat Monitoring — Oversee entire agent teams
  • Human-in-the-Loop — Automatic escalation on policy triggers

📦 Installation

pip install autogen-omega

🚀 Quick Start

Governed Assistant Agent

from autogen import AssistantAgent, UserProxyAgent
from autogen_omega import OmegaAssistantAgent

# Create a governed agent
assistant = OmegaAssistantAgent(
    name="analyst",
    system_message="You are a financial analyst.",
    omega_api_key="your-omega-api-key",
    policy_id="finance_policy",
    llm_config={"model": "gpt-4"}
)

user_proxy = UserProxyAgent(
    name="user",
    human_input_mode="NEVER",
)

# Start governed conversation
user_proxy.initiate_chat(
    assistant,
    message="Analyze this investment opportunity..."
)

Group Chat with Governance

from autogen import GroupChat, GroupChatManager
from autogen_omega import OmegaGroupChatManager

# Create your agents
researcher = OmegaAssistantAgent(name="researcher", ...)
analyst = OmegaAssistantAgent(name="analyst", ...)
writer = OmegaAssistantAgent(name="writer", ...)

# Governed group chat
group_chat = GroupChat(
    agents=[researcher, analyst, writer],
    messages=[],
)

manager = OmegaGroupChatManager(
    groupchat=group_chat,
    omega_api_key="your-omega-api-key",
    policy_id="team_policy",
)

# All agent interactions are monitored
user_proxy.initiate_chat(manager, message="Research and write a report...")

🛡️ Tool Execution Control

Validate tool/function calls before execution:

from autogen_omega import OmegaToolValidator

validator = OmegaToolValidator(
    omega_api_key="your-omega-api-key",
    policy_id="tool_safety",
)

@validator.guard
def execute_sql(query: str) -> str:
    """Execute SQL query - governed by OmegaEngine"""
    return db.execute(query)

# SQL queries are validated before execution
# Dangerous queries like DROP TABLE are blocked

📊 Conversation Auditing

Every agent message is logged:

from autogen_omega import OmegaConversationLogger

logger = OmegaConversationLogger(
    omega_api_key="your-omega-api-key",
    session_id="session_123",
)

# Attach to agents
assistant.register_hook("on_message", logger.log)

# Access full conversation audit
audit = logger.get_audit()
print(f"Messages: {audit.message_count}")
print(f"Policy violations: {audit.violations}")

🎯 Use Cases

Use Case How It Helps
Research Teams Ensure agents stay on topic
Code Generation Prevent malicious code execution
Document Processing Protect sensitive data
Customer Service Enforce response policies

📄 License

Licensed under the Apache License 2.0.


Built with ❤️ by the OmegaEngine team

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

autogen_omega-0.2.0.tar.gz (561.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

autogen_omega-0.2.0-py3-none-any.whl (11.6 kB view details)

Uploaded Python 3

File details

Details for the file autogen_omega-0.2.0.tar.gz.

File metadata

  • Download URL: autogen_omega-0.2.0.tar.gz
  • Upload date:
  • Size: 561.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for autogen_omega-0.2.0.tar.gz
Algorithm Hash digest
SHA256 961cf31e162a8530aca5809e55c519c6766710701892c66dff1a25867ef44f2a
MD5 c769dbc4ed2b1a5568bb2ddb6b9e5709
BLAKE2b-256 1358132b09663f13cb0e1b4b40d5d72eca0314476d143c629ab9b0f1606fd55b

See more details on using hashes here.

File details

Details for the file autogen_omega-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: autogen_omega-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 11.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for autogen_omega-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3e85236ba6796cce30d62dc5acb86d42c8361512c2cd18e3e64bea628f673ab2
MD5 8887a6b007d685cbd0f8369dc2ef6073
BLAKE2b-256 9f1310b0f659d1ab65bde979bdc2fd46200a1989ff4dd29090899863111e577b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page