Charliehub · by A.N.D.Why

Building block 8 · Going further

Personality

Personality hooks let your extension shape who Charlie is: its voice on every turn, what it does at the start of a new conversation, and how it writes up a conversation when you close it.

What you'd use it for

In your manifest

None of the extensions installed today uses these fields, so this is an illustrative example made up for this page. Each field points to a small file that returns text.

Illustrative example / manifest.json
{
  "name": "plain-speaker",
  "description": "Charlie speaks plainly and briefly.",
  "version": "0.1.0",
  "tier": "core",
  "developer": { "name": "You", "contact": "you@example.com" },
  "systemPrompt": { "module": "./handlers/systemPrompt.js" },
  "bootInstructions": {
    "module": "./handlers/bootInstructions.js"
  },
  "documentInstructions": {
    "module": "./handlers/documentInstructions.js"
  }
}
Illustrative example / handlers/systemPrompt.js
module.exports = async function systemPrompt() {
  return 'You are Charlie. Use short, plain sentences. ' +
    'Ask one question at a time.'
}

What each part means

FieldWhat it does
systemPromptCharlie's base personality. Read fresh on every turn. When any extension provides this, it replaces Charlie's built-in default personality.
bootInstructionsInstructions delivered once, on the first turn of each new thread.
documentInstructionsUsed instead of Charlie's own write-up instruction when a thread is documented and closed.

Each module file's default export is an async function that returns a string, or null to add nothing.

Things to know

See it in

None of the five examples on this site uses personality hooks, and no extension installed today does either.

Every field in detail: systemPrompt, bootInstructions and documentInstructions in the reference.