A Vision on Algebraic Flows for Declarative Resource Descriptions

Jitse De Smet

Ruben Verborgh

Ruben Taelman

ECAI 2025 HyperAgents workshop supporting slides for our vision paper, 26 October 2025

A Vision on Algebraic Flows for Declarative Resource Descriptions

Ghent University – imec – IDLab, Belgium

Research Foundation - Flanders

Overview

Veterinarian use case

Overview

RPC/ Syntactic descriptions fail to describe relationships

MCP introduces ambiguity

Model Context Protocol (MCP) logo

Semantic Web Descriptions cannot model underlying resources

Query-Based interfaces can be cost heavy, inherently symmetrical, or resemble RPC

Overview

Goals

  1. Execution environment independent
  2. Models intermediate resources (asymmetric interfaces)
  3. Deterministic description of relationship between resources
  4. Standing on the shoulders of giants

Algebraic Descriptions over RDF data

Get Interface Description, discover <create-owner> with:
  1. Interaction method: POST to /owners
  2. Resource representation: Turtle
  3. Expected data shape: SPARQL ASK
  4. Consequence of success: SPARQL update on <database>
INSERT {
    GRAPH <database> {
        ?ownerBound a ex:owner ;
            ex:name ?name ; ex:pet ?petBound .
        ?petBound a ex:pet ;
            ex:name ?petName ; ex:age ?age .
    }
} WHERE {
    ?resource ex:name ?name ;
    BIND( UUID() AS ?ownerUuid ) .
    ?resource ex:pet ?pet .
    BIND( UUID() AS ?petUuid ).
    ?pet ex:name ?petName ;
        ex:age ?age ;
    BIND( URI(CONCAT(ex:owners, '/', ?ownerUuid)) AS ?ownerBound ) .
    BIND( URI(CONCAT(?ownerBound, '/', ?petUuid)) AS ?petBound ) .
}

Derivation over an underlying resource

Get Interface Description, discover <get-owners> and <get-owner> with:
  1. Interaction method: GET to /owners and GET to /owner/{id}
  2. Resource representation: Turtle
  3. No expected data, but consequence of success a SPARQL CONSTRUCT
CONSTRUCT { [] ex:item ?owner . } WHERE {
    GRAPH <database> {
        ?owner a ex:owner .
    }
}

CONSTRUCT {
    ?id a ex:owner ;
        ?ownerP ?ownerO ;
    ?ownerO ?petP ?petO ;
} WHERE {
    GRAPH <database> {
        ?id a ex:owner ;
            ?ownerP ?ownerO ;
        OPTIONAL { ?ownerO ?petP ?petO . }
    }
}

Beyond REST: consistency boundary

Get Interface Description, discover <change-owner> using interaction method: POST to /change-owners/{id}/{pet-id}
DELETE {
    GRAPH <database> {
        ?origOwner ex:pet ?orig-pet .
        ?origPet a ex:pet ;
            ex:age ?age ;
            ex:name ?name .
    }
} INSERT {
    GRAPH <database> {
        ?newOwner ex:pet ?movedIri .
        ?movedIri a ex:pet ;
            ex:age ?age
            ex:name ?name
    }
} WHERE {
    # From received data:
    ?o ex:new-owner ?newOwner .
    BIND( URI( CONCAT(ex:owners, '/', ?id) ) AS ?origOwner ) .
    BIND( URI( CONCAT(?origOwner, '/', ?petId) ) AS ?origPet ) .
    BIND( URI( CONCAT(?newOwner, '/', ?petId) ) AS ?movedIri ) .
    # Go look in the current state of the database for whether the owner and pet exist.
    GRAPH <database> {
        ?origOwner ex:pet ?origPet .
        ?origPet a ex:pet ;
            ex:age ?age ;
            ex:name ?name .
        ?newOwner a ex:owner ;
    }
}

Conclusion

  1. Endpoint discovery
  2. Infer downstream effect of modifications
  3. Using existing query writing skills

Future work

  1. Formalization
  2. Fine-grained, policy aware semantics
  3. Proof of Concept

Additional

© 2025 Jitse De Smet Creative Commons Attribution 4.0, unless otherwise indicated.

Source