Self Configuration
letta-ai/skills
Configures Letta agents' own runtime behavior, including model, context window, system prompt, reasoning, conversation overrides, compaction settings, and compaction prompts.
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.
$ npx skills add letta-ai/letta-code --skill self-configuration -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install letta-ai/letta-code self-configuration --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/letta-ai/letta-code.git skills-src && mkdir -p .claude/skills && cp -r skills-src/src/skills/builtin/self-configuration .claude/skills/self-configuration && rm -rf skills-srcUse ~/.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/
Install the "self-configuration" agent skill from https://github.com/letta-ai/letta-code/tree/main/src/skills/builtin/self-configuration into .claude/skills/self-configuration/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "self-configuration", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/letta-ai/letta-code/tree/main/src/skills/builtin/self-configurationType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add letta-ai/letta-code --skill self-configuration -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install letta-ai/letta-code self-configuration --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/letta-ai/letta-code.git skills-src && mkdir -p .agents/skills && cp -r skills-src/src/skills/builtin/self-configuration .agents/skills/self-configuration && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "self-configuration" agent skill from https://github.com/letta-ai/letta-code/tree/main/src/skills/builtin/self-configuration into .agents/skills/self-configuration/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "self-configuration", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add letta-ai/letta-code --skill self-configuration -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install letta-ai/letta-code self-configuration --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/letta-ai/letta-code.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/src/skills/builtin/self-configuration .cursor/skills/self-configuration && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "self-configuration" agent skill from https://github.com/letta-ai/letta-code/tree/main/src/skills/builtin/self-configuration into .cursor/skills/self-configuration/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "self-configuration", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/letta-ai/letta-code.git --path src/skills/builtin/self-configuration--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add letta-ai/letta-code --skill self-configuration -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install letta-ai/letta-code self-configuration --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/letta-ai/letta-code.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/src/skills/builtin/self-configuration .gemini/skills/self-configuration && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "self-configuration" agent skill from https://github.com/letta-ai/letta-code/tree/main/src/skills/builtin/self-configuration into .gemini/skills/self-configuration/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "self-configuration", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install letta-ai/letta-code self-configurationInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add letta-ai/letta-code --skill self-configuration -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/letta-ai/letta-code.git skills-src && mkdir -p .github/skills && cp -r skills-src/src/skills/builtin/self-configuration .github/skills/self-configuration && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "self-configuration" agent skill from https://github.com/letta-ai/letta-code/tree/main/src/skills/builtin/self-configuration into .github/skills/self-configuration/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "self-configuration", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add letta-ai/letta-code --skill self-configuration -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install letta-ai/letta-code self-configuration --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/letta-ai/letta-code.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/src/skills/builtin/self-configuration .opencode/skills/self-configuration && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "self-configuration" agent skill from https://github.com/letta-ai/letta-code/tree/main/src/skills/builtin/self-configuration into .opencode/skills/self-configuration/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "self-configuration", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
self-configurationInspect 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.
Self Configuration is an agent skill from 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. Use when the user asks how this agent or conversation is configured, asks about account usage, remaining credits, or model quota, asks you to change how you behave or how the harness runs you, or renames you.
Its SKILL.md is about 7k tokens, which your agent loads only when the skill is triggered. The skill folder holds 10 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. It works with Letta. The repository describes itself as: Stateful agents that are like people, with memory, identity, and the ability to learn and adapt. The licence is MIT.
6 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit d31b879. It shows what the files ask for, not the result of running them.
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.
Ships 4 files in scripts/ (Python and TypeScript), which the agent can run.
Shell commands in SKILL.md call:
npxpython3opensslFrom the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md. Its commands use npx, which can reach the network depending on how they are called.
From URLs in SKILL.md, links to its own repository left out.
Names these keys or tokens, usually read from environment variables:
LETTA_API_KEYGITHUB_TOKENWEBHOOK_TOKENFrom names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Self Configuration loads about 7k tokens when it runs, and up to ~11k if it reads all its reference files. Until then it costs about 105 tokens; SKILL.md has 3,082 words of instructions outside code blocks.
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.
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.
The full file from letta-ai/letta-code at commit d31b879, republished under its MIT licence (© letta-ai). 3,082 words, ~6,961 tokens.
.claude/skills/self-configuration/SKILL.md (or your agent's skills folder). This skill also uses 8 other files; get the full folder from GitHub.Use this skill when the user asks you to change yourself or the Letta Code runtime around you.
The important part is choosing the right layer. Do not smear a preference into deterministic config, and do not bury a deterministic safety rule in prose memory.
| Layer | Use it for | How to change it |
|---|---|---|
| Memory and identity | Facts worth retaining, style preferences, persona changes, project knowledge, reusable skills | Edit $MEMORY_DIR files and sync the memory repo |
| Server agent fields | Agent default model (only on explicit request), context limit, system prompt, compaction, agent name, description | Patch /v1/agents/{agent_id} |
| Server conversation fields | Model/context changes for the current conversation (the normal target) | Patch /v1/conversations/{conversation_id} |
| Local settings | Permissions, environment variables, UI/runtime preferences, pinned agents, toolset overrides, reflection cadence | Edit ~/.letta/settings.json, ./.letta/settings.json, or ./.letta/settings.local.json |
| Mods | New deterministic tools, slash commands, providers, statusline behavior, or lightweight UI | Load creating-mods, customizing-commands, or customizing-statusline |
| Skills | Reusable procedural knowledge or bundled scripts | Load creating-skills or acquiring-skills |
| Channels | Slack/Discord/Telegram/WhatsApp/Signal accounts, pairing, routing, listener state | Use letta channels or channel commands |
| Schedules | Reminders and recurring prompts | Load scheduling-tasks and use letta cron |
| Agent secrets | Per-agent $NAME credential values for shell commands | Use letta secret (or /secret in a session) |
Decision rule: if the model should remember and reason about it, use memory. If the runtime must enforce it or route it before the model decides anything, use settings, API fields, mods, channels, or schedules.
Never print secrets. If inspecting env settings, list keys unless the user explicitly asks for values and the values are safe to reveal.
These helper scripts reduce accidental harm. They are not a security boundary against an agent with unrestricted Bash, raw curl/SDK access, API credentials, or filesystem access. LETTA_API_KEY and the installed CLI may have authority over other agents visible to the same account/server.
Never target another agent or conversation unless explicitly directed and verified. If AGENT_ID or CONVERSATION_ID is set, the server-setting helpers reject mismatched live/GET operations unless --allow-other-agent is present. If the current env ID is absent, explicit IDs remain usable for out-of-band recovery.
If a broken model or prompt prevents the agent from completing a turn, recover out of band from another shell or client with the CLI/API. Do not depend on the broken model to repair itself.
Local settings, server state, and the current process are different sources of truth. Inspect the layer you intend to change before writing it.
letta model list [--byok | --hosted] lists available models.letta model set [model_handle] [--reasoning <reasoning-option>] [--model-settings <json>] [--default] changes the current conversation's model, reasoning, or individual model_settings fields; add --default only when the user asks for the agent default.letta model get [--default] gets the current model configuration, including the full redacted model_settings; --default gets the agent's default configuration.letta model reads and writes through the active backend, so it works the same on every backend. Prefer it over the REST helper scripts for anything model-related.
Run letta usage for a Markdown overview of the current plan, credit balance, and letta/* model quota (lettaTier only). Report the server's bucket (full, high, medium, low, or empty) and quota/daily reset timestamps as-is; do not infer exact requests or percentages. Amounts are credits, not dollars; preserve negative balances. An omitted daily reset is shown as unavailable.
The command uses CLI auth and respects LETTA_API_KEY/LETTA_BASE_URL, not agent or conversation selectors. Credits belong to the organization; user-scoped quota belongs to the authenticated user, not necessarily the person chatting with the agent. In local mode, use letta --backend cloud usage only when the user wants Cloud account usage.
Use letta model list for available models; credits and quota buckets do not guarantee inference availability. letta usage does not include session token statistics; the interactive /usage command is a separate surface. If either lookup fails, the command exits nonzero without partial usage. Treat that as unavailable data, not zero credits or exhausted quota.
The same model can often be reached through more than one route: a connected subscription (for example a ChatGPT or Grok plan), the Letta plan (letta/*), or per-token billing against organization credits or the user's own API key. Users choose provider names, so a handle's prefix does not reliably show which route it bills through.
Before switching models, consider how the current model is billed and keep the user on that route unless they asked to change it. Use the current handle, the labels in letta model list, and anything the user has said about billing as evidence. If several available handles serve the requested model and you cannot tell which one uses the user's subscription, list the candidates and ask before switching. Do not silently move a user from a subscription to per-token billing.
letta model list --byok includes both connected subscriptions and user API keys, so it does not separate the two. letta usage covers only Letta credits and letta/* quota, not connected subscriptions.
Use the secret-safe local/runtime report for harness settings, permissions, and backend diagnostics:
python3 <SKILL_DIR>/scripts/show_config.py --cwd "$PWD"Read each model scope with letta model get before changing it:
letta model get # current conversation (or agent if none)
letta model get --default # agent default
letta model get --conversation "$CONVERSATION_ID"Do not infer an agent default from one conversation or infer a conversation override from the agent. Report both when diagnosing model or context differences.
If CLI behavior does not match the docs, stop and inspect command -v letta, type -a letta, and letta --version. A stale or shadowed binary is a config bug, not a reason to guess.
Use memory when the user wants you to remember, prefer, learn, or change your identity/personality.
Inspect the projected memory tree in the system prompt before choosing paths. Letta Code supports two layouts:
| Purpose | Root layout | Existing layout |
|---|---|---|
| Identity and voice | $MEMORY_DIR/persona.md or another root persona file | $MEMORY_DIR/system/persona.md |
| Notes about the user | $MEMORY_DIR/human.md or another root human file | $MEMORY_DIR/system/human.md |
| Core memory | Other root Markdown files indexed by MEMORY.md | Markdown files under $MEMORY_DIR/system/ |
| Deferred memory | Directories with their own MEMORY.md | Files outside $MEMORY_DIR/system/ |
| Agent-owned skills | $MEMORY_DIR/skills/ | $MEMORY_DIR/skills/ |
Use the active layout shown by the prompt and memory files. Do not create a
system/ directory in a root-layout repository or move existing-layout memory
to the root as part of an unrelated self-configuration request.
A requested memory or identity change is memory as the main task: make the edit directly with ordinary file tools, preserve the active layout, stage only the files you changed by explicit path, commit in the same shell call, and verify the result before reporting success. If a memory worker you launched may still be running, read its output file first (it ends with [Task completed] or [Task failed]) and reread the files before editing what it was asked to change. Delegate to the background memory subagent only when the change is incidental to another task the user is waiting on.
Do not use API system-prompt replacement for ordinary learning. That can clobber the compiled prompt. Edit the memory files instead.
Server fields control model execution and agent metadata. Change the current conversation for model changes. Change the agent default only when the user asks for it.
Use letta model for the model handle, reasoning level, and any model_settings field (for example the output-token limit, temperature, or parallel_tool_calls). It goes through the active backend, so it needs no extra credentials or base URL.
letta model set "openai/gpt-5.2" # select a model (applies its defaults)
letta model set --reasoning high # change reasoning only
letta model set --model-settings '{"max_tokens":16384}' # use the key `letta model get` shows
letta model set --model-settings '{"temperature":0.2}' --default # agent default
letta model get # verify--model-settings takes a JSON object and shallow-merges it into the target's current model_settings (the conversation override when a conversation is targeted, otherwise the agent default). It keeps the model and every field you do not name. Keys are written as given, so use the field names that letta model get shows for the target; for example the output-token limit is stored as max_tokens on some backends and max_output_tokens on others. Nested objects such as reasoning are replaced as a whole, so include every nested key you want to keep. With a handle or --reasoning, the model selection is applied first and the given fields are merged on top. Selecting a new handle resets settings to that model's defaults, so reapply custom fields in the same command if needed.
Provider reasoning fields differ. Read references/model-settings.md before changing reasoning or provider-specific settings.
scripts/update-agent-settings.ts covers fields letta model does not: context_window_limit, name, description, and system prompt replacement. It talks to the REST API at LETTA_BASE_URL and requires LETTA_API_KEY, so it only works against a server that exposes the REST API; it does not work on the embedded local backend.
Required environment for live API writes:
export LETTA_API_KEY=...
export AGENT_ID=agent-...
export CONVERSATION_ID=conv-... # only needed for conversation-scoped changes
export LETTA_BASE_URL=... # required; use the current server, not a hard-coded Cloud URLThe scripts in this skill default to AGENT_ID, CONVERSATION_ID, and LETTA_BASE_URL. Server reads and writes require LETTA_BASE_URL or explicit --base-url; they never silently fall back to api.letta.com. Keep LETTA_BASE_URL paired with the LETTA_API_KEY supplied by the current runtime so local, self-hosted, and non-default Cloud environments are not accidentally redirected. Pass explicit IDs when there is any doubt. --show fetches the selected agent or conversation and prints only safe effective fields. Server operations reject target IDs that differ from the current env ID unless --allow-other-agent is passed. Dry-run output is labeled: offline_partial_patch means no server state was fetched; effective_merged_patch means the script fetched current server state and shows the merged patch that would be sent.
npx tsx <SKILL_DIR>/scripts/update-agent-settings.ts --helpPatch the current conversation's context window limit:
npx tsx <SKILL_DIR>/scripts/update-agent-settings.ts \
--target conversation \
--conversation-id "$CONVERSATION_ID" \
--context-window-limit 64000 \
--dry-runPatch the agent default only when the user asks for it:
npx tsx <SKILL_DIR>/scripts/update-agent-settings.ts \
--target agent \
--agent-id "$AGENT_ID" \
--context-window-limit 64000Name and description are agent-level metadata. Do not pass them with --target conversation. Values must be non-empty; the helper does not clear metadata by accident.
When the user renames you, this patch is the authoritative change — editing a name written in persona memory does not change the agent's actual name. Do both: patch the agent name here, then update any memory file that states your name so they agree.
npx tsx <SKILL_DIR>/scripts/update-agent-settings.ts \
--target agent \
--agent-id "$AGENT_ID" \
--name "repo-maintainer" \
--dry-run
npx tsx <SKILL_DIR>/scripts/update-agent-settings.ts \
--target agent \
--agent-id "$AGENT_ID" \
--description "Maintains repository configuration and review-ready PRs." \
--dry-runDo not patch llm_config directly. Use letta model for the model and model_settings, context_window_limit for the context limit, and name/description for metadata. Then read back the agent or conversation (letta model get for model fields) and verify the result.
Compaction controls how old messages are summarized when context is evicted. Bad compaction prompts cause delayed, progressive context loss as future compactions discard useful state. Good ones preserve goals, files, commands, test results, blockers, and current state.
Use the helper for prompt changes. Even --dry-run fetches current compaction settings so omitted fields are preserved in the preview. Live writes require --confirm-compaction-prompt.
npx tsx <SKILL_DIR>/scripts/update-compaction-prompt.ts \
--prompt-file /tmp/compaction-prompt.txt \
--mode self_compact_sliding_window \
--clip-chars 50000 \
--dry-runRead references/compaction-prompt-patterns.md before drafting a new prompt.
This is a sharp tool. A bad system prompt can self-brick the agent. Use it only when the user explicitly asks to replace the server-side system prompt or when repairing a known server-side prompt state. Live writes require --confirm-system-replacement; dry runs do not.
npx tsx <SKILL_DIR>/scripts/update-agent-settings.ts \
--target agent \
--agent-id "$AGENT_ID" \
--system-file /tmp/new-system-prompt.txt \
--dry-runFor normal behavioral changes, edit memory. For startup preset selection, use --system <preset> or --system-custom <file> when launching Letta Code.
Settings scopes:
| File | Scope | Typical contents |
|---|---|---|
~/.letta/settings.json | User/global | Permissions, env keys, experiments, UI/runtime preferences, agents[] entries |
./.letta/settings.json | Project/shared | Project settings committed with the repo |
./.letta/settings.local.json | Project-local | Personal project overrides, usually gitignored |
Precedence is local > project > user. Permission rule lists are merged; scalar settings usually override. When editing JSON directly, preserve unknown fields, keep the file schema-valid, and inspect the effective config afterward instead of rewriting the whole file from a guessed shape.
Inspect merged local config and the current runtime with:
python3 <SKILL_DIR>/scripts/show_config.py --cwd "$PWD"
python3 <SKILL_DIR>/scripts/show_config.py --cwd "$PWD" --json
python3 <SKILL_DIR>/scripts/show_config.py --cwd "$PWD" --section runtime --jsonSelected global settings keys:
| Key | Meaning |
|---|---|
tokenStreaming | Stream tokens in UI |
reasoningTabCycleEnabled | Let Tab cycle reasoning tiers when enabled |
showCompactions | Show compaction activity |
sessionContextEnabled | Send device/agent context at session start |
autoConversationTitles | Generate conversation titles |
autoSwapOnQuotaLimit | Auto-switch temporary model on quota errors |
includeWorktreeTool | Include worktree tool in toolsets |
preferredBackendMode | Startup backend preference, api or local |
channelCredentialsStore | Channel token storage, file, keyring, or auto |
reflectionTrigger / reflectionStepCount | Default reflection cadence |
reflectionMerge / reflectionMergeInstructions | Reflection change integration policy |
reflectionSettingsByAgent | Per-agent reflection cadence |
conversationSwitchAlertEnabled | Send system-reminder when switching conversations/agents |
createDefaultAgents | Create Memo/Incognito default agents on startup (default: true) |
windowTitle | Configurable terminal window title fields |
permissions | Allow/deny/ask/alwaysAsk rules |
env | User-wide environment variables for Letta Code |
experiments | Feature flags |
agents[] | Per-agent pinned/memfs/toolset/system-prompt metadata |
Per-agent agents[] entries are keyed by agentId plus server. For api.letta.com, baseUrl may be omitted. For another server, preserve the server key.
Base URL resolution is split between runtime API calls and settings lookup. Runtime API calls require LETTA_BASE_URL or an explicit script --base-url; do not replace it with a hard-coded Cloud URL. Settings server keys resolve from LETTA_SETTINGS_BASE_URL, env.LETTA_SETTINGS_BASE_URL, LETTA_BASE_URL, env.LETTA_BASE_URL, then api.letta.com. Do not move agents[] entries across base URLs unless the user is deliberately migrating servers.
Toolset values currently include auto, letta, default, codex, and none. Use auto unless the user explicitly wants a manual override.
Permissions decide whether tool calls are allowed, denied, or require approval. User/global permission rules affect all agents using that settings file: allow can weaken review, while deny and alwaysAsk can brick workflows. Valid modes are standard, acceptEdits, unrestricted, and strict; legacy default maps to standard, while bypassPermissions and fullAccess map to unrestricted. The default mode is unrestricted unless startup flags or settings override it.
The removed memory mode is invalid; memory access is governed by normal tool permissions plus the server/filesystem checks on the path used. These helper guardrails do not restrict raw Bash/API access. permissions.mode supplies a persisted startup default, rule lists still take precedence, and channel accounts have their own defaultPermissionMode. Inspect all three when channel approvals differ from the interactive CLI.
Rule examples:
{
"permissions": {
"mode": "standard",
"allow": ["Bash(git diff:*)", "Read(src/**)"],
"deny": ["Bash(rm -rf:*)"],
"ask": ["Write(**/*.md)"],
"alwaysAsk": ["Bash(git push:*)"]
}
}Rule types:
| Type | Behavior |
|---|---|
allow | Approve matching calls |
deny | Block matching calls |
ask | Request approval in normal permission modes |
alwaysAsk | Request approval even in unrestricted/yolo mode |
Add a rule with the helper:
python3 <SKILL_DIR>/scripts/add_permission.py \
--rule "Bash(git push:*)" \
--type alwaysAsk \
--scope user \
--confirm-user-scopeadd_permission.py only adds rules. Remove rules manually for now. User/global writes require --confirm-user-scope; use --dry-run to preview. Use project or local scope only when the current working directory is deliberately the project root.
Use mods when the user wants deterministic runtime behavior that cannot be represented as a simple setting. Managed mods are global for the user install, not per-agent:
Load creating-mods before implementing mods. Load customizing-commands for slash commands and customizing-statusline for statusline work.
Inspect and control managed mod packages with:
letta mods list
letta mods disable <package-spec>
letta mods enable <package-spec>
letta mods remove <package-spec>Run /reload in active sessions afterward. Loose source files and agent-scoped mods are not individually registry-toggleable; move, rename, or remove the file, or use --no-mods / LETTA_DISABLE_MODS=1 to disable all mods for a new process.
Use skills when the user wants you to become good at a repeatable workflow. Sources are discovered in this order:
.agents/skills/ with .skills/ as legacy fallback$MEMORY_DIR/skills/~/.letta/skills/Load creating-skills to create or edit a skill. Load acquiring-skills when the user asks for a capability you do not already have. Project, global, bundled, and agent-owned skills have different visibility; verify the target scope before changing skills another agent may load.
Agent-scoped secrets hold credential values that are referenced as $NAME in shell commands. Cloud agents store them server-side on the agent; local agents use OS secure storage. The harness substitutes $NAME at exec time and scrubs values from tool output, so values never enter agent context.
letta secret list # names only, never values
letta secret set GITHUB_TOKEN --env GITHUB_TOKEN # ingest from the environment
openssl rand -hex 32 | letta secret set WEBHOOK_TOKEN --stdin # generate without seeing the value
letta secret unset GITHUB_TOKEN # aliases: delete | remove | rmRules:
--env, not $NAME. --env $GITHUB_TOKEN triggers harness substitution and places the resolved value in process arguments; --env GITHUB_TOKEN reads it from the CLI process environment without exposure.--stdin.AGENT_ID/LETTA_AGENT_ID resolves the target automatically; pass --agent <agent-id> otherwise./secret slash command manages the same store interactively and refreshes the live cache.Use channels when the user wants to talk through Slack, Discord, Telegram, WhatsApp, or Signal.
Useful commands:
letta channels status
letta channels configure <channel>
letta channels install <channel>
letta channels route list --channel <channel>
letta channels pair --channel <channel> --code <code> --agent <agent-id> --conversation <conversation-id>
letta server --channels <channel>Channel state lives under ~/.letta/channels/<channel>/ (config.yaml, accounts.json, routing/pairing files, and channel runtimes). Account tokens may be plaintext in file mode or keyring placeholders in keyring/auto mode. Configure storage with channelCredentialsStore (file, keyring, auto) or LETTA_CHANNEL_CREDENTIALS_STORE; do not treat keyring placeholders as usable secrets and do not print tokens. Channel configuration and pairing can route external messages to other agents/conversations; verify IDs and get human consent for interactive authorization.
letta channels configure <channel> is an interactive TTY wizard. Do not launch it as unattended work or claim setup succeeded while it is waiting for input; hand the authorization/setup step to the user.
Changing the credential-store mode does not migrate existing tokens. A file/keyring mismatch can make an otherwise configured listener fail with invalid_auth; verify where credentials are stored before changing the mode.
Use scheduling-tasks for reminders and recurring prompts. Under the hood it uses letta cron.
Examples:
letta cron list
letta cron add --name "weekly-review" --description "Weekly project review" --prompt "Ask the user for the weekly project review." --cron "0 9 * * 1" --agent "$AGENT_ID" --conversation "$CONVERSATION_ID"Scheduled tasks fire only while a Letta session/listener is running. Cron bindings can target other agents/conversations visible to the account; verify agent and conversation IDs explicitly when exact routing matters.
Some behavior is easiest to change at startup:
letta --model <model-id-or-handle>
letta --system <preset-id>
letta --system-custom /path/to/system.txt
letta --toolset auto
letta --permission-mode standard
letta --skills /path/to/skills
letta --skill-sources all,bundled,global,agent,project
letta --pre-load-skills self-configuration,creating-mods
letta --no-mods
letta --reflection-trigger step-count --reflection-step-count 25
letta --backend local
letta --memfsStartup flags affect a new process only. They do not rewrite an already-running listener. Persist long-term defaults in settings or server fields instead.
Before starting, replacing, or stopping a listener, inspect existing Letta processes and determine ownership: interactive shell, Desktop, launchd/systemd, supervisor, or another agent.
Do not start a second listener for the same channel accounts merely to apply new flags. Never stop or restart an existing listener without explicit coordination and user approval. Prefer changing the owned service configuration and then performing one approved restart.
references/api-patch-examples.md — manual API and SDK patch examplesreferences/model-settings.md — provider-specific model settings shapesreferences/compaction-prompt-patterns.md — compaction prompt templates| Script | Purpose |
|---|---|
scripts/update-agent-settings.ts | Show or patch REST-only agent/conversation fields (context limit, name, description, system prompt); needs a REST server and LETTA_API_KEY |
scripts/update-compaction-prompt.ts | Preserve existing compaction settings while replacing the prompt |
scripts/add_permission.py | Add allow/deny/ask/alwaysAsk rules to a chosen settings scope |
scripts/show_config.py | Show runtime/local settings without dumping secret values |
© 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
SKILL.md and 8 other files (scripts, references) in src/skills/builtin/self-configuration of letta-ai/letta-code.
Open the folder on GitHubat commit d31b879
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.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Self Configuration this skillletta-ai/letta-code | 3.6k | — | ~7k | Automated safety check: Pass | MIT | |
| Self Configurationletta-ai/skills | 149 | — | ~2.4k | Automated safety check: Pass | MIT | |
| Prompt Improverseverity1/claude-code-prompt-improver | 1.9k | 1 repos | ~1.7k | Automated safety check: Pass | MIT | |
| Prompt Engineering Patternsynulihao/AgentSkillOS | 618 | 14 repos | ~1.7k | Automated safety check: Pass | None | |
| Patch CreationPiebald-AI/tweakcc | 2.5k | — | ~1.6k | Automated safety check: Pass | MIT | |
| Senior Prompt Engineermaslennikov-ig/claude-code-orchestrator-kit | 260 | 3 repos | ~1.4k | Automated safety check: Pass | Custom licence |
letta-ai/skills
Configures Letta agents' own runtime behavior, including model, context window, system prompt, reasoning, conversation overrides, compaction settings, and compaction prompts.
severity1/claude-code-prompt-improver
This skill enriches vague prompts with targeted research and clarification before execution.
ynulihao/AgentSkillOS
Master advanced prompt engineering techniques to maximize LLM performance, reliability, and controllability in production.
Piebald-AI/tweakcc
Create and register new patches for tweakcc. An agent skill from Piebald-AI/tweakcc.
maslennikov-ig/claude-code-orchestrator-kit
Provides reference guides and Python scripts for prompt optimization, RAG evaluation, and agent orchestration when building or tuning LLM systems.
baskduf/FableCodex
Apply a Claude Fable 5 inspired operating style inside Codex.
letta-ai/letta-code
Guide for creating effective skills. An agent skill from letta-ai/letta-code.
letta-ai/letta-code
Generates and reviews mod learning env JSON files for Letta Code local mods.
letta-ai/letta-code
Comprehensive guide for initializing or reorganizing agent memory.
letta-ai/letta-code
Control a real browser to navigate pages, click, type, fill forms, inspect rendered UI, take screenshots, or record video.
letta-ai/letta-code
Creates and edits trusted local Letta Code mods, including tools, slash commands, local-only model providers, lifecycle/turn events, scoped conversation helpers, panels, and capability-gated behavior.
letta-ai/letta-code
Creates, edits, and migrates Letta Code statusline mods. An agent skill from letta-ai/letta-code.
Works with
Categories
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. Self Configuration is an agent skill from 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.
Self Configuration fits situations like: the user asks how this agent; conversation is configured; asks about account usage; remaining credits.
Run `npx skills add letta-ai/letta-code --skill self-configuration -a claude-code`. Or copy the skill folder (src/skills/builtin/self-configuration in letta-ai/letta-code) into .claude/skills/self-configuration in your project. Claude Code loads it when a task matches its description.
Run `npx skills add letta-ai/letta-code --skill self-configuration -a codex`. Or copy the skill folder (src/skills/builtin/self-configuration in letta-ai/letta-code) into .agents/skills/self-configuration in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add letta-ai/letta-code --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.
Going by SKILL.md and its folder, Self Configuration needs Python and TypeScript for the scripts in its folder, the command-line tools its instructions call (npx, python3 and openssl) and credentials named LETTA_API_KEY, GITHUB_TOKEN and WEBHOOK_TOKEN. Our summary lists: Python 3; Node.js; A credential in LETTA_API_KEY.
SKILL.md contains no URLs. Its commands use npx, which can reach the network depending on how they are called. This is read from the text; nothing was executed.
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.
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.
About 7k tokens (SKILL.md is roughly 28k 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.9k tokens, read only when the agent opens those files.
Skills that share tags, products or a category with Self Configuration: Self Configuration (letta-ai/skills, 149 stars), Prompt Improver (severity1/claude-code-prompt-improver, 1.9k stars), Prompt Engineering Patterns (ynulihao/AgentSkillOS, 618 stars) and Patch Creation (Piebald-AI/tweakcc, 2.5k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
letta-ai (a GitHub organization) maintains it in letta-ai/letta-code, which has 3,562 GitHub stars. The repository holds 25 skills in this directory. The repository was last updated on October 10, 2026.
Source: letta-ai/letta-code on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.