Agent Legal Context
Getting Started

Part 2: Discovery

Serve legal-context.json at your domain. Enable any agent to discover your terms in a single HTTP call.

Part 2 adds machine discovery. Any agent can find your terms, verify them, and interact with them through a standard API -- all from a single well-known URL.


Create a file at /.well-known/legal-context.json on your domain:

{
  "version": "1.0",
  "contentHash": "0x7f83b1657ff1fc53b92dc18148a1d65dfc2d4b1fa3d677284addd200126d9069",
  "api": "https://api.integraledger.net/v1/records/0xabcdef1234567890"
}

Serve it over HTTPS. That is the entire integration.


What the API Provides

The api field points to an ALC API endpoint that fronts your on-chain record. Through this single endpoint, any agent can:

ActionEndpointWhat It Returns
Get record metadataGET /v1/records/{recordId}contentHash, state, version history, resolver references
Get terms documentGET /v1/records/{recordId}/termsThe exact document bytes (verifiable against the hash)
Verify a hashGET /v1/verify/{contentHash}Whether the hash is valid, which record it belongs to
Get contact infoGET /v1/records/{recordId}/contactLegal, technical, and dispute contacts
Get dispute processGET /v1/records/{recordId}/disputeMethod, jurisdiction, automated resolution details

All GET endpoints are publicly accessible. No authentication required for reading.


Creating the On-Chain Record

Before you can serve legal-context.json, you need an on-chain record. You can create one via the API:

POST /v1/records
{
  "terms": {
    "url": "https://your-domain.com/terms"
  },
  "resolvers": {
    "documentLocation": true,
    "contact": {
      "legal": "legal@your-domain.com",
      "technical": "support@your-domain.com"
    },
    "disputeResolution": {
      "method": "Internal review",
      "jurisdiction": "Delaware, USA"
    }
  }
}

The API will:

  1. Fetch your terms document and snapshot the exact bytes
  2. Compute the contentHash
  3. Create the on-chain record
  4. Return the recordId, contentHash, and API URL

Put the contentHash and API URL in your legal-context.json. Done.


Three Hosting Options

You choose where the API runs:

OptionSetupControl
Hosted (e.g., Integra)Use a hosted ALC API URL directly. Zero infrastructure.Provider operates
Self-hostedRun the API yourself, point at your own on-chain records.Full control
Third-partyA platform or consortium hosts for its members.Shared

All three serve the same endpoints with the same response schemas. The choice is invisible to agents.


What You Get at Part 2

CapabilityStatus
Document integrityYes
Timestamp proofYes
Terms-to-payment bindingYes (from Part 1)
Machine-discoverable termsYes -- agents fetch legal-context.json
Verification APIYes -- agents verify hashes via the API
Contact informationYes -- structured contact data via API
Dispute processYes -- dispute resolution details via API
Per-protocol integrationNo -- requires Part 3
Explicit acceptanceNo -- requires Part 3
Full dispute resolutionNo -- requires Part 4

Next: Protocol Extensions

Part 2 gives agents discovery and verification. Part 3 embeds the contentHash into existing payment protocol flows, creating automatic per-transaction terms binding.