Primitives / Kernels
Kernels
Brief in, article out.
A brief, outline, notes or draft in; a finished article out, in the kernel's voice and passed by adversarial judges.
- Unit
- Kernel endpoint
- A run produces
- an article plus its verification record
- In the app
- /kernels
- API reference
- All kernels tools
Try it
run_kernel over REST: POST /api/kernel/ingest/{endpoint_id}. Needs an API key with kernel:write.
curl -X POST https://app.letterstory.com/api/kernel/ingest/<endpoint_id> \
-H "x-integrations-key: ls_..." \
-H "content-type: application/json" \
-d '{
"input": "..."
}'Make one your own
We ship eight kernels, each a point on three tone choices: casual or authoritative, funny or serious, matter-of-fact or inquisitive. Shared kernels can't be edited. You fork one into a copy your organization owns, and tune the copy.
- 1Fork. Kernels → Catalog → Your kernels → Fork a kernel. Pick the closest of the eight, or one of your own, and name the copy. Only your organization sees it. Or start from scratch: a name and a voice is a whole kernel.
configure_kernel,create_kernel - 2Tune the voice. Register: casual or authoritative. Humor: off, or on with 1 to 5 devices per piece. Framing: inquisitive or declarative. Notes (up to 2,000 characters): your terminology, facts to get right, what to avoid; written into the voice itself. A note that is really a setting ("make it funnier") is offered back as that setting.
update_kernel,suggest_kernel_voice_settings - 3Add your own evals. An eval is a detector (sentence-regex, char-set, heading-regex, word-list, structure, distribution, llm-judge or hybrid) plus an optional fix. With a fix it repairs what it finds; without one it only measures. Every new eval is filed for review and runs once a person activates it.
add_kernel_custom_eval,remove_kernel_custom_eval - 4Edit the file. Everything else (the writer, which rules repair, measure or stay off, the effort) is the kernel file, under Kernel file on the kernel's page. Save a change as a candidate: nothing changes until it is live. Once you write the voice as text, the voice settings stop applying.
get_kernel_file,save_kernel_file,get_kernel_file_schema - 5Test it. Test this kernel, on its page, writes from a real brief with the live version or a candidate, and shows every pass. The Studio runs the same brief through different kernels side by side. Each test spends one kernel run.
start_kernel_studio_run,get_kernel_studio_run - 6Use it. Make a tested candidate live; making an earlier version live rolls back. Make the kernel your organization's default, or bind it to an endpoint. When the kernel you forked improves, your copy doesn't change: the update arrives as an offer you accept or ignore.
promote_kernel_version,set_org_writing_kernel,accept_kernel_offer
Underneath the settings, a kernel version is one JSON file (Kernel file on the kernel's page; schema at /api/schema/kernel). Only name and voice are required; voice is one text, or named paragraphs kept in the order you write them.
{
"name": "Letterstory",
"writer": "claude-sonnet-5",
"voice": {
"tone": "Plain, specific, a little dry.",
"audience": "Content and growth teams. No hype."
},
"register": "authoritative",
"humor": false,
"inquisitive": false,
"person": "first_plural",
"rules": {
"system-rarity": "repair",
"plainly-tic": "off",
"letterstory-buzzwords": {
"mode": "repair",
"name": "Buzzwords",
"detector": { "kind": "word-list", "words": ["synergy", "leverage"] },
"fix": "Say what it does instead."
}
},
"effort": { "rounds": 3, "samples": 3, "floor": 6 }
}The system rules are ids in rules like any other, each with a limit on how far it turns down.
| Rule | Does | Allowed |
|---|---|---|
system-rarity | Keeps vocabulary at a human distribution | repair, measure, off |
system-person | Holds the requested person | repair, off |
system-framing | Removes worn AI framings | repair, off |
system-figures | Numbers must come from your input | repair, measure |
system-entities | Names must come from your input | repair, measure |
1. Constraints: what you configure
namevoicewriterregisterhumorinquisitivepersonruleseffortadvancedOnly name and voice are required; the rest uses platform settings. Every save is a new, unchangeable version. rules sets each check to repair, measure or off; effort sets passes, drafts and the bar. Use ours, fork ours, or bring your own.
kernel_idshredder_endpoint_iddefaultstemplateinputcontent_kindskeletontarget_word_countvoiceentitiesdirectiveskernel_versionshred_aggressionconfig_patchA per-call field wins over the endpoint's defaults, field by field. entities take a treatment (never, mention_once, mention_often, lead_company) plus linkable, so how a client or competitor is named is data, not prose you write. directives guide how to write, never what is true. config_patch changes a kernel setting for one run without saving a version.
2. Mechanism: what always happens
- 1Decompose. The brief becomes claims, each with the evidence it needs. Every input is written fresh, never edited in place; your images, tables and embeds are held and put back under the heading they came from. A brief too thin to write from is refused before any model call.
- 2Draft. Written in the kernel's voice, inside its constraints. The first pass writes several drafts (effort.samples) and keeps the best.
- 3Repair. Each rule the kernel lists finds and fixes its own pattern, on every pass. No call turns a rule off.
- 4Judge. A team of adversarial judges (three editors) scores every pass on commitment, economy and movement, out of 9. Below the bar (effort.floor), it goes again, up to effort.rounds passes, and the best pass ships. The judges are the platform's, the same for every kernel and every writer, so a score means the same thing whoever wrote.
- 5Verify. Names and figures must come from your input, and the brief is never echoed back. The record then checks the draft that ships against your input: every claim, every held block, every heading.
3. Intelligence: who picks values
An API key calls run_kernel with its own input and its own endpoint defaults. Letterstory adds no opinion.
Auto-Pen, the editor and the Studio derive voice, entities, shape and length from your collection and article plan, then submit through the same endpoint run.
4. Verification: did it hold
| Check | Reads back | Rule |
|---|---|---|
shape | skeleton | Every heading asked for is present, in order. |
length | target_word_count | Within ±35% of the budget. |
person | voice.person | No more than two tokens in the wrong person. |
jury | mechanism | Whether the pass that shipped cleared the bar. |
entities | entities | Each named entity counted against its treatment. |
A constraint you didn't set is recorded as skipped, never as a pass.
Surfaces
Same call over MCP (tools/call) and REST.
| Job | MCP tool | REST |
|---|---|---|
| Write | run_kernel | POST /api/kernel/ingest/{endpoint_id} |
| Poll a run | get_kernel_endpoint_run | GET /api/kernel/ingest/{endpoint_id}/runs/{run_id} |
list_kernel_endpoint_runs | GET /api/kernel/ingest/{endpoint_id}/runs | |
| Endpoints | list_kernel_endpoints | POST /api/integrations/tools/list_kernel_endpoints |
create_kernel_endpoint | POST /api/integrations/tools/create_kernel_endpoint | |
update_kernel_endpoint | POST /api/integrations/tools/update_kernel_endpoint | |
delete_kernel_endpoint | POST /api/integrations/tools/delete_kernel_endpoint | |
| Endpoint config | get_kernel_endpoint_config | POST /api/integrations/tools/get_kernel_endpoint_config |
set_kernel_endpoint_config | POST /api/integrations/tools/set_kernel_endpoint_config | |
| Catalog | list_kernels | POST /api/integrations/tools/list_kernels |
get_org_writing_kernel | POST /api/integrations/tools/get_org_writing_kernel | |
set_org_writing_kernel | POST /api/integrations/tools/set_org_writing_kernel | |
| Make it yours | configure_kernel | POST /api/integrations/tools/configure_kernel |
create_kernel | POST /api/integrations/tools/create_kernel | |
update_kernel | POST /api/integrations/tools/update_kernel | |
suggest_kernel_voice_settings | POST /api/integrations/tools/suggest_kernel_voice_settings | |
add_kernel_custom_eval | POST /api/integrations/tools/add_kernel_custom_eval | |
remove_kernel_custom_eval | POST /api/integrations/tools/remove_kernel_custom_eval | |
archive_kernel | POST /api/integrations/tools/archive_kernel | |
| Kernel file | get_kernel_file_schema | POST /api/integrations/tools/get_kernel_file_schema |
get_kernel_file | POST /api/integrations/tools/get_kernel_file | |
list_kernel_versions | POST /api/integrations/tools/list_kernel_versions | |
save_kernel_file | POST /api/integrations/tools/save_kernel_file | |
promote_kernel_version | POST /api/integrations/tools/promote_kernel_version | |
get_kernel_offer | POST /api/integrations/tools/get_kernel_offer | |
accept_kernel_offer | POST /api/integrations/tools/accept_kernel_offer | |
| Studio | start_kernel_studio_run | POST /api/integrations/tools/start_kernel_studio_run |
get_kernel_studio_run | POST /api/integrations/tools/get_kernel_studio_run | |
list_kernel_studio_runs | POST /api/integrations/tools/list_kernel_studio_runs | |
| Balance | get_kernel_run_balance | POST /api/integrations/tools/get_kernel_run_balance |
CLI: letterstory kernel write
Metered in runs. Direct API runs draw kernel run credits; runs Letterstory makes for you come out of your plan.