Overview

The Agent Preferences API stores per-user response-style settings. On every successful update, the platform regenerates a managed STYLE.md file in every agent workspace owned by the user. These preferences are also injected into agent-chat system instructions at send time. Supported response styles are:
  • concise — brief, direct responses without preamble.
  • balanced — the default, thorough enough to be useful but concise enough to stay readable.
  • detailed — full reasoning, context, and edge cases.
  • custom — driven entirely by custom_instructions.
This namespace is served by the Allternit API data-plane node (http://127.0.0.1:8013 on the same machine, or your paired or provisioned node). The hosted Cloud API at https://api.allternit.com does not route it; it relays only agent sessions, canvases, office and beta research/sessions. See Cloud API.

Base URL

Authentication

All requests must include a valid bearer token in the Authorization header.

Preference object

The profile fields are composed into agent chats as an “About the user” layer. When write_in_my_style is true and writing_style is not empty, a “Writing as the user” layer follows it. See Write in my style.

Endpoints

Get preferences

Returns the caller’s preferences. If no row exists, returns the default style balanced with empty custom instructions, empty profile fields, write_in_my_style set to true and an empty writing_style.

Example request

Example response

Set preferences

Updates the caller’s preferences. Omitted fields are merged with existing values. After the database update, the gateway best-effort regenerates STYLE.md in every agent workspace the user owns.

Request body

Clients that do not send the newer fields keep working; nothing they omit is reset.

Example request

Example response

Learn writing style

Builds a writing-style profile for Write in my style and saves it to writing_style and writing_style_learned_at. No model is called. The profile is built from:
  • samples in the request body (optional), and
  • The caller’s own most recent messages (up to 300): web and Desktop conversations, project chat with Al and Cowork Al transcripts, user role only.
Messages under 40 characters, mostly code, links only, or pasted logs are skipped. The profile is short markdown (at most 2500 characters) in plain words: greeting and sign-off habits, typical sentence length, capitalization, punctuation (exclamation marks, dashes, ellipses), emoji use and contractions, plus up to five verbatim excerpts (max 280 characters each, pasted samples first) under “Examples of how they write”. Email addresses, phone numbers and anything that looks like a key or password are removed from the excerpts.

Request body

The body may be omitted to learn from past messages only.

Example request

Response

200 with the same object as Get preferences, including the new writing_style. The managed STYLE.md is regenerated. 422 with { "error": "not_enough_text" } when there is not enough usable writing. 400 with too_many_samples or field_too_long when the limits above are exceeded.

Write in my style

When write_in_my_style is true and writing_style is not empty, agent-chat system instructions get this layer after “About the user”:
STYLE.md gets the same text under a ## Writing as the User heading so CLI brains reading the workspace follow it. When the setting is off or the profile is empty, neither is added. User guide: Write in my style.

STYLE.md format

The managed STYLE.md written to each workspace looks like this:
Do not hand-edit STYLE.md. The gateway overwrites it on every preference update.

Error codes