Skip to content

example - a policy representing for agent delegation #112

Description

@joshcornejo

This example aims to showcase a possible representation for agent delegation of a "state of the world" (which is composed of the state and ODRL policies) for an assignee ("userID") by making the state of the world an odrl:Asset implicitly and therefor being the target of odrl policies:

ex:actionNode        a odrl:Action ;                          // agent has access to the action odrl:read
                     rdf:value odrl:read ;
                     rdf:refinement ex:actionRefinement . 

ex:actionRefinement  a odrl:Constraint ;                      // constrained to 3 executions of the action
                     odrl:dataType xsd:int ;
                     odrl:leftOperand odrl:Count ;
                     odrl:operator odrl:lteq ;
                     odrl:rightOperand 3 .

ex:constraintExample a odrl:Constraint ;                      // constrains up to the end of 2025
                     odrl:datatype xsd:dateTime ;
                     odrl:leftOperand odrl:dateTime ;
                     odrl:operator odrl:lt ;
                     odrl:rightOperand "2026-01-01T00:00:00.0000000Z"^^xsd:dateTime .

ex:permission        a odrl:Permission ;
                     odrl:assigner ex:userID ;                // for delegation the assignee becomes the assigner
                     odrl:assignee ex:agentID ;               // the agentID becomes the assignee
                     odrl:target ex:stateOfTheWorldID ;
                     odrl:action ex:actionNode ; 
                     odrl:constraint ex:constraintExample .   // constrain the permission.

ex:stateOfTheWorldID a odrl:Asset, tbd:StateOfTheWorld .      // here is the SoW

In practice, it is desirable to fine-grain the allocation of each action (ie. logical constraint [ count AND expiry ] and include the functions that the agent can take in the policies within the SoW) to prevent the spawning of rules, in http & json (simplifying for representation):

request

PATCH /api/v1.0/Agent/{userID}/delegate

payload

{
    "target": "ex:stateOfTheWorldID",
    "assignee": "ex:agentID",
    "function": "odrl:Assignee",
    "actions": [
      {
        "expiry": 1767229200, // = 2026-01-01T00:00:00.0000000Z it can be a date, but epochs are better for efficient computation
        "action": "odrl:read",
        "count": 3
      }
    ]
  }

The management/administration plane (red below) is where this policy is created:

Image

Activity

  1. joshcornejo commented on May 18, 2025

    @joshcornejo
    CollaboratorAuthor

    Fixed the image, added the function parameter.

    Image

  2. andreiciortea commented on Jun 4, 2025

    @andreiciortea

    @joshcornejo, thank you for sharing the example. It is also relevant for the section on norms and policies in the WebAgents CG interoperability report. I will add a pointer to this issue.

    @gnardin might also be interested in this example.

  3. joshcornejo commented on Jun 4, 2025

    @joshcornejo
    CollaboratorAuthor

    @andreiciortea / @gnardin - just remember this part of the flow is "post authentication", any questions let me know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions