Skip to content

Latest commit

 

History

History
248 lines (171 loc) · 7.8 KB

File metadata and controls

248 lines (171 loc) · 7.8 KB

🎉 OntoGuard v0.1.0 - The Ontology Firewall for AI Agents

🚨 The Problem We're Solving

AI agents are making expensive mistakes in production—and it's costing millions.

Remember the $4.6M unauthorized transaction? The AI agent processed refunds without proper approval. This isn't a one-off—73% of production AI failures are due to semantic errors, not code bugs. Traditional validation doesn't work with AI agents because they need to understand what actions are actually allowed, not just syntax.

That's where OntoGuard comes in.


🛡️ What is OntoGuard?

OntoGuard is a semantic firewall that validates every AI agent action against OWL ontologies before execution. Think of it as a safety layer between your agents and your systems, ensuring every action complies with your business rules.

Why It Matters

  • Prevent Costly Errors - Catch violations before they cause $50K+ damage
  • Zero Code Changes - Works with any AI agent framework
  • Business Rule Enforcement - Define rules in OWL, enforce automatically
  • Production Ready - 244+ tests, battle-tested validation engine

✨ What's Included in v0.1.0

🔧 Core Features

Semantic Validation Engine

  • Action existence and validity checking
  • Entity type compatibility validation
  • Role-based permissions enforcement
  • Business rule constraints (amounts, temporal, custom)
  • Detailed denial explanations with suggested alternatives

Command-Line Interface (CLI)

  • validate - Check actions before execution
  • interactive - Explore ontologies interactively
  • info - Display ontology statistics and structure
  • Rich, colorful terminal output

Model Context Protocol (MCP) Server

  • Native MCP integration for AI agents
  • Tools: validate_action, get_allowed_actions, explain_rule, check_permissions
  • Configuration via YAML
  • Full logging and error handling

📚 Example Ontologies

Three production-ready example ontologies:

  1. E-Commerce (examples/ontologies/ecommerce.owl)

    • Users, orders, products, refunds
    • Rules: "Only Admins can delete Users", "Refunds over $1000 require Manager approval"
    • 19 test scenarios
  2. Healthcare (examples/ontologies/healthcare.owl)

    • Medical staff, patients, records, procedures
    • Rules: "Only Doctors can create prescriptions", "Sensitive records require Doctor role"
    • 22 test scenarios
  3. Finance (examples/ontologies/finance.owl)

    • Bank employees, customers, accounts, transactions
    • Rules: "Transactions over $10K require manager approval", "International transfers need compliance officer"
    • 23 test scenarios

🔌 Framework Integrations

Ready-to-use integration examples:

  • LangChain - Use OntoGuard as a validation tool in your agent
  • Microsoft AutoGen - Multi-agent coordination with semantic rules
  • CrewAI - Task validation before assignment
  • Custom - Works with any AI agent framework

📖 Documentation

  • Comprehensive README with quick start guide
  • Integration examples for all major frameworks
  • MCP server usage documentation
  • Contributing guidelines and code of conduct
  • 244+ passing tests with 85%+ coverage

🚀 Quick Start

Installation

pip install ontoguard

Your First Validation (30 seconds)

from ontoguard import OntologyValidator

# Load your business rules
validator = OntologyValidator("business_rules.owl")

# Validate before executing
result = validator.validate(
    action="process_refund",
    entity="Refund",
    entity_id="refund_123",
    context={"role": "Customer", "amount": 5000}
)

if result.allowed:
    print("✅ Safe to proceed")
    execute_refund(result.metadata)
else:
    print(f"❌ Blocked: {result.reason}")
    print(f"💡 Try: {result.suggested_actions}")

That's it! Your agent is now protected. 🎉

Next Steps


🗺️ What's Next

v0.2.0 - Dashboard UI (Coming Q2 2026)

  • Web-based dashboard for rule management
  • Real-time validation monitoring
  • Visual ontology editor

v0.3.0 - Schema Auto-Generation (Coming Q3 2026)

  • Auto-generate ontologies from database schemas
  • Self-healing schema mapping
  • Automatic rule inference

v0.4.0 - Multi-Ontology Support (Coming Q4 2026)

  • Support for multiple ontologies
  • Ontology versioning
  • Rule conflict resolution

Have feature requests? Open an issue or vote on existing ones!


🎯 Call to Action

⭐ Star the Repository

If OntoGuard saves you from a costly mistake, give it a star! It helps others discover the project.

⭐ Star OntoGuard

📖 Read the Full Story

Want to learn how OntoGuard was built? Check out our Medium articles:

💬 Join the Discussion

Have questions? Want to share your use case? Join the conversation:

🤝 Free Consultation Offer

First 10 teams get a free 1-hour consultation!

Deploying OntoGuard in production? I'm offering free 1-hour consultations to the first 10 teams who:

  1. Star the repository
  2. Open a discussion with your use case
  3. Mention "v0.1.0 consultation" in the title

We'll cover:

  • Ontology design for your business rules
  • Integration with your AI agent framework
  • Best practices for production deployment
  • Custom rule implementation

Claim Your Free Consultation


💰 Support the Project

OntoGuard is free and open source forever (MIT licensed). If it saves you from a costly mistake, consider supporting development:

💚 Sponsor OntoGuard

Your sponsorship enables:

  • Full-time development on new features
  • Better documentation and tutorials
  • Faster bug fixes and support
  • Enterprise features (SSO, audit logs, analytics)

📊 Release Stats

  • 244 tests passing ✅
  • 85%+ code coverage 📈
  • 3 example ontologies 📚
  • 3 framework integrations 🔌
  • MIT licensed 🔓
  • Production ready 🚀

🙏 Thank You

Thank you to everyone who:

  • ⭐ Starred the repository
  • 🐛 Reported bugs
  • 💡 Suggested features
  • 📝 Contributed code
  • 📢 Shared the project

Together, we're building a safer future for AI in production.


📞 Contact & Links


📝 Full Changelog

See CHANGELOG.md for a complete list of changes in v0.1.0.


🎉 Ready to protect your AI agents? Install OntoGuard today!

pip install ontoguard

Made with ❤️ for the AI community. Preventing costly mistakes, one validation at a time.