# Honcho Memory API – Store Messages

> Honcho Memory API – Store Messages is a paid API for AI agents from agentcash.honcho.dev, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-15, last successful call 2026-06-25).

Stores conversational messages into Honcho's pay-per-request persistent memory system, associating them with a session and peer identity for later retrieval.

## Facts

- Endpoint: POST https://agentcash.honcho.dev/api/honcho/messages
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Last successful call: 2026-06-25
- Success rate: 100% of calls made through Zero
- Rating: 4.7 / 5 from 1 review
- Activations on Zero: 1
- Tags: x402
- Canonical page: https://www.zero.xyz/c/honcho-memory-api-store-messages-b7bc6c4a
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_iJjmeochOhbH1A8bp3VAg

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 honcho-memory-api-store-messages-b7bc6c4a -d '<json body>'
```

Example prompt: Save these two messages to Honcho memory under session 'convo-42': first, from peer 'user-7' saying 'I prefer vegetarian food', then from peer 'assistant-1' saying 'Got it, I'll remember that preference.'

## When to prefer this

Use this endpoint when you need to durably persist conversational turns (user and assistant messages) to Honcho's memory store so they can be recalled or queried later. Prefer this over in-context storage when conversations span multiple sessions or when you need learned, queryable representations rather than just raw logs. Best suited for AI agents that need persistent user memory across interactions.

## Known failure modes

- Missing required 'session' field returns 400 validation error
- Missing or empty 'messages' array returns 400 validation error
- Message object missing 'peer' or 'content' fields returns 400
- Insufficient USDC balance or failed x402 payment returns 402 Payment Required
- Invalid session ID format (empty string) returns 400
- Server unavailable returns 503 or 5xx error

## How this service works

Pay-per-request conversational memory for AI agents. Store messages, query memory, and retrieve learned representations. Powered by Honcho.

## Output

A confirmation that the messages have been stored in Honcho's persistent memory under the given session ID, making them available for future memory queries and retrieval by the agent.

## Example request

```json
{
 "session": "test-session-001",
 "messages": [
  {
   "peer": "user-agent-1",
   "content": "Hello, this is a test message for memory storage.",
   "metadata": {
    "source": "test",
    "timestamp": "2024-01-15T10:30:00Z"
   }
  }
 ]
}
```

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "session": {
   "type": "string",
   "minLength": 1,
   "description": "Session ID — a conversation identifier."
  },
  "messages": {
   "type": "array",
   "items": {
    "type": "object",
    "required": [
     "peer",
     "content"
    ],
    "properties": {
     "peer": {
      "type": "string",
      "minLength": 1,
      "description": "Peer ID for the author of this message."
     },
     "content": {
      "type": "string",
      "minLength": 1,
      "description": "Message content."
     },
     "metadata": {
      "type": "object",
      "description": "Optional key-value metadata for this message.",
      "propertyNames": {
       "type": "string"
      },
      "additionalProperties": {}
     }
    },
    "additionalProperties": false
   },
   "minItems": 1,
   "description": "Messages to store."
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/honcho-memory-api-store-messages-b7bc6c4a/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agentcash.honcho.dev](https://www.zero.xyz/host/agentcash.honcho.dev/llms.txt)
