Skip to content

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

Prerequisites

  • Python 3.11+
  • uv installed (Astral uv)
  • Node.js 20+
  • At least one LLM provider key (for example Openai)

1) Clone and enter project

git clone https://github.com/Daham-Mustaf/odrl-multi-agent-llm.git
cd odrl-multi-agent-llm

2) Configure backend

cd backend
cp .env.example .env

Edit backend/.env (example):

ENABLE_GROQ=true
GROQ_API_KEY=your_key_here
DEFAULT_MODEL=groq:llama-3.3-70b-versatile

Then install dependencies:

uv sync

3) Configure frontend

cd ../frontend
cp .env.example .env

Edit frontend/.env:

REACT_APP_API_URL=http://localhost:8000
DISABLE_ESLINT_PLUGIN=true

Then install dependencies:

npm install

4) Run with two terminals

Terminal 1 (backend):

cd backend
uv run uvicorn main:app --reload --host 0.0.0.0 --port 8000

Terminal 2 (frontend):

cd frontend
HOST=0.0.0.0 PORT=3000 npm start

Open: http://localhost:3000

5) Quick verification

Backend health check:

curl http://localhost:8000/health

Production deployment: 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: https://youtu.be/bpEZx8cqiRQ

Screenshot Demos: Check the full demos here.

ACL Demo Package (Installable)

This repository serves as the installable package for ACL demo evaluation.

If a public live demo endpoint is not available, reviewers can reproduce the system locally from this package using the steps above.

Tech Stack

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

Authors

  • Daham M. Mustafa - Fraunhofer FIT, Sankt Augustin, Germany
  • Yixin Peng - RWTH Aachen University, 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
                  Yixin, Peng 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

 
 
 

Contributors