Self Configuration logo

Self Configuration

Organization
letta-ai
self-configuration

Configures Letta agents' own runtime behavior, including model, context window, system prompt, reasoning, conversation overrides, compaction settings, and compaction prompts. Use when an agent or user asks to self-modify, tune summarization/compaction, change identity/system instructions, adjust model settings, or test conversation-scoped overrides.

Overview

Publisherletta-ai
Repositoryskills
Skill nameself-configuration
Stars
144
Forks
25
Bundled files
5
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 5 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by letta-ai on GitHub. Read the source before you install it.

Installation

Install the Self Configuration AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/letta-ai/skills.git /tmp/skills
mkdir -p .claude/skills
cp -r /tmp/skills/letta/self-configuration .claude/skills/self-configuration
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Self Configuration in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Self Configuration on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Self Configuration is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Letta self-configuration

Use the Letta API when an agent needs to change its own persistent defaults or the current conversation's temporary runtime settings.

Safety rule

Ask before changing persistent agent defaults unless the user explicitly requested the change. Persistent changes include agent model, system prompt, context window, model settings, and compaction settings. Prefer conversation-scoped changes for experiments.

Decision tree

  • Need a temporary model/context experiment? Patch the current conversation.
  • Need persistent model, system prompt, or compaction behavior? Patch the agent.
  • Need better summaries after context eviction? Use the Compaction settings section and prompt patterns.
  • Need provider keys, BYOK setup, or server deployment env vars? Use the broader Letta configuration/API skills instead.
  • Need to design a new agent from scratch? Use the agent-development skill.

Environment

bash
BASE_URL="${LETTA_BASE_URL:-https://api.letta.com}"
: "${LETTA_API_KEY:?Set LETTA_API_KEY}"
: "${AGENT_ID:?Set AGENT_ID}"

Use AGENT_ID for yourself. Use CONVERSATION_ID for the current thread when it is available.

Inspect first

bash
curl -sS "$BASE_URL/v1/agents/$AGENT_ID" \
  -H "Authorization: Bearer $LETTA_API_KEY" | \
  jq '{id, model, context_window_limit, llm_config, model_settings, compaction_settings, system_chars: (.system | length)}'

Choose the API target

TargetEndpointPersistenceUse for
AgentPATCH /v1/agents/$AGENT_IDPersistent across conversationsmodel defaults, context window, system prompt, compaction settings
ConversationPATCH /v1/conversations/$CONVERSATION_IDCurrent conversation onlytemporary model/context/reasoning experiments

Quick patches

Context window only

context_window_limit is top-level. Do not put it inside model_settings.

bash
curl -sS -X PATCH "$BASE_URL/v1/agents/$AGENT_ID" \
  -H "Authorization: Bearer $LETTA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"context_window_limit": 64000}'

Conversation-scoped:

bash
: "${CONVERSATION_ID:?Set CONVERSATION_ID}"

curl -sS -X PATCH "$BASE_URL/v1/conversations/$CONVERSATION_ID" \
  -H "Authorization: Bearer $LETTA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"context_window_limit": 64000}'

Agent-level model update

model_settings is usually treated as a replacement object, not a deep merge. Read the current agent first and include any existing settings you want to keep. Provider-specific examples live in references/model-settings.md.

bash
curl -sS -X PATCH "$BASE_URL/v1/agents/$AGENT_ID" \
  -H "Authorization: Bearer $LETTA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "openai/gpt-5.2",
    "context_window_limit": 272000,
    "model_settings": {
      "provider_type": "openai",
      "parallel_tool_calls": true,
      "reasoning": { "reasoning_effort": "medium" },
      "max_output_tokens": 128000
    }
  }'

Conversation-scoped model update

bash
: "${CONVERSATION_ID:?Set CONVERSATION_ID}"

curl -sS -X PATCH "$BASE_URL/v1/conversations/$CONVERSATION_ID" \
  -H "Authorization: Bearer $LETTA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "openai/gpt-5.2",
    "context_window_limit": 64000,
    "model_settings": {
      "provider_type": "openai",
      "parallel_tool_calls": true,
      "reasoning": { "reasoning_effort": "low" }
    }
  }'

Safe conversation-scoped model test

A successful PATCH means the API accepted the configuration shape. It does not always prove the selected model handle can generate at runtime for the current server, provider, account, or routing configuration. The first actual model call may still fail with a resolver/provider error.

For model experiments, prefer this bounded recipe:

  1. Save or inspect the current agent/conversation configuration.
  2. Patch the current conversation, not persistent agent defaults.
  3. Verify the response or re-fetch the conversation to confirm the config changed.
  4. Run a tiny low-risk runtime test in the same conversation.
  5. If the runtime test fails, revert the conversation to the saved known-good model/settings.

This keeps failed model-handle experiments from damaging the agent's persistent continuity or requiring the user to repair global defaults.

System prompt replacement

Only use system when the user explicitly asks to change the persistent system prompt. It is a full replacement, not an append.

bash
curl -sS "$BASE_URL/v1/agents/$AGENT_ID" \
  -H "Authorization: Bearer $LETTA_API_KEY" | jq -r '.system'

Then send the complete replacement prompt:

bash
curl -sS -X PATCH "$BASE_URL/v1/agents/$AGENT_ID" \
  -H "Authorization: Bearer $LETTA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"system": "<FULL replacement system prompt. Preserve important existing instructions.>"}'

Safer bundled updater

Use scripts/update-agent-settings.ts when you want a dry-runable patch that can optionally merge existing model_settings or compaction_settings before updating.

bash
npx tsx <SKILL_DIR>/scripts/update-agent-settings.ts \
  --target agent \
  --context-window-limit 64000 \
  --dry-run

Examples and all flags are in references/api-patch-examples.md.

Compaction settings

Compaction runs when message history grows too large for the context window. Letta replaces older messages with a summary while keeping recent messages in context. The summary appears before the remaining recent messages, so a custom compaction prompt should preserve enough background for the later messages to make sense.

Customize compaction when the default summary loses important continuity, tone, relationship context, implementation details, or user feedback.

Compaction fields

FieldUse
modesliding_window, all, self_compact_sliding_window, or self_compact_all.
promptCustom summarization prompt.
modelOptional cheaper/faster summarizer model.
model_settingsOptional summarizer model settings.
prompt_acknowledgementOptional boolean for summarizers that add acknowledgements/meta-commentary.
clip_charsMax summary length in characters. Default is 50000.
sliding_window_percentageFraction of messages to summarize in sliding-window modes. Docs default: 0.3.

Choose a compaction mode

  • Use sliding_window by default. It summarizes older messages with a separate summarizer call and keeps recent messages intact.
  • Use self_compact_sliding_window when the agent's own persona/system prompt is important for summary quality or prompt-cache reuse.
  • Use all only when maximum space reduction matters more than preserving recent raw messages.
  • Use self_compact_all for all-message compaction with the agent system prompt included.

Prompt requirements

Every custom compaction prompt should:

  • State whether evicted messages come from the beginning of the context window.
  • Say the summary will appear before remaining recent messages.
  • Say not to continue the conversation, answer transcript questions, or call tools.
  • Require incorporation of any existing summary being evicted.
  • Preserve exact user requests, names, IDs, URLs, file paths, dates, and quoted phrases when they matter.
  • Include lookup hints for detailed content that cannot fit.
  • End with "Only output the summary."

For complete prompt templates, read references/compaction-prompt-patterns.md.

Update compaction with the bundled script

bash
npx tsx <SKILL_DIR>/scripts/update-compaction-prompt.ts \
  --prompt-file /tmp/compaction-prompt.txt \
  --mode self_compact_sliding_window \
  --clip-chars 50000 \
  --dry-run

The script preserves existing compaction_settings fields unless flags override them. It uses LETTA_API_KEY, AGENT_ID, and LETTA_BASE_URL unless corresponding flags are provided.

SDK examples

TypeScript and Python examples live in references/api-patch-examples.md.

Verify

bash
curl -sS "$BASE_URL/v1/agents/$AGENT_ID" \
  -H "Authorization: Bearer $LETTA_API_KEY" | \
  jq '{id, model, context_window_limit, llm_config_context_window: .llm_config.context_window, model_settings, compaction_settings, system_chars: (.system | length)}'

Guardrails

  • Ask before changing persistent agent defaults unless explicitly requested.
  • Prefer conversation-scoped updates for experiments.
  • Keep context windows only as large as needed. Bigger windows increase latency and cost.
  • Preserve existing model_settings and compaction_settings fields unless intentionally changing them.
  • For self-compaction prompts, always forbid tool use and conversation continuation.
  • If an update returns 400, first check model handle validity, provider type, and whether settings are in the expected shape.

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Self Configuration AI skill do?

Configures Letta agents' own runtime behavior, including model, context window, system prompt, reasoning, conversation overrides, compaction settings, and compaction prompts. Use when an agent or user asks to self-modify, tune summarization/compaction, change identity/system instructions, adjust model settings, or test conversation-scoped overrides.

Why use Self Configuration on TypingMind?

Because you install it once and use it with any model. Self Configuration is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Self Configuration in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/letta-ai/skills/tree/main/letta/self-configuration. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Self Configuration?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Self Configuration?

As many as you like. As long as a model supports skills, you can use Self Configuration with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Self Configuration AI skill free?

Yes. It is published on GitHub by letta-ai under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇