registry

package module
v0.0.0-...-089f37a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 30, 2026 License: Apache-2.0 Imports: 6 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

registry

An agent-card linter and a small registry for A2A agents.

Few agent cards on the open web are usable by an A2A 1.0 client. A July 2026 probe found 65 cards on 22,341 hosts, and most of those failed basic checks: capabilities sent as an array, 0.x fields, no supportedInterfaces, a legacy path. card-lint catches these problems before a client trips on them, and the registry only lists agents whose cards pass.

Path What it does
lint Check(raw) Report grades a card as conformant, near-conformant or non-conformant, with findings. It checks the raw JSON, so it catches what a typed decode would hide. Fetch gets a card the way clients do: /.well-known/agent-card.json, falling back to the legacy /.well-known/agent.json (which counts as an error).
cmd/card-lint CLI. Exits 1 on errors (-strict also fails on warnings), and -json prints the report as JSON. Use it in CI before you deploy an agent.
server The registry. Agents register by URL, and the registry fetches and lints their card, then re-checks liveness on an interval.
client Go client: Register, Search.
cmd/registry The registry as a server, listening on :7070 by default.

card-lint

go run ./cmd/card-lint https://agent.example.com     # fetches the well-known card
go run ./cmd/card-lint ./agent-card.json             # local file
legacy-card.json: non-conformant
  error   supportedInterfaces   supportedInterfaces is required (a 0.x card declares url + preferredTransport instead; 1.0 clients look here)
  warning preferredTransport    preferredTransport is a 0.x field that 1.0 clients ignore; use supportedInterfaces[].protocolBinding
  warning protocolVersion       protocolVersion is a 0.x field that 1.0 clients ignore; use supportedInterfaces[].protocolVersion
  warning skills[0].tags        tags is required by the spec and is what registries search on
  warning url                   url is a 0.x field that 1.0 clients ignore; use supportedInterfaces[].url

Errors are what break a 1.0 client: required fields from the normative a2a.proto, wrong JSON kinds, relative or non-HTTP URLs. Warnings are fields 1.0 ignores, plain http outside localhost, non-standard bindings, and missing modes or tags.

Registry API

Request Result
POST /agents {"url": "https://agent.example.com"} 201 with the entry, or 422 with the lint report if the card has errors
GET /agents?skill=quote Agents with a skill whose ID or tag is quote
GET /agents?q=north Text search over name, description and skills
GET /agents?all=1 Also non-conformant and unreachable agents
GET /api/check?url=… Lint without registering
GET /, GET /check HTML listing and a check form

Results are ranked by grade, then by latency in 100 ms bands, then by name.

The registry is an index, not the source of truth. Clients should fetch the card from the agent itself before calling it (the example buyer agent does this), and later verify its JWS signature.

Roadmap

  • Verified domains (signed card plus JWKS), search by input/output mode and extension, opt-in traffic reputation.
  • A card-lint GitHub Action.
  • A public registry, with self-hosted private registries staying open source.

Development

go vet ./... && go test -race ./...

License

Apache-2.0

Documentation

Overview

Package registry holds the types shared by the registry server and its client.

The registry is an index, not the source of truth. It records where an agent's card lives and how good it is, while clients still fetch the card from the agent's own domain before they call it.

Index

Constants

View Source
const LatencyBandMS = 100

LatencyBandMS is the latency resolution used for ranking: agents within the same band are ordered by name, so a few milliseconds of jitter do not reshuffle results.

Variables

This section is empty.

Functions

func Compare

func Compare(a, b *Entry) int

Compare orders search results: best grade first, then lowest latency band, then name.

Types

type Entry

type Entry struct {
	// URL is the base URL the agent was registered with.
	URL string `json:"url"`
	// CardURL is where the card was actually served.
	CardURL string `json:"cardUrl"`
	// Card is nil when the card could not be decoded.
	Card   *a2a.AgentCard `json:"card,omitempty"`
	Report lint.Report    `json:"report"`

	Registered time.Time `json:"registered"`
	LastSeen   time.Time `json:"lastSeen"`
	LatencyMS  int64     `json:"latencyMs"`
	Up         bool      `json:"up"`
	LastError  string    `json:"lastError,omitempty"`
}

Entry is one registered agent.

func (*Entry) Name

func (e *Entry) Name() string

Name returns the card name, or the URL when there is no card.

type Query

type Query struct {
	// Skill matches a skill ID or a skill tag.
	Skill string
	// Text matches the agent name or description, case-insensitively.
	Text string
	// IncludeNonConformant also returns agents whose card has errors.
	IncludeNonConformant bool
	// IncludeDown also returns agents that failed their last liveness check.
	IncludeDown bool
}

Query filters a search. Empty fields match everything.

func (Query) Matches

func (q Query) Matches(e *Entry) bool

Matches reports whether the entry satisfies the query.

Directories

Path Synopsis
Package client talks to a registry server: agents register themselves, and orchestrators search for agents by skill.
Package client talks to a registry server: agents register themselves, and orchestrators search for agents by skill.
cmd
card-lint command
Command card-lint grades an A2A agent card against A2A 1.0.
Command card-lint grades an A2A agent card against A2A 1.0.
registry command
Command registry runs an A2A agent registry with a card checker.
Command registry runs an A2A agent registry with a card checker.
Package lint grades an A2A agent card against the A2A 1.0 AgentCard definition.
Package lint grades an A2A agent card against the A2A 1.0 AgentCard definition.
Package server is a small A2A agent registry: agents register their base URL, the server fetches and grades the card, re-checks liveness in the background, and answers searches by skill.
Package server is a small A2A agent registry: agents register their base URL, the server fetches and grades the card, re-checks liveness in the background, and answers searches by skill.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL