Build with agents
Analyse LocalMark's open dataset
Download a dated JSON Lines snapshot, verify its checksum, analyse normalized observations and compare archives while preserving licence scope and evidence limits.
Before you start
- Python 3.10 or newer; the example uses only its standard library.
- Enough memory for the compressed download and space for any files you choose to save. The example itself writes no files.
1. Choose live evidence or a dated snapshot
Use the dataset for reproducible analysis across the directory. Use the verify API when you need the latest stored evidence about one agent. A daily export captures a point in time; downloading it later does not refresh its checks.
Start with /data/latest.json. Its manifest names a dated JSONL file and gzip copy, their SHA-256 checksums, sizes, schema version and record count. /data/index.json lists available daily and monthly snapshots with explicit URLs. Discover archived files from the index instead of assuming every calendar date exists.
Daily downloads have a retention window, while the first available monthly snapshot is retained without a scheduled expiry. A month that began after collection started may use a later first date. Preserve the actual snapshot date in a report rather than relabelling it as a month-end census.
2. Download, verify and count normalized probe states
Save this as analyse_localmark.py and run python analyse_localmark.py. It downloads the current manifest and its named gzip file, verifies the compressed checksum before parsing, checks duplicate IDs and confirms the record count. Download and decompression caps make unexpectedly large inputs fail clearly instead of consuming unbounded memory.
The script reads LocalMark's normalized probe state. A raw HTTP 404 can accompany a valid A2A task-not-found response, so counting status codes alone would misclassify some working protocol endpoints. The normalized state and reason code preserve that distinction.
Show complete PYTHON example (51 lines)
from collections import Counter
import gzip
import hashlib
import io
import json
import re
from urllib.request import Request, urlopen
BASE = "https://localmark.ai"
def download(path, limit):
request = Request(BASE + path, headers={"User-Agent": "LocalMarkDatasetExample/1.0"})
with urlopen(request, timeout=30) as response:
data = response.read(limit + 1)
if len(data) > limit:
raise ValueError("Download exceeds this example's size limit")
return data
manifest = json.loads(download("/data/latest.json", 100_000))
filename = manifest["gzip_file"]
if not re.fullmatch(r"[0-9]{4}-[0-9]{2}-[0-9]{2}\.jsonl\.gz", filename):
raise ValueError("Unexpected snapshot filename")
compressed = download("/data/" + filename, 32_000_000)
if hashlib.sha256(compressed).hexdigest() != manifest["gzip_sha256"]:
raise ValueError("Compressed-file checksum mismatch; do not analyse it")
states = Counter()
agent_ids = set()
rows = 0
unpacked = 0
with gzip.GzipFile(fileobj=io.BytesIO(compressed)) as source:
while True:
line = source.readline(1_000_001)
if not line:
break
unpacked += len(line)
if unpacked > 64_000_000 or len(line) > 1_000_000:
raise ValueError("Uncompressed data exceeds this example's limits")
record = json.loads(line)
if record["agent_id"] in agent_ids:
raise ValueError("Duplicate agent ID")
agent_ids.add(record["agent_id"])
rows += 1
probe = record["observations"].get("read_only_a2a_probe") or {}
states[probe.get("state") or "not_recorded"] += 1
if rows != manifest["record_count"]:
raise ValueError("Record count does not match the manifest")
print("Snapshot:", manifest["snapshot_date"], "records:", rows)
for state, count in states.most_common():
print(state, count)
print("Credit: Data: LocalMark (localmark.ai), CC BY 4.0, snapshot", manifest["snapshot_date"])What to expect
The manifest's snapshot date and record count, followed by counts for the observed probe states and a copyable attribution line. Counts change with each snapshot; the code does not embed a headline number.
3. Keep declarations separate from observations
publisher_declared contains information the publisher advertised, such as names, protocol versions and short skill labels. observations contains LocalMark's dated checks and grouping information. Do not describe a declared skill as a capability LocalMark has independently proven.
Useful observation fields include a2a_version_family, signature status, public quality flags, claim status, latest card check, TLS result and the read-only A2A probe. history_url points to the profile's dated history, while last_card_change_at identifies the latest confirmed meaningful change when one is recorded.
Keep missing values visible. No signature observation is not the same thing as a failed signature; no confirmed protocol response is not a finding that an agent is fraudulent. Check the schema version and field notes before combining older files with newer exports.
4. Compare snapshots without inventing an uptime figure
Use the same analysis code and definitions for both dates. Compare the set of card URLs and normalized observations as well as IDs. A canonical listing can absorb alternate addresses; a reduction in row count may therefore reflect a merge rather than an agent disappearing from the Internet.
For a reproducible comparison, save the two manifest entries, checksums, dates, schema versions and your script revision. State the denominator for percentages: all public listings, listings with a recorded probe, or another explicitly defined subset. Keep unsupported or untested transports separate from failed responses.
Two daily snapshots do not measure continuous uptime between those points. The snapshot's 30-day check totals describe scheduled observations, not uninterrupted availability or task success. Use those precise descriptions in charts and reports.
What to expect
A dated comparison with a stated population, methodology and limitations, rather than an undated claim about every agent on the Internet.
5. Credit the data and respect the different rights
LocalMark's observations and compilation are offered under CC BY 4.0. Credit Data: LocalMark (localmark.ai) and include the snapshot date when practical. A link in a README, publication reference or site footer is a useful, low-friction attribution.
Publisher-supplied names, skill labels, links and other Agent Card material remain publisher material; LocalMark does not grant a licence for those fields. Agent names can also be trademarks. Retain the per-record licence markers when sharing derived files so this distinction travels with the data.
The checksum verifies agreement with the manifest, not independent authenticity. Removal requests affect later releases; previously downloaded and dated archives are not rewritten. Do not add private claim information or inferred personal profiles to the public dataset.
Troubleshooting
- Checksum or record count does not match
- Stop analysis and fetch the manifest and its explicitly named dated file again. Do not silently use a partial download.
- A field is missing in an older snapshot
- Check its schema version and release notes. Treat the value as missing rather than fabricating a negative result.
- The example hits a size limit
- Review the manifest sizes and choose deliberate resource limits before increasing the cap.
Examples are checked with read-only requests or isolated fixtures. Email confirmation, publisher changes and paid task authorization remain actions for you to complete. No example grants permission to run a third-party task.