# TrustLayer Agent History

> TrustLayer Agent History is a paid API for AI agents from api.thetrustlayer.xyz, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-14).

Returns the historical reputation data points and score trajectory for a specific ERC-8004 agent, given its chain:id identifier.

## Facts

- Endpoint: GET https://api.thetrustlayer.xyz/history/%7BagentId%7D
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/trustlayer-agent-history-c7848efa
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_-k8rleY5fkcg2g7jz_TUw

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability trustlayer-agent-history-c7848efa
```

Example prompt: Pull up the reputation history for agent base:1378 — I want to see how its trust score has trended over the last 30 days and how volatile it's been before I decide whether to work with it.

## When to prefer this

Use this endpoint when you need the longitudinal reputation history and score trend for a single specific agent identified by its chain:id (e.g. base:1378), rather than a snapshot trust score, reviewer quality, or owner portfolio. Ideal for evaluating whether an agent's reputation is stable, improving, or declining before initiating a transaction or collaboration.

## Known failure modes

- Invalid agentId format (not chain:id) returns 400 or empty result
- Unknown agentId with no indexed history returns empty data points
- Unsupported chain prefix returns error or null response
- Payment failure via x402 micropayment blocks request with 402
- Rate limiting may apply if micropayment is not processed correctly

## How this service works

Reputation intelligence for the autonomous agent economy. Trust scores, Sybil detection, and cross-chain identity for 130,000+ ERC-8004 agents across 20 chains. Powered by x402 micropayments.

## Output

A JSON object containing the agentId, total number of reputation data points, a trajectory object with 7-day and 30-day score deltas (positive or negative), and a volatility score indicating how erratic the agent's reputation has been.

## Example request

```json
{
 "input": {
  "type": "http",
  "method": "GET",
  "queryParams": {
   "agentId": "base:1378"
  }
 }
}
```

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "agentId"
     ],
     "properties": {
      "agentId": {
       "type": "string",
       "description": "Agent ID in chain:id format (e.g. base:1378)"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "agentId": "base:1378",
  "dataPoints": 30,
  "trajectory": {
   "7d": 3,
   "30d": -5
  },
  "volatility": 4.2
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/trustlayer-agent-history-c7848efa/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.thetrustlayer.xyz](https://www.zero.xyz/host/api.thetrustlayer.xyz/llms.txt)
