{
  "x402Version": 2,
  "id": 54533,
  "slug": "54533",
  "resource": "https://agent.halowerk.com/v1/memory-compact",
  "description": "Takes a message history and a character budget and returns a shortened history together with a full account of what it cost. Four stages run in fixed order: pin protects messages that must survive (roles listed in keep_roles, the last keep_last_n messages, and anything you marked pin), dedupe removes later near-duplicates of an earlier message of the same role using word-overlap similarity, trim shortens unprotected survivors to max_message_chars at the last sentence boundary, and drop removes…",
  "type": "http",
  "accepts": [
    {
      "scheme": "exact",
      "network": "eip155:8453",
      "payTo": "0x2880EdfFF13100677Bf97A3CBdF3Bc34771C4E5E",
      "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
      "amount": "5000",
      "amountUsd": 0.005,
      "maxTimeoutSeconds": 300
    }
  ],
  "extensions": {
    "bazaar": {
      "info": {
        "input": {
          "body": {
            "budget_chars": 400,
            "duplicate_threshold": 0.9,
            "keep_last_n": 2,
            "keep_roles": [
              "system"
            ],
            "max_message_chars": 120,
            "messages": [
              {
                "content": "You are a logistics dispatcher. Always answer with the shipment id first.",
                "role": "system"
              },
              {
                "content": "Where is shipment DE-4471? It left Hamburg on Monday morning and should reach Lyon by Thursday.",
                "role": "user"
              },
              {
                "content": "DE-4471 is in transit and cleared the Strasbourg hub at 03:10. Estimated arrival in Lyon is Thursday 14:00.",
                "role": "assistant"
              },
              {
                "content": "Where is shipment DE-4471? It left Hamburg on Monday morning and should reach Lyon by Thursday.",
                "role": "user"
              },
              {
                "content": "DE-4471 is still on schedule, no new scan since Strasbourg.",
                "role": "assistant"
              },
              {
                "content": "Good. Book the return leg for Friday.",
                "role": "user"
              }
            ]
          },
          "bodyType": "json",
          "method": "POST",
          "type": "http"
        }
      },
      "schema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "properties": {
          "input": {
            "additionalProperties": false,
            "properties": {
              "body": {
                "additionalProperties": false,
                "properties": {
                  "budget_chars": {
                    "description": "Character budget for the sum of all returned message contents.",
                    "maximum": 400000,
                    "minimum": 100,
                    "type": "integer"
                  },
                  "duplicate_threshold": {
                    "default": 0.9,
                    "description": "Word-overlap ratio from which a later message of the same role counts as a near-duplicate of an earlier one.",
                    "maximum": 1,
                    "minimum": 0.5,
                    "type": "number"
                  },
                  "keep_last_n": {
                    "default": 5,
                    "description": "How many of the most recent messages are protected.",
                    "maximum": 50,
                    "minimum": 0,
                    "type": "integer"
                  },
                  "keep_roles": {
                    "default": [
                      "system"
                    ],
                    "description": "Roles whose messages are protected.",
                    "items": {
                      "enum": [
                        "system",
                        "user",
                        "assistant",
                        "tool"
                      ],
                      "type": "string"
                    },
                    "maxItems": 4,
                    "type": "array"
                  },
                  "max_message_chars": {
                    "default": 400,
                    "description": "Length to which unprotected survivors are trimmed in the trim stage.",
                    "maximum": 4000,
                    "minimum": 80,
                    "type": "integer"
                  },
                  "messages": {
                    "description": "The conversation in order, oldest first.",
                    "items": {
                      "additionalProperties": false,
                      "properties": {
                        "content": {
                          "description": "Message text.",
                          "maxLength": 8000,
                          "minLength": 1,
                          "type": "string"
                        },
                        "id": {
                          "description": "Optional caller-side identifier, echoed unchanged.",
                          "maxLength": 128,
                          "type": "string"
                        },
                        "pin": {
                          "default": false,
                          "description": "If true this message is protected: never trimmed, never dropped.",
                          "type": "boolean"
                        },
                        "role": {
                          "description": "Speaker role.",
                          "enum": [
                            "system",
                            "user",
                            "assistant",
                            "tool"
                          ],
                          "type": "string"
                        }
                      },
                      "required": [
                        "role",
                        "content"
                      ],
                      "type": "object"
                    },
                    "maxItems": 200,
                    "minItems": 2,
                    "type": "array"
                  }
                },
                "required": [
                  "messages",
                  "budget_chars"
                ],
                "type": "object"
              },
              "bodyType": {
                "enum": [
                  "json",
                  "form-data",
                  "text"
                ],
                "type": "string"
              },
              "method": {
                "enum": [
                  "POST",
                  "PUT",
                  "PATCH"
                ],
                "type": "string"
              },
              "type": {
                "const": "http",
                "type": "string"
              }
            },
            "required": [
              "type",
              "method",
              "bodyType",
              "body"
            ],
            "type": "object"
          }
        },
        "required": [
          "input"
        ],
        "type": "object"
      }
    }
  },
  "tags": [
    "bazaar"
  ],
  "sourceHost": "agent.halowerk.com",
  "lastUpdated": "2026-10-08T05:40:22.208Z",
  "quality": {
    "calls30d": 3,
    "uniquePayers30d": 3,
    "lastCalledAt": "2026-10-08T05:40:21.673Z"
  },
  "metadata": {
    "extensions": {
      "bazaar": {
        "info": {
          "input": {
            "body": {
              "budget_chars": 400,
              "duplicate_threshold": 0.9,
              "keep_last_n": 2,
              "keep_roles": [
                "system"
              ],
              "max_message_chars": 120,
              "messages": [
                {
                  "content": "You are a logistics dispatcher. Always answer with the shipment id first.",
                  "role": "system"
                },
                {
                  "content": "Where is shipment DE-4471? It left Hamburg on Monday morning and should reach Lyon by Thursday.",
                  "role": "user"
                },
                {
                  "content": "DE-4471 is in transit and cleared the Strasbourg hub at 03:10. Estimated arrival in Lyon is Thursday 14:00.",
                  "role": "assistant"
                },
                {
                  "content": "Where is shipment DE-4471? It left Hamburg on Monday morning and should reach Lyon by Thursday.",
                  "role": "user"
                },
                {
                  "content": "DE-4471 is still on schedule, no new scan since Strasbourg.",
                  "role": "assistant"
                },
                {
                  "content": "Good. Book the return leg for Friday.",
                  "role": "user"
                }
              ]
            },
            "bodyType": "json",
            "method": "POST",
            "type": "http"
          }
        },
        "schema": {
          "$schema": "https://json-schema.org/draft/2020-12/schema",
          "properties": {
            "input": {
              "additionalProperties": false,
              "properties": {
                "body": {
                  "additionalProperties": false,
                  "properties": {
                    "budget_chars": {
                      "description": "Character budget for the sum of all returned message contents.",
                      "maximum": 400000,
                      "minimum": 100,
                      "type": "integer"
                    },
                    "duplicate_threshold": {
                      "default": 0.9,
                      "description": "Word-overlap ratio from which a later message of the same role counts as a near-duplicate of an earlier one.",
                      "maximum": 1,
                      "minimum": 0.5,
                      "type": "number"
                    },
                    "keep_last_n": {
                      "default": 5,
                      "description": "How many of the most recent messages are protected.",
                      "maximum": 50,
                      "minimum": 0,
                      "type": "integer"
                    },
                    "keep_roles": {
                      "default": [
                        "system"
                      ],
                      "description": "Roles whose messages are protected.",
                      "items": {
                        "enum": [
                          "system",
                          "user",
                          "assistant",
                          "tool"
                        ],
                        "type": "string"
                      },
                      "maxItems": 4,
                      "type": "array"
                    },
                    "max_message_chars": {
                      "default": 400,
                      "description": "Length to which unprotected survivors are trimmed in the trim stage.",
                      "maximum": 4000,
                      "minimum": 80,
                      "type": "integer"
                    },
                    "messages": {
                      "description": "The conversation in order, oldest first.",
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "content": {
                            "description": "Message text.",
                            "maxLength": 8000,
                            "minLength": 1,
                            "type": "string"
                          },
                          "id": {
                            "description": "Optional caller-side identifier, echoed unchanged.",
                            "maxLength": 128,
                            "type": "string"
                          },
                          "pin": {
                            "default": false,
                            "description": "If true this message is protected: never trimmed, never dropped.",
                            "type": "boolean"
                          },
                          "role": {
                            "description": "Speaker role.",
                            "enum": [
                              "system",
                              "user",
                              "assistant",
                              "tool"
                            ],
                            "type": "string"
                          }
                        },
                        "required": [
                          "role",
                          "content"
                        ],
                        "type": "object"
                      },
                      "maxItems": 200,
                      "minItems": 2,
                      "type": "array"
                    }
                  },
                  "required": [
                    "messages",
                    "budget_chars"
                  ],
                  "type": "object"
                },
                "bodyType": {
                  "enum": [
                    "json",
                    "form-data",
                    "text"
                  ],
                  "type": "string"
                },
                "method": {
                  "enum": [
                    "POST",
                    "PUT",
                    "PATCH"
                  ],
                  "type": "string"
                },
                "type": {
                  "const": "http",
                  "type": "string"
                }
              },
              "required": [
                "type",
                "method",
                "bodyType",
                "body"
              ],
              "type": "object"
            }
          },
          "required": [
            "input"
          ],
          "type": "object"
        }
      }
    }
  },
  "liveness": {
    "reliability": null
  },
  "verified": false,
  "featured": false,
  "provider": {
    "host": "agent.halowerk.com",
    "manifest_name": "agent.halowerk.com",
    "source": "cdp-mirror",
    "source_manifest_url": "https://api.cdp.coinbase.com/platform/v2/x402/discovery/resources",
    "submitted_at": "2026-10-14T01:15:01.050Z"
  }
}