The MARS v1 contract

A common language.For useful software.

One record format for capabilities, publishers, and the history between them. Build against the same contract whether you are publishing one tool or operating your own registry.

  • 14 concrete entry types
  • 35 HTTP operations
  • Rust-derived schemas
A closer lookA common language, drawn in the open.

The specification gives independent implementations a shared structure for entries, identity, and discovery.

  1. 01Define the entry
  2. 02Connect the contracts
  3. 03Build independently

One contract. Clear ownership.

MARS registers, resolves, discovers, and manages software capabilities. mars-protocol defines the canonical types; mars-server implements the reference HTTP service. Its generated OpenAPI v1 document is the integration contract.

This is a practical guide to that implementation. Research documents describe a broader distributed architecture; the current production profile persists records in PostgreSQL. Sigil anchoring is staged, and MARS-S is a sharding draft.

A place for every kind of work.

The concrete EntryType enum contains ten OAS-aligned kinds and four MAP plugin kinds. Each travels in the same MarsEntry envelope, with its own payload schema.

  • AgentDefinitionAn autonomous agent
  • ToolDefinitionAn invocable tool
  • SkillDefinitionA composable skill
  • WorkflowDefinitionA multistep workflow
  • ModelDefinitionA model and its metadata
  • DatasetDefinitionA dataset and its provenance
  • ServiceDefinitionAn infrastructure or API service
  • OrganizationDefinitionAn autonomous organization
  • HumanRootRecordA human identity root
  • MultiHumanRootRecordA threshold group identity root
  • MapPluginA plugin definition
  • MapPluginReleaseA specific plugin release
  • MapIntegrationSchemaAn integration type
  • MapPluginCollectionA curated plugin bundle

More than a name in a list.

An entry combines its DID, type, name, semantic version, publisher DID, publication time, payload schema, payload hash, and publisher signature. Tags and lifecycle state help readers understand what they have found.

Optional relationships, service endpoints, lineage, semantic annotations, and bond information add context. The record makes these facts inspectable; it does not establish that every publisher claim is true. HTTPS endpoints are consumable today, while other endpoint schemes can be stored for forward compatibility.

Read the record and signing guide →

The publisher signs their contribution.

MARS-PUBLISHER-SIGNING-V1 uses Ed25519 over JCS-canonical publisher-authored fields. An explicit exclusion list removes registry-managed projections such as sequence, lifecycle, attestations, and anchor state before signing.

Every unlisted field remains signed, including publisher identity, payload, payload hash, and bond claims. Production validation binds the signature key controller to the publisher and uses operator-configured trust pins. Registry projections can evolve without silently changing publisher provenance.

Keep the history. Make change explicit.

Resolve the latest entry, request a specific version, or page through newest-first history. Lifecycle states describe how a record should be used:

  • draft
  • active
  • deprecated
  • archived
  • revoked
  • experimental

Revocation is irreversible in the lifecycle model, and revoked records remain inspectable. Ownership changes through a signed, expiring offer followed by explicit recipient acceptance. The offer binds the current entry sequence; creating an offer alone does not transfer ownership.

Evidence you can inspect.

Attestations attach OAS verifiable credentials to entries. The server checks signature, issuer, subject, and time validity before durable storage. Reads omit expired and revoked attestations by default. An attestation count describes records, not necessarily distinct independent issuers.

Publisher bond policy is configurable, and identity-root records do not require a bond. The current bond implementation is registry-local. Its MINTS denomination does not imply external escrow, payouts, or automatic refunds. Reports are attributed to the authenticated principal.

Ask a precise question.

MARS-QL filters complete registry entries by type, tags, publisher, lifecycle, version, lineage, bond amount, and supported nested metadata. Queries combine conditions with AND, then apply ordering, a bounded limit, and an optional opaque cursor.

Discovery returns entries, totalCount, cursor, and hasMore. Cursors are signed, expiring, and bound to the query. The language is a bounded DISCOVER DSL; SQL joins, projections, and aggregation are outside its contract.

Explore MARS-QL →

Choose who you exchange with.

Federation is off by default. Operators configure peers, pinned keys, agreements, and scope. Registry-to-registry requests use signed envelopes with recipient, timestamp, nonce, and request binding; a bare sync payload is not an authenticated request.

After signature verification, conflict policy prefers a matching locally confirmed anchor, then the higher sequence, then the lexically lower canonical digest. Federated discovery is separately enabled and capability-protected, with explicit partial-result metadata.

Read the federation guide →

Follow the catalog as it changes.

GET /v1/ws upgrades to a WebSocket connection. Subscriptions can select entry types, namespaces, event names, or DIDs. The wire contract defines eight event names:

  • entry.created
  • entry.updated
  • entry.revoked
  • entry.transferred
  • entry.attested
  • entry.reported
  • bond.slashed
  • federation.sync

These are contract names. Which events are emitted depends on the enabled operations and deployment configuration.

Your infrastructure. Explicit policy.

The Rust reference service runs with PostgreSQL and configured authentication, signing, trust, and cursor secrets. SIWS is the concrete user authentication profile. Writes require a session, a relevant capability, and route-scoped idempotency; federation uses its own signed peer identity.

Public health is separate from protected deep health. Operators can inspect peer lag and quarantine state, and explicitly retry or abandon anchor intents. Sigil authority progresses from shadow mode through admitted private canary evidence to governed activation. MARS-S and distributed Weave persistence remain separate from the current PostgreSQL profile.

All 35 API operations →