Agent skill

Self Configuration

by letta-ai in letta-ai/skills

Configures Letta agents' own runtime behavior, including model, context window, system prompt, reasoning, conversation overrides, compaction settings, and compaction prompts.

MITAuto-check passedAI & LLM Engineering

Install Self Configuration

skills CLI
$ npx skills add letta-ai/skills --skill self-configuration -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install letta-ai/skills self-configuration --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/letta-ai/skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/letta/self-configuration .claude/skills/self-configuration && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
self-configuration
GitHub stars
149
Token cost
~2.4k tokens
SKILL.md length
786 words
Files
7 (incl. scripts, references)
Skills in repo
22
Repo updated
First seen
Licence
MIT

At a glance

Configures Letta agents' own runtime behavior, including model, context window, system prompt, reasoning, conversation overrides, compaction settings, and compaction prompts.

  • Works in 5 steps: Save or inspect the current… → Patch the current conversation, not… → Verify the response or re-fetch the… → …
  • User asks to self-modify
  • SKILL.md covers Safety rule, Decision tree, Environment and Inspect first, plus 7 more sections
  • Runs TypeScript scripts from its folder; calls curl, jq and npx; needs LETTA_API_KEY

What it does

Self Configuration is an agent skill from letta-ai/skills. 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.

Its SKILL.md is about 2.4k tokens, which your agent loads only when the skill is triggered. The skill folder holds 8 other files, including scripts and reference files (for example `references/api-patch-examples.md`, `references/compaction-prompt-patterns.md` and `references/model-settings.md`).

It sits in AI & LLM Engineering, covering Prompt engineering and Summarization. It works with Letta. The repository describes itself as: A shared repository for skills. Intended to be used with Letta Code, Claude Code, Codex CLI, and other agents that support skills. The licence is MIT.

When your agent uses it

  • User asks to self-modify
  • Tune summarization/compaction
  • Change identity/system instructions
  • Adjust model settings

Example prompts

  • “Use the self-configuration skill to configure Letta agents' own runtime behavior, including model, context window, system prompt, reasoning…”
  • “/self-configuration”

Requirements

  • Python 3
  • Node.js
  • A credential in LETTA_API_KEY

Workflow steps

5 steps, taken from the first numbered list in SKILL.md.

  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.

What it can do on your machine

Read from SKILL.md and the folder at commit 6785511. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 2 files in scripts/ (TypeScript), which the agent can run.

    Shell commands in SKILL.md call:

    • curl
    • jq
    • npx

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use curl and npx, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • LETTA_API_KEY

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Self Configuration loads about 2.4k tokens when it runs, and up to ~5.8k if it reads all its reference files. Until then it costs about 93 tokens; SKILL.md has 786 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~93
When it runs · the whole SKILL.md, loaded when a task matches
~2.4k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~5.8k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from letta-ai/skills at commit 6785511, republished under its MIT licence (© letta-ai). 786 words, ~2,381 tokens.

Download SKILL.mdSave it as .claude/skills/self-configuration/SKILL.md (or your agent's skills folder). This skill also uses 6 other files; get the full folder from GitHub.
name
self-configuration
description
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.
license
MIT

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.

Show full SKILL.md (307 more words)Show less
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.

© letta-ai, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 6 other files (scripts, references) in letta/self-configuration of letta-ai/skills.

  • SKILL.md
  • LICENSE
  • references/api-patch-examples.md
  • references/compaction-prompt-patterns.md
  • references/model-settings.md
  • scripts/update-agent-settings.ts
  • scripts/update-compaction-prompt.ts

Open the folder on GitHubat commit 6785511

Compare with similar skills

Self Configuration next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Self Configuration compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Self Configuration this skillletta-ai/skills149—~2.4kAutomated safety check: PassMIT
Self Configurationletta-ai/letta-code3.6k—~7kAutomated safety check: PassMIT
Contextpilot SavingsEfficientContext/ContextPilot141—~1.4kAutomated safety check: PassMIT
Prompt Improverseverity1/claude-code-prompt-improver1.9k1 repos~1.7kAutomated safety check: PassMIT
Context Compressionguanyang/open-agent-hub9772 repos~4.6kAutomated safety check: PassMIT
Prompt Engineering Patternsynulihao/AgentSkillOS61814 repos~1.7kAutomated safety check: PassNone

Similar skills

  • Self Configuration

    letta-ai/letta-code

    Inspect or modify Letta Code's own memory, model, context window, system prompt, compaction, permissions, toolsets, mods, skills, channels, schedules, agent secrets, and local runtime settings.

    3.6k GitHub stars~7k tokensUpdated today
    AI & LLM EngineeringAuto-check passed
  • Contextpilot Savings

    EfficientContext/ContextPilot

    A skill your agent uses when a user asks how many tokens (or how much context/cost) ContextPilot has saved, or wants a ContextPilot savings status/summary inside Hermes Agent — e.g.

    141 GitHub stars~1.4k tokensUpdated 2 days ago
    AI & LLM EngineeringAuto-check passed
  • Prompt Improver

    severity1/claude-code-prompt-improver

    This skill enriches vague prompts with targeted research and clarification before execution.

    1.9k GitHub starsUsed in 1 repo~1.7k tokens
    AI & LLM EngineeringAuto-check passed
  • Context Compression

    guanyang/open-agent-hub

    This skill should be used when long-running agent sessions need context compression, structured summarization, compaction, token-per-task optimization, or durable handoff summaries that preserve…

    977 GitHub starsUsed in 2 repos~4.6k tokens
    AI & LLM EngineeringAuto-check passed
  • Prompt Engineering Patterns

    ynulihao/AgentSkillOS

    Master advanced prompt engineering techniques to maximize LLM performance, reliability, and controllability in production.

    618 GitHub starsUsed in 14 repos~1.7k tokens
    AI & LLM EngineeringAuto-check passed
  • Patch Creation

    Piebald-AI/tweakcc

    Create and register new patches for tweakcc. An agent skill from Piebald-AI/tweakcc.

    2.5k GitHub stars~1.6k tokensUpdated today
    AI & LLM EngineeringAuto-check passed

More from letta-ai/skills

All 22 skills in this repo
  • Visual Identity

    letta-ai/skills

    Build and maintain a persistent visual identity for your agent using Flux Kontext Pro.

    149 GitHub stars~2.6k tokensUpdated 9 days ago
    Auto-check passed
  • AI News

    letta-ai/skills

    Fetch and summarize recent AI news from curated RSS feeds (Hugging Face, VentureBeat, The Verge, OpenAI, Anthropic, DeepMind, etc.) and YouTube channels (Yannic Kilcher, Two Minute Papers, AI…

    149 GitHub stars~582 tokensUpdated 9 days ago
    Auto-check passed
  • Builds and debugs Letta Code channels, including first-party channel adapters and dynamic user channel plugins under ~/.letta/channels.

    149 GitHub stars~1.1k tokensUpdated 9 days ago
    Auto-check passed
  • Letta Configuration

    letta-ai/skills

    Configure LLM models and providers for Letta agents and servers.

    149 GitHub stars~1.3k tokensUpdated 9 days ago
    Auto-check: notes
  • Migrates deprecated Letta Filesystem folders/files to MemFS using markdown document corpora, chunking, local lexical search, and QMD semantic search via the memfs-search skill.

    149 GitHub stars~1.3k tokensUpdated 9 days ago
    Auto-check passed
  • Memfs Search

    letta-ai/skills

    Semantic search over agent memory files. An agent skill from letta-ai/skills.

    149 GitHub stars~901 tokensUpdated 9 days ago
    Auto-check passed

Works with

Questions about Self Configuration

What does Self Configuration do?

Configures Letta agents' own runtime behavior, including model, context window, system prompt, reasoning, conversation overrides, compaction settings, and compaction prompts. Self Configuration is an agent skill from letta-ai/skills. Configures Letta agents' own runtime behavior, including model, context window, system prompt, reasoning, conversation overrides, compaction settings, and compaction prompts.

When should I use Self Configuration?

Self Configuration fits situations like: user asks to self-modify; tune summarization/compaction; change identity/system instructions; adjust model settings.

How do I install Self Configuration in Claude Code?

Run `npx skills add letta-ai/skills --skill self-configuration -a claude-code`. Or copy the skill folder (letta/self-configuration in letta-ai/skills) into .claude/skills/self-configuration in your project. Claude Code loads it when a task matches its description.

How do I install Self Configuration in Codex?

Run `npx skills add letta-ai/skills --skill self-configuration -a codex`. Or copy the skill folder (letta/self-configuration in letta-ai/skills) into .agents/skills/self-configuration in your project. Codex loads it when a task matches its description.

Can I use Self Configuration in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add letta-ai/skills --skill self-configuration -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/self-configuration, .gemini/skills/self-configuration, .github/skills/self-configuration and .opencode/skills/self-configuration in your project.

What does Self Configuration need to run?

Going by SKILL.md and its folder, Self Configuration needs TypeScript for the scripts in its folder, the command-line tools its instructions call (curl, jq and npx) and credentials named LETTA_API_KEY. Our summary lists: Python 3; Node.js; A credential in LETTA_API_KEY.

Does Self Configuration access the network?

SKILL.md contains no URLs. Its commands use curl and npx, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Self Configuration safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Self Configuration use?

Self Configuration is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Self Configuration use?

About 2.4k tokens (SKILL.md is roughly 9.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 3.4k tokens, read only when the agent opens those files.

What are the alternatives to Self Configuration?

Skills that share tags, products or a category with Self Configuration: Self Configuration (letta-ai/letta-code, 3.6k stars), Contextpilot Savings (EfficientContext/ContextPilot, 141 stars), Prompt Improver (severity1/claude-code-prompt-improver, 1.9k stars) and Context Compression (guanyang/open-agent-hub, 977 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Self Configuration?

letta-ai (a GitHub organization) maintains it in letta-ai/skills, which has 149 GitHub stars. The repository holds 22 skills in this directory. The repository was last updated on October 1, 2026.

Source: letta-ai/skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.