ONVIF Agentic Service - #809
ocampana-videotec wants to merge 30 commits into
Conversation
| <mediaobject> | ||
| <imageobject> | ||
| <?oxy_comment_start author="Ottavio Campana" timestamp="20260729T095751+0200" comment="Image to be redone from scratch"?> | ||
| <imagedata fileref="media/AI/stack_overview.svg" contentwidth="140mm" |
|
PR specifies a persistent HTTP GET /mcp carrying newline-delimited notifications. MCP 2026-07-28 explicitly removed the GET stream. Requests use POST; long-lived notifications use the SSE response to subscriptions/listen. Independent notifications/message events cannot simply be placed on a permanent GET stream. Official MCP Streamable HTTP specification. |
|
server/discover is incorrectly mandatory as the first call. A server must support it, but a modern client may call any operation directly and handle UnsupportedProtocolVersionError. The PR currently says the client shall call it first. |
@willysagefalk Do you have a reference for that? |
|
@ocampana-videotec Yes. The normative reference is the MCP 2026-07-28 specification, Discovery — When to Call: https://modelcontextprotocol.io/specification/2026-07-28/server/discover#when-to-call It states that calling The same section only recommends calling it first for a dual-era client over stdio, as a backward-compatibility probe. Since the ONVIF proposal uses HTTP POST, that stdio-specific recommendation does not apply. I therefore suggest replacing:
with something along these lines:
|
Corrected. |
|
@willysagefalk , following our conversation, I just added chapter 9 about metadata. As you can see it defines abstract concepts and for Observations and Provenance it proposes two specialization. SOSA/SSN was included to accommodate @DammnAI 's feedback in https://github.com/onvif/wg_AI/pull/9 , while the JLDS-based provenance is my proposal based on an already existing specification. If any member wants to model an Observation, they can simply propose a similar derivation. |
|
Thanks for adding the metadata chapter. I suggest that we now use this PR as the working integration point and complete the model here. I reviewed head The following changes are needed before the draft can become an implementable specification. Blocking implementation issues
Information-model changes requiring WG agreement
One editorial cleanup: the PR description should describe the minimum information model in vendor-neutral ONVIF terms. The abstract-class and specialization direction is useful. The main work now is to make the boundaries explicit and ensure the transport, JSON-LD, schema, and signature mechanisms can be implemented and tested consistently. |
|
Sorry @willysagefalk but we need to find a more efficient way to tackle the document, we cannot just copy&paste tons of lines from an LLM. For the future, we need IMHO to be shorter a more focused. Point 1: I will study it, it looks correct. Point 2: I have no idea right now. It's generated by the linkml tools... Point 3: I intentionally got rid of ecdsa-rdfc-2019 in order to point our specs to the ONVIF Security Baseline. Point 4: The yaml file is broken, I know it very weak, there is even a note in the AI.xml that that part will have to be removed and be put in the ai.yaml. We are simply too far now to allocate time to it. Point 5: what is the problem here? beyond a style issue, I really see no problem for the observation to be to top level container. Point 6: how is it defined in SOSA? We do not want to diverge. If this is not good enough, then we have a reason to ditch SOSA Point 7: this looks like point 5. What is the use case we are trying to solve? Point 8: I agree and in fact we are starting to work on Annex A. The problem is that before creating an example we must clarify how it will work. Therefore, the immediately actionable items are: 1, 3 and 6. |
|
I suggest extending the model with a neutral Assertion type alongside Observation, together with an ObjectObservation specialization: InformationEntity ObjectObservation represents an observation concerning one persistent PhysicalObject. It groups the Claims produced within that observation context and may include observed positions or other object-related information. Assertion is not an Observation. It expresses a proposition, relationship or conclusion and can reference Observations as supporting evidence. Statement and Claim are concrete specializations of Assertion. For example, in RE-ID: ObjectObservation A ObjectObservation B Re-identification Claim SOSAObservation remains available for SOSA interoperability, but it does not need to be the foundation of the ONVIF information model. ObjectObservation and SOSAObservation describe different aspects, so a sensor-based ObjectObservation may also be mapped to SOSA. |
|
@willysagefalk let's start clarifying the definition of the abstract classes involved in metadata streaming. Once we clarify them, we can specialize stuff like ObjectObservation, PhysicaObject and so on. My definitions:
I do have a few ideas I am working for for statement, but I do not have a clear understanding of the difference between Claim and Assertion. My idea is that, if we are talking about abstract classes, assertions, claims and statements are the same thing. If that's the case we could have To my eyes, InformationEntity is an empy container, it's just a waste of bandwidth. We do not need to wrap a rich container (Observation) with an empty conatiner (InformationEntitiy) From assertion we could derive a statement, and for the statement use the idea of the predicate we were discussing at the Budapest meeting. |
|
InformationEntity is not intended as a serialized wrapper around an Observation, so it adds no bandwidth. It is only the neutral abstract superclass that allows both Observations and Assertions to be top-level information types. An Observation represents an observation/perception context and may contain Assertions produced during that observation. An Assertion represents a proposition or conclusion and may reference one or more Observations as evidence. For example, a RE-ID Assertion that two observations concern the same physical object cannot naturally belong to only one of those observations. I agree that we should first settle these two abstract definitions. We can then clarify the precise distinction between Statement and Claim and add specializations such as ObjectObservation. |
|
I am still having difficulties to understand clearly the difference between an Assertion and an Observation I am good with "An Observation represents an observation/perception context and may contain Assertions produced during that observation". But then I see a logical problem in "An Assertion represents a proposition or conclusion and Why may? Observations may exist without Assertions, but in my understanding Assertions cannot exist outside of an Observation. It is a must, not a may in my opinion. Assertions without observation are, de facto, Observations. Do you agree on this? |
|
The foundation should define only AuthenticityProof. The WG shall evaluate at least an embedded W3C Data Integrity proof and a manifest-based proof. Data Integrity is suitable for independently protected JSON-LD items; a manifest-based profile is likely better for batched envelopes, extraction, provenance chains and multiple producers. |
I disagree on this, I see no value in having two mechanisms of the same thing, Verifiable Credential Data Integrity already exists and does not need to be invented from scratch. The manifest approach is chatter, not exsisting and most important, it is not clear what problem solves that Verifiable Credential Data Integrity does not. Anyway, as discussed in today's telco, I will open a work item in video enhancement. WG AI does not have the compenecy in cryptography that we need to discuss this |
Proposed AI information-model work itemsBased on the discussion, I propose dividing the information-model work into the following four work items. The common time concepts are included in the same work item as objects, observations, and assertions. 1. Objects, Observations, Assertions, and TimeDefine the core model for representing perceived objects, observations, and conclusions derived from observations. Scope
Expected output
This work item does not define spatial topology or authenticity mechanisms. 2. Space, Topology, and Coordinate SystemsDefine how physical and logical spaces are represented and how objects, observations, and assertions refer to them. Scope
Expected output
Temporal semantics are defined by Work Item 1 and should not be independently redefined here. 3. Information Envelopes, Provenance, and AuthenticityDefine how information items are packaged, attributed, transported, and protected. Scope
Expected output
This work item should distinguish provenance—where information came from—from authenticity—how its integrity and origin can be verified. 4. SOSA/SSN and External Semantic InteroperabilityDefine how the ONVIF information model interoperates with SOSA/SSN and other relevant semantic models without making those models mandatory for basic ONVIF implementations. Scope
Expected output
SOSA alignment should remain an interoperability layer. It should not prevent ONVIF from defining the concepts required by physical-security systems. |
|
Following the call of WG AI on Aug 12th, this draft PR was broken down into several parts, as listed in the top comment. This PR is still open, to accommodate @bsriramprasad 's feedback in #818 and to revert the changes on the Security service. Once these items are done, I think that we can let circulate the first draft at the F2F meeting in Prague, |
| required: true | ||
| description: Production timestamp of the information item. | ||
| provenance: | ||
| range: Provenance |
There was a problem hiding this comment.
To make the information item more useful we should instead link to a process. Every information item is created by some process. That process have have different types of provenance information such as things like version, dependencies, inputs etc.
Separately from this lineage information can be added to link this information item to other information items that it was derived_from.
There was a problem hiding this comment.
In my proposal, Provenance is abstract to allow modelling different "authors" of statements: for example it can be a process, a person or a device. I am open to deriving a ProcessProvenance
| description: >- | ||
| Abstract production-time descriptor for an InformationItem. | ||
| attributes: | ||
| extensible: |
There was a problem hiding this comment.
Can't we extend by subclassing or sending separate information items? Generic extension fields give no clear migration path to the standard.
There was a problem hiding this comment.
The extensible attribute for proprietary extensions is here just to automatically inherit it in real classes. Just to avoid having to repeat it in every class (and have the risk of forgetting it)
IQSIGHT high level commentsWe suggest to first align on the overall structure before looking at details. ScopeThis section defines some acronyms. It should contain what the spec covers.
Acronyms
Overview and ArchitectureSuggest to have one or two informative sections describing the overall concept RequirementsAs other ONVIF specs the specification should focus on device requirements. Section 8 Service Discovery and Data ExchangeAvoid requiring devices to support two schema representationsLooks like section 8.3.2 requires schema in LinkML and 8.3.4 in JSON schema. Prefer using only JSON on device level for maximum interoperability. Section 8.4.2 and 8.4.3We really like the analytics functionality. Making these functions mandatory for every Additionally the parameters of these functions should have some attention. Classical ONVIF APIsShouldn't we include here the proposal for mapping ONVIF functions to MCP? Metadata Event DeliveryThis section should be named Event or Message Delivery. 9 Authentication and AuthorizationDistinguish between MCP request authorization and message signing. 10 MetadataThis section defines events not metadata. 10.5.1.2 Proof fieldsHard to imagine how to maintain access to public keys of large distributed systems. |
|
I agree that we should align the scope, architecture and terminology before continuing with the detailed schemas and message flows. A few proposed conclusions:
The specification should clearly state that the Agentic Service complements existing ONVIF services. We should not redefine ONVIF Device or ONVIF Client as MCP-specific concepts. In the MCP sections, we can instead use the established terms MCP Server, MCP Client and MCP Host. “Metadata Event Delivery” should be renamed to “Event Delivery” or “Message Delivery”. The unused WSDL-MCP Bridge term should either be given a clear architectural role or removed.
The current background and architecture sections can be simplified into one or two informative sections showing how the Agentic Service relates to existing ONVIF services. Normative requirements should primarily apply to the service implementation. Client requirements should only be included where they are necessary for interoperability.
I agree that a device should not be required to expose both LinkML and JSON Schema. LinkML can remain the normative source model used by ONVIF, while JSON Schema, MCP inputSchema and the JSON-LD context are generated runtime artifacts exposed by the service. The schema identifier and JSON-LD context should remain separate.
I agree that the current three mandatory Skills are too restrictive. Generic MCP discovery should form the baseline. Analytics-specific tools should be conditional capabilities mandatory only when advertised and should align with the existing ONVIF analytics specifications.
This is an important part of the architecture. We should show two separate implementation paths: devices that expose the Agentic Service natively, and an ONVIF-to-MCP gateway that communicates with existing products through their current ONVIF APIs while exposing their capabilities as MCP tools and resources. This allows existing ONVIF products to participate without firmware changes.
These are separate concerns. JWT bearer tokens authorize individual MCP requests. InformationItem or InformationEnvelope signatures provide durable integrity and producer authenticity after information has been forwarded or stored. An access JWT cannot replace such a signature.
I suggest renaming this chapter to Information Model. Observation, Assertion, InformationItem, provenance and envelopes are information objects. They may be delivered as events, but they may also be retrieved, stored or referenced by other information objects. |
|
@HansBusch and @willysagefalk we have a problem here. In the Model Context Protocol (MCP), the Therefore either we accept both LinkML and JSON Schema, or we must check whether we can replace LinkML with JSON Schema. |
|
@ocampana-videotec Yes, that’s what I meant: use LinkML to maintain the ONVIF model and generate JSON Schema for MCP. Devices would only need to expose JSON Schema, so they wouldn’t have to support both. |
let's double check we are understanding the same thing: you want to use LinkML just to generate JSON Schema and then all the description of services and data exchanged between clients and devices will be with JSON Schema. Is this understanding correct? |
|
Yes, that’s the idea. We maintain the ONVIF model in LinkML and generate the JSON Schema used by devices and clients. They exchange JSON data, with JSON-LD context where needed, without having to handle LinkML. |
|
Closing as agreed during the Prague F2F meeting. The development will continue in the AI/spec branch until a new PR will be created. |
Initial draft pull request to gather feedback on the AI specs being written right now.
Current status
AI.xmlis been writtenSecurity.xmlTentative scheduling
Topics to be included
Work items generated during this discussion
I expect this PR to be used as a shared notepad about the specs begin developed. Once ready, this will be closed a new a formal PR will be created.