# AgentEventOntology: generated by generator/ttl_export.py from jupyter-naas/abi 56f86c1be218b046068d8abf683d1ea6cd66763e
# (zen-prod-2026-11-24-1). Do not edit by hand. Source files:
#   libs/naas-abi-core/naas_abi_core/services/agent/ontologies/modules/AgentEventOntology.ttl
@prefix abi: <http://ontology.naas.ai/abi/> .
@prefix agent: <http://ontology.naas.ai/abi/agent/> .
@prefix dc1: <http://purl.org/dc/terms/> .
@prefix dc11: <http://purl.org/dc/elements/1.1/> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

agent:AgentEventOntology a owl:Ontology ;
    abi:ontologyResource "ontologies/modules/AgentEventOntology.ttl" ;
    abi:pythonPackage "naas_abi_core.services.agent" ;
    abi:pythonResource "ontologies/modules/AgentEventOntology.py" ;
    dc11:date "2026-05-27"^^xsd:date ;
    dc1:description "Events emitted by Agent during a conversation: model calls, tool calls and responses, AI messages, routing, and invocation completion. Identity (user/chat/workspace) is attached at publish time from ContextVars set at the request boundary."@en ;
    dc1:license <https://creativecommons.org/licenses/by/4.0/> ;
    dc1:title "Agent Event Ontology"@en ;
    owl:imports abi:EventService .

agent:agentName a owl:DatatypeProperty ;
    rdfs:label "agent name"@en ;
    rdfs:domain agent:AgentAIMessageEmitted,
        agent:AgentInvocationCompleted,
        agent:AgentModelCalled,
        agent:AgentRouted,
        agent:AgentToolCalled,
        agent:AgentToolResponded,
        agent:AgentUserMessageReceived ;
    rdfs:range xsd:string ;
    skos:definition "Name of the Agent that produced the event."@en .

agent:chatId a owl:DatatypeProperty ;
    rdfs:label "chat id"@en ;
    rdfs:domain agent:AgentAIMessageEmitted,
        agent:AgentInvocationCompleted,
        agent:AgentModelCalled,
        agent:AgentRouted,
        agent:AgentToolCalled,
        agent:AgentToolResponded,
        agent:AgentUserMessageReceived ;
    rdfs:range xsd:string ;
    skos:definition "Identifier of the conversation/thread (typically Agent thread_id)."@en .

agent:container a owl:DatatypeProperty ;
    rdfs:label "container"@en ;
    rdfs:domain agent:AgentAIMessageEmitted,
        agent:AgentInvocationCompleted,
        agent:AgentModelCalled,
        agent:AgentRouted,
        agent:AgentToolCalled,
        agent:AgentToolResponded,
        agent:AgentUserMessageReceived ;
    rdfs:range xsd:string ;
    skos:definition "Name of the container the invocation is made in (abi:..., e.g. a Nexus workspace's), when known."@en .

agent:content a owl:DatatypeProperty ;
    rdfs:label "content"@en ;
    rdfs:domain agent:AgentAIMessageEmitted,
        agent:AgentInvocationCompleted,
        agent:AgentToolResponded,
        agent:AgentUserMessageReceived ;
    rdfs:range xsd:string ;
    skos:definition "Full rendered content (user prompt, assistant message text, tool response payload, or final invocation output)."@en .

agent:contentLength a owl:DatatypeProperty ;
    rdfs:label "content length"@en ;
    rdfs:domain agent:AgentAIMessageEmitted,
        agent:AgentInvocationCompleted,
        agent:AgentToolResponded,
        agent:AgentUserMessageReceived ;
    rdfs:range xsd:integer ;
    skos:definition "Character length of the rendered content. Kept alongside the full content for cheap filtering."@en .

agent:routedTo a owl:DatatypeProperty ;
    rdfs:label "routed to"@en ;
    rdfs:domain agent:AgentRouted ;
    rdfs:range xsd:string ;
    skos:definition "Name of the (sub)agent the conversation was routed to."@en .

agent:toolArgs a owl:DatatypeProperty ;
    rdfs:label "tool args"@en ;
    rdfs:domain agent:AgentToolCalled ;
    rdfs:range xsd:string ;
    skos:definition "JSON-serialized arguments the agent passed to the tool."@en .

agent:toolCallId a owl:DatatypeProperty ;
    rdfs:label "tool call id"@en ;
    rdfs:domain agent:AgentToolCalled,
        agent:AgentToolResponded ;
    rdfs:range xsd:string ;
    skos:definition "Correlation id linking a tool call to its response."@en .

agent:toolName a owl:DatatypeProperty ;
    rdfs:label "tool name"@en ;
    rdfs:domain agent:AgentToolCalled,
        agent:AgentToolResponded ;
    rdfs:range xsd:string ;
    skos:definition "Name of the tool that was called or responded."@en .

agent:userId a owl:DatatypeProperty ;
    rdfs:label "user id"@en ;
    rdfs:domain agent:AgentAIMessageEmitted,
        agent:AgentInvocationCompleted,
        agent:AgentModelCalled,
        agent:AgentRouted,
        agent:AgentToolCalled,
        agent:AgentToolResponded,
        agent:AgentUserMessageReceived ;
    rdfs:range xsd:string ;
    skos:definition "Identifier of the human user the agent is acting on behalf of, when known."@en .

agent:workspaceId a owl:DatatypeProperty ;
    rdfs:label "workspace id"@en ;
    rdfs:domain agent:AgentAIMessageEmitted,
        agent:AgentInvocationCompleted,
        agent:AgentModelCalled,
        agent:AgentRouted,
        agent:AgentToolCalled,
        agent:AgentToolResponded,
        agent:AgentUserMessageReceived ;
    rdfs:range xsd:string ;
    skos:definition "Identifier of the workspace/tenant the invocation belonged to, on events recorded before container paths. No longer populated: see container."@en .

agent:AgentModelCalled a owl:Class ;
    rdfs:label "AgentModelCalled"@en ;
    rdfs:subClassOf abi:LogProcess ;
    skos:definition "Emitted just before an agent invokes its chat model."@en .

agent:AgentRouted a owl:Class ;
    rdfs:label "AgentRouted"@en ;
    rdfs:subClassOf abi:LogProcess ;
    skos:definition "Emitted when an agent routes the conversation to a different (sub)agent."@en .

agent:AgentAIMessageEmitted a owl:Class ;
    rdfs:label "AgentAIMessageEmitted"@en ;
    rdfs:subClassOf abi:LogProcess ;
    skos:definition "Emitted when an agent surfaces an AI message to the user (not a tool call)."@en .

agent:AgentInvocationCompleted a owl:Class ;
    rdfs:label "AgentInvocationCompleted"@en ;
    rdfs:subClassOf abi:LogProcess ;
    skos:definition "Emitted once at the end of an Agent.stream_invoke run with the final response length."@en .

agent:AgentUserMessageReceived a owl:Class ;
    rdfs:label "AgentUserMessageReceived"@en ;
    rdfs:subClassOf abi:LogProcess ;
    skos:definition "Emitted once when an agent receives a user prompt at the entrypoint (stream/invoke/stream_invoke)."@en .

agent:AgentToolCalled a owl:Class ;
    rdfs:label "AgentToolCalled"@en ;
    rdfs:subClassOf abi:LogProcess ;
    skos:definition "Emitted when the agent decides to invoke a tool (one event per tool call in the message)."@en .

agent:AgentToolResponded a owl:Class ;
    rdfs:label "AgentToolResponded"@en ;
    rdfs:subClassOf abi:LogProcess ;
    skos:definition "Emitted when a tool returns a response back to the agent."@en .

