Skip to content

ODRL Multi-Agent LLM Demo: A multi-agent LLM framework for ODRL policy generation, reasoning, and validation.

License

Notifications You must be signed in to change notification settings

Daham-Mustaf/odrl-multi-agent-llm

Repository files navigation

ODRL Multi-Agent LLM

Python FastAPI LangChain LangGraph React License: MIT DOI

Transform natural language into validated ODRL policies using multi-agent AI

Automated generation of machine-readable data usage policies through a four-agent pipeline with human-in-the-loop validation.

Key Features

  • 4-Stage Pipeline: Parser → Reasoner → Generator → Validator
  • Dual Checkpoints: Semantic conflict detection + SHACL validation
  • Iterative Refinement: Auto-corrects validation errors (not single-shot)
  • Multi-Model Support: Groq, Ollama, OpenAI-compatible endpoints
  • Interactive UI: Real-time monitoring, manual/auto execution modes

Quick Start

Local Development:

# Backend
cd backend && uv sync
uv run uvicorn main:app --reload --host 0.0.0.0 --port 8000

# Frontend
cd frontend && npm install && npm start

Production: 📖 Deployment Guide →

Architecture

graph LR
    A[Natural Language] --> B[Parser Agent]
    B --> C{Checkpoint I}
    C -->|✓ Valid| D[Reasoner Agent]
    C -->|✗ Conflicts| E[User Review]
    D --> F[Generator Agent]
    F --> G{Checkpoint II}
    G -->|✓ Valid| H[ODRL Policy]
    G -->|✗ Invalid| F
Loading

Workflow Diagram

Multi-agent workflow Figure: Multi-agent pipeline with dual human checkpoints. Reasoner (Checkpoint I) enables pre-generation review; Validator (Checkpoint II) enables post-generation refinement. Red dashed: edit input; orange dashed: regenerate; green: continue. Supports per-agent LLM configuration.

Documentation

Guide Description
Deployment Ubuntu production setup
Configuration Environment & settings
Development Local setup & structure
Testing Test procedures
API Reference Backend endpoints

🎬 Demo

Video Demo: [Watch on YouTube](coming soon...)

Screenshot Demos: Check the full demos here.

Tech Stack

Backend: FastAPI • LangChain • LangGraph • RDFLib • PySHACL
Frontend: React • Tailwind CSS
LLMs: Groq • Ollama • OpenAI-compatible • Google GenAI

Research Context

Developed at Fraunhofer FIT & RWTH Aachen University for:

  • NFDI4Culture
  • Daten-Raum-Kultur (DRK)
  • Cultural Heritage Dataspaces

Authors

  • Daham M. Mustafa - Fraunhofer FIT, Sankt Augustin, Germany
  • Diego Collarana - Fraunhofer FIT, Sankt Augustin, Germany
  • Christoph Lange - Fraunhofer FIT & RWTH Aachen University, Germany
  • Christoph Quix - Fraunhofer FIT & RWTH Aachen University, Germany
  • Stefan Decker - Fraunhofer FIT & RWTH Aachen University, Germany

Citation

If you use this software in your research, please cite:

BibTeX:

@software{mustafa_2025_odrl,
  author       = {Mustafa, Daham M. and
                  Collarana, Diego and
                  Lange, Christoph and
                  Quix, Christoph and
                  Decker, Stefan},
  title        = {ODRL Multi-Agent LLM: A Multi-Agent System for 
                  ODRL Policy Generation},
  year         = 2025,
  publisher    = {Zenodo},
  version      = {v2.1.0},
  doi          = {10.5281/zenodo.17670391},
  url          = {https://doi.org/10.5281/zenodo.17670391}
}

Contributing

Contributions welcome! See CONTRIBUTING.md

License

MIT License - see LICENSE

🔗 Links

About

ODRL Multi-Agent LLM Demo: A multi-agent LLM framework for ODRL policy generation, reasoning, and validation.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published