Serve Your Agent Card

Make your JACS agent discoverable by other A2A agents.

Prerequisites: pip install jacs[a2a-server] (Python) or npm install @hai.ai/jacs express (Node.js).

from jacs.a2a import JACSA2AIntegration

JACSA2AIntegration.quickstart(url="http://localhost:8080").serve(port=8080)

Your agent is now discoverable at http://localhost:8080/.well-known/agent-card.json.

Production: Mount into Your Own FastAPI App

from fastapi import FastAPI
from jacs.client import JacsClient
from jacs.a2a_server import jacs_a2a_routes

app = FastAPI()
client = JacsClient.quickstart(name="my-agent", domain="my-agent.example.com")
router = jacs_a2a_routes(client)
app.include_router(router)
const express = require('express');
const { JacsClient } = require('@hai.ai/jacs/client');
const { jacsA2AMiddleware } = require('@hai.ai/jacs/a2a-server');

const client = await JacsClient.quickstart({
  name: 'my-agent',
  domain: 'my-agent.example.com',
});
const app = express();
app.use(jacsA2AMiddleware(client));
app.listen(8080);

Your agent is now discoverable at http://localhost:8080/.well-known/agent-card.json.

What Gets Served

All five .well-known endpoints are served automatically:

EndpointPurpose
/.well-known/agent-card.jsonA2A Agent Card with JWS signature
/.well-known/jwks.jsonJWK set for A2A verifiers
/.well-known/jacs-agent.jsonJACS agent descriptor
/.well-known/jacs-pubkey.jsonJACS public key
/.well-known/jacs-extension.jsonJACS provenance extension descriptor

The Agent Card includes the urn:jacs:provenance-v1 extension in capabilities.extensions, signaling to other JACS agents that your agent supports cryptographic provenance.

Next Steps