Collection API
[!NOTE] The collection API is experimental (v0). It is part of the
agentkitmodule, which is outside the project’s support lifecycle, and it may change.
health-validation run returns a verdict. The collection API returns the raw
measurements instead: one collection cycle per request, with no checks
evaluated. Use it when an agent or service needs node-local evidence and wants to
evaluate it elsewhere.
The agentkit server exposes the same call over gRPC and HTTP on a single
address. Both return an ObservationBatch. The server is plaintext only and has
no TLS.
The address above is the default of the server-simple-collect example in
agentkit/examples/. agentkit is a library, so you run your own binary built
on server.Serve, and you choose the address and which sensors to register.
Differences from the API Reference
The API Reference is generated from collect/proto and documents the gRPC
call. Two things differ from what the HTTP endpoint returns:
- Field names. HTTP responses use the standard protobuf JSON mapping, so
names are lowerCamelCase (
collectionId,gpuSnapshots). The reference example shows the proto names (collection_id,gpu_snapshots). - Optional fields. The reference example wraps proto3
optionalfields in an extra object, such as_brand. In real JSON the field appears directly, asbrand.
The same data from the CLI
health-validation collect writes the same ObservationBatch as JSON to stdout
without starting a server. See Integrating into a GPU
cluster for how to ship it.