Agents
sparqld gives agents a read-only query surface over the files in your
knowledge base. Give the agent the endpoint URL and a way to send SPARQL HTTP
requests, such as the sq client. To give agents the
local query workflow, install the skill from the GitHub repository:
npx skills add https://github.com/iolanta-tech/sparqld --skill sparqld --agent '*'
With the example dataset running, ask your agent:
You
In $sparqld, find information about known planets in Alpha Centauri system, and show me the query you used to obtain that.
Codex
Using the sparqld skill, I inspected the knowledge base vocabulary and
followed the recorded star and system links. It records two planets in the
Alpha Centauri system: Proxima Centauri b and Proxima Centauri d.
The query and its result are shown below.
Query used alpha-centauri-planets.rq
PREFIX dbo: <http://dbpedia.org/ontology/>
PREFIX dbp: <http://dbpedia.org/property/>
PREFIX schema: <https://schema.org/>
SELECT DISTINCT ?planet ?name WHERE {
?planet a dbo:Planet ;
dbp:star/dbp:star/^schema:hasPart <http://dbpedia.org/resource/Alpha_Centauri> ;
schema:name ?name .
}
ORDER BY ?name
Result alpha-centauri-planets.tsv
http://dbpedia.org/resource/Proxima_Centauri_b Proxima Centauri b
http://dbpedia.org/resource/Proxima_Centauri_d Proxima Centauri d