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.3.0.tar.gz (562.0 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.3.0-py3-none-any.whl (11.7 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for autogen_omega-0.3.0.tar.gz
Algorithm Hash digest
SHA256 9384697d88d7ee0c812e944b77da7ae6067b377b499345bcd3af48483e481fc0
MD5 050d757fbaf15fd987e3c00df72d5ae3
BLAKE2b-256 97dd385299974987a8a1a5c74d18a5e05f4497e74232879b78358da0fb557af9

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for autogen_omega-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 44305efbdc08e93e266eaf139409f7ae1aeae1bff7cf527634c0296cc0b109d0
MD5 5825cbd20e12430d32558c8b545cb655
BLAKE2b-256 cf90feb461a5a94582168c0b9802f2e55462f3762d14ef16d278aac79adc47c6

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