Twig

Agents

Named brain with private cave, model, and voice

You own many agents. Each one = name, color, emoji, personality, private home. Other agents cannot open that home. Hard wall.

What agent is

Defined in agents/<id>/agent.md. Directory name = id. File does not hold id. Simple.

FieldJob
nameWhat you call it (max 64 chars)
personalityFree prose. Becomes most of system prompt.
colorHex. UI paints agent with this.
emojiOptional badge
models.chatTalk model
models.dreamOptional cheap model for night work
voiceLocale, rate, pitch, speak replies or not
dreamsEnabledLet agent dream or shut it up

Ids are lowercase, filesystem-safe (a-…). They become folder names. Weird characters rejected at birth.

Models

You bring keys. Twig talks to:

  • OpenRouter (default — one signup, less pain)
  • OpenAI
  • Anthropic
  • Google

Defaults via OpenRouter:

  • Chat: anthropic/claude-sonnet-4.5
  • Dream: anthropic/claude-haiku-4.5

Chat and dream split on purpose. Dreams fire many times at night. Same expensive model for both = surprise bill. We do not like surprise bill.

Voice

Voice not bolted on later. First class.

  • Locale (BCP-47) drives STT, TTS, reply language
  • Optional system voiceId
  • Rate + pitch
  • speakReplies on/off

Speech turn marked as spoken. Keyboard turn marked as text. Equal.

Private home

Every agent gets one home workspace. Only that agent opens it. Inside:

  • agent.md — who it is
  • memory/ — facts and notes
  • skills/ — how-to prose agent wrote for itself
  • macros/ — safe tool chains (phone ok)
  • scripts/ — real TS (laptop only)
  • conversations/ — append-only NDJSON chat logs
  • dreams/ — human-readable dream reports

More: Workspaces. Night work: Dreams.