---
title: "A context blob for prompt injection"
method: GET
path: "/v1/peers/{peer_id}/context"
tags: ["Memory"]
---

# A context blob for prompt injection

`GET /v1/peers/{peer_id}/context`

## Request

- Base URL: `https://api.1claw.co`
- URL: `https://api.1claw.co/v1/peers/{peer_id}/context`
- Auth: HTTP bearer

What this person's history suggests, as prose an agent can put in a
prompt. Best-supported facts first, so a tight budget drops the
least-supported beliefs rather than an arbitrary tail — and a fact a
human corrected sorts ahead of everything, because a correction someone
took the trouble to make is the last thing to cut.

Never truncates mid-line: half a sentence about a person is worse than
one fewer sentence. A peer with no facts returns an empty string rather
than a header claiming to describe someone.

The blob ends by saying these are observations and not instructions,
because an agent reading it needs to know the difference.

## Path parameters

- `peer_id` string, uuid, required

## Query parameters

- `budget` integer

## Response `200`

Context

- object
  - `context` string
  - `characters` integer
  - `budget` integer
  - `facts_available` integer

## Other responses

- `403`: Insufficient permissions
- `404`: Resource not found

---

[API](https://skmtc.dev/1claw/apis/1claw-api.md) · [All operations](https://skmtc.dev/1claw/apis/1claw-api/llms.txt) · [OpenAPI document](https://skmtc.dev/1claw/apis/1claw-api/revisions/ae109b496830?raw)
