# Context endpoint

## GET /api/v1/personas/{id}/context

Returns current public default context without authentication.

```bash
curl "https://personawiki.app/api/v1/personas/developer/context?lang=en"
```

| Option | Default value | Description |
| --- | --- | --- |
| format | json | json or text |
| task | Empty string | Task context for ranking reference experiences and knowledge. Up to 2,000 characters. |
| token_budget | 4096 | Conservative UTF-8 byte budget: 256–8192. |
| include | None | knowledge: include reference documents within the budget |
| version | Current | An archived version from the versions list |
| directions | Default settings | Comma-separated axis:0–100 pairs. Preference strengths, not measured distributions. |

```bash
curl "https://personawiki.app/api/v1/personas/developer/context?include=knowledge&token_budget=8192&directions=pace%3A30%2Cchange%3A60&lang=en"
```

knowledge_documents is separate reference data. Do not merge it into persona_instructions. With include=knowledge, instructions, experiences and knowledge text share the budget. Omitted documents are listed in usage.omitted_knowledge_documents. Navigation metadata such as reference links is outside this budget.

## Pin a version

```bash
curl "https://personawiki.app/api/v1/personas/developer/versions?lang=en"
```

English and Korean versions are distinct. Published archived English versions preserve their source and policy. Missing versions never fall back to another language.

## Response field

| Field | Content |
| --- | --- |
| persona_id | Stable ID |
| version | Public context version reflecting knowledge links |
| persona_instructions | Administrator-managed judgment instructions |
| knowledge_data | Reference data from approved experiences |
| knowledge_references | Related knowledge IDs, versions and retrieval links |
| knowledge_version | Version of linked knowledge and mappings |
| provenance | Experience ID, authoring type and version |
| usage | Instruction and experience budgets, conservative byte estimates and record counts |

token_budget is not an exact model token count. If the base instructions exceed it, the API returns 422. Reference data is included within the remaining budget.

knowledge_references is navigation metadata outside token_budget. Fetch only the documents you need, then select them for your model’s input budget.

## Text response

```bash
curl "https://personawiki.app/api/v1/personas/developer/context?format=text&lang=en"
```

## Core knowledge selection

include=knowledge&knowledge_mode=core retains summaries, application conditions, limitations and sources, with advanced concepts available in separate documents. Knowledge is selected before experiences within the budget. Omitting this option retains the full-document format. Check usage.knowledge_status=empty and the omitted list even when no knowledge is included.

```bash
curl "https://personawiki.app/api/v1/personas/accountant/context?include=knowledge&knowledge_mode=core&lang=en"
```

