Agent skill

Adding Models

by letta-ai in letta-ai/letta-code

Guide for adding new LLM models to Letta Code. An agent skill from letta-ai/letta-code.

Apache-2.0Auto-check passed

Install Adding Models

skills CLI
$ npx skills add letta-ai/letta-code --skill adding-models -a claude-code

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

GitHub CLI
$ gh skill install letta-ai/letta-code adding-models --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/letta-code.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.skills/adding-models .claude/skills/adding-models && 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
adding-models
GitHub stars
3.5k
Token cost
~1k tokens
SKILL.md length
443 words
Files
1
Skills in repo
25
Repo updated
First seen
Licence
Apache-2.0

At a glance

Guide for adding new LLM models to Letta Code. An agent skill from letta-ai/letta-code.

  • Works in 4 steps: Find Valid Model Handles → Update the Owning Catalog → Test the Model → …
  • The user wants to add support for a new model
  • SKILL.md covers Quick Reference, Workflow, Toolset Detection and Common Issues
  • Calls curl, jq and bun; reaches api.letta.com

What it does

Adding Models is an agent skill from letta-ai/letta-code. Guide for adding new LLM models to Letta Code. Use when the user wants to add support for a new model, needs to know valid model handles, or wants to update model-specific compatibility behavior. Covers runtime catalog sources, CI test matrices, and handle validation.

Its SKILL.md is about 1k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

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 Apache-2.0.

When your agent uses it

  • The user wants to add support for a new model
  • Needs to know valid model handles
  • Wants to update model-specific compatibility behavior

Example prompts

  • “/adding-models”

Workflow steps

4 steps, taken from the step headings in SKILL.md.

  1. Find Valid Model Handles
  2. Update the Owning Catalog
  3. Test the Model
  4. Add to CI Test Matrix (Optional)

What it can do on your machine

Read from SKILL.md and the folder at commit 42397c7. 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

    Shell commands in SKILL.md call:

    • curl
    • jq
    • bun

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

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • api.letta.com

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

  • Credentials

    Names no API keys, tokens, secrets or passwords.

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

Context cost

Adding Models loads about 1k tokens when it runs. Until then it costs about 71 tokens; SKILL.md has 443 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~71
When it runs · the whole SKILL.md, loaded when a task matches
~1k

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); files beside SKILL.md are not scanned.

SKILL.md

The full file from letta-ai/letta-code at commit 42397c7, republished under its Apache-2.0 licence (© letta-ai). 443 words, ~1,048 tokens.

Download SKILL.mdSave it as .claude/skills/adding-models/SKILL.md (or your agent's skills folder).
name
adding-models
description
Guide for adding new LLM models to Letta Code. Use when the user wants to add support for a new model, needs to know valid model handles, or wants to update model-specific compatibility behavior. Covers runtime catalog sources, CI test matrices, and handle validation.

Adding Models

This skill guides you through adding a new LLM model to Letta Code.

Quick Reference

Key files:

  • src/agent/remote-model-catalog.ts - Runtime catalog loading and projection
  • src/agent/model-catalog.ts - Model lookup and compatibility aliases
  • .github/workflows/ci.yml - CI test matrix (optional)
  • src/tools/manager.ts - Toolset detection logic (rarely needed)

Workflow

Step 1: Find Valid Model Handles

First identify the agent source. These inputs are deliberately different:

Agent sourceRows shownLabels, presets, and capabilities
Cloud hostedGET /v1/models/catalog onlyGET /v1/models/catalog
Cloud organization BYOKBYOK rows from GET /v1/modelsMatch to catalog metadata using provider metadata and model name; retain the BYOK handle for selection
Localpi-ai inventorypi-ai metadata
Custom App ServerServer runtime inventoryServer runtime metadata

In Cloud mode, never use base/hosted rows from GET /v1/models to filter, supplement, delay, or provide a fallback for the hosted catalog. This once made GPT-4o appear in a selector even though the Cloud catalog deliberately omitted it. GET /v1/models remains necessary for organization-specific BYOK rows.

Query the Cloud hosted catalog to see hosted preset IDs, handles, and capabilities:

bash
curl -s https://api.letta.com/v1/models/catalog | jq '.models[] | [.id, .handle]'

To inspect organization BYOK rows from a Cloud backend, query its model inventory and filter by provider_category:

bash
curl -s https://api.letta.com/v1/models/ \
  | jq '.[] | select(.provider_category == "byok") | [.handle, .provider_type]'

Do not use this response as a second hosted catalog.

Common provider prefixes:

  • anthropic/ - Claude models
  • openai/ - GPT models
  • google_ai/ - Gemini models
  • google_vertex/ - Vertex AI
  • openrouter/ - Various providers
Show full SKILL.md (227 more words)Show less
Step 2: Update the Owning Catalog

Letta Code does not bundle a model catalog:

  • Cloud hosted rows and presets come from the server's GET /v1/models/catalog response.
  • Cloud GET /v1/models contributes only organization BYOK rows to selectors.
  • Local model inventory comes from pi-ai and the active provider runtimes.

Add the model at the source that owns it. A hosted preset belongs in the server catalog. A local provider model belongs in pi-ai or that provider's discovery runtime.

Only change this repository when the model needs Letta Code-specific compatibility behavior, such as preserving an established CLI alias or recognizing a new provider for toolset selection. Keep that logic narrow and derive the handle and metadata from the runtime catalog rather than copying model definitions here.

Step 3: Test the Model

Test with headless mode:

bash
bun run src/index.ts --new --model <model-id> -p "hi, what model are you?"

Example:

bash
bun run src/index.ts --new --model gemini-3-flash -p "hi, what model are you?"
Step 4: Add to CI Test Matrix (Optional)

To include the model in automated testing, add it to .github/workflows/ci.yml:

yaml
# Find the headless job matrix around line 122
model: [gpt-5-minimal, gpt-4.1, sonnet-4.5, gemini-pro, your-new-model, glm-4.6, haiku]

Toolset Detection

Models are automatically assigned toolsets based on provider:

  • openai/* → codex toolset
  • google_ai/* or google_vertex/* → gemini toolset
  • Others → default toolset

This is handled by isGeminiModel() and isOpenAIModel() in src/tools/manager.ts. You typically don't need to modify this unless adding a new provider.

Common Issues

"Handle not found" error: The model handle is incorrect. Run the validation script to see valid handles.

Model works but wrong toolset: Check src/tools/manager.ts to ensure the provider prefix is recognized.

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

Files

Just SKILL.md in .skills/adding-models of letta-ai/letta-code.

Open the folder on GitHubat commit 42397c7

Compare with similar skills

Adding Models 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.

Adding Models compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Adding Models this skillletta-ai/letta-code3.5k—~1kAutomated safety check: PassApache-2.0
Lettabotletta-ai/lettabot326—~3.4kAutomated safety check: PassApache-2.0
Creating Letta Code Channelsletta-ai/skills147—~1.1kAutomated safety check: PassMIT
Letta Configurationletta-ai/skills147—~1.3kAutomated safety check: NotesMIT
Letta Filesystem To Memfsletta-ai/skills147—~1.3kAutomated safety check: PassMIT
Navigating Chatgpt Historyletta-ai/skills147—~1.3kAutomated safety check: PassMIT

Similar skills

  • Lettabot

    letta-ai/lettabot

    Set up and run LettaBot - a multi-channel AI assistant for Telegram, Slack, Discord, WhatsApp, and Signal.

    326 GitHub stars~3.4k tokensUpdated 4 mo ago
    Productivity & AutomationAuto-check passed
  • Builds and debugs Letta Code channels, including first-party channel adapters and dynamic user channel plugins under ~/.letta/channels.

    147 GitHub stars~1.1k tokensUpdated 6 days ago
    Writing & ContentAuto-check passed
  • Letta Configuration

    letta-ai/skills

    Configure LLM models and providers for Letta agents and servers.

    147 GitHub stars~1.3k tokensUpdated 6 days ago
    DevOps & CloudAuto-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.

    147 GitHub stars~1.3k tokensUpdated 6 days ago
    Documents & OfficeAuto-check passed
  • Navigates archived ChatGPT or Claude-style conversation exports and a MemFS reference archive on demand.

    147 GitHub stars~1.3k tokensUpdated 6 days ago
    Auto-check passed
  • 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.

    147 GitHub stars~2.4k tokensUpdated 6 days ago
    AI & LLM EngineeringAuto-check passed

More from letta-ai/letta-code

All 25 skills in this repo
  • Creating Skills

    letta-ai/letta-code

    Guide for creating effective skills. An agent skill from letta-ai/letta-code.

    3.5k GitHub stars~4.6k tokensUpdated today
    Auto-check passed
  • Generating Mod Envs

    letta-ai/letta-code

    Generates and reviews mod learning env JSON files for Letta Code local mods.

    3.5k GitHub stars~1.5k tokensUpdated today
    Auto-check passed
  • Initializing Memory

    letta-ai/letta-code

    Comprehensive guide for initializing or reorganizing agent memory.

    3.5k GitHub stars~4.8k tokensUpdated today
    Auto-check passed
  • 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.5k GitHub stars~7k tokensUpdated today
    Auto-check passed
  • Browser Use

    letta-ai/letta-code

    Control a real browser to navigate pages, click, type, fill forms, inspect rendered UI, take screenshots, or record video.

    3.5k GitHub stars~3.3k tokensUpdated today
    Auto-check passed
  • Creating Mods

    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.

    3.5k GitHub stars~2.5k tokensUpdated today
    Auto-check passed

Works with

Questions about Adding Models

What does Adding Models do?

Guide for adding new LLM models to Letta Code. An agent skill from letta-ai/letta-code. Adding Models is an agent skill from letta-ai/letta-code. Guide for adding new LLM models to Letta Code.

When should I use Adding Models?

Adding Models fits situations like: the user wants to add support for a new model; needs to know valid model handles; wants to update model-specific compatibility behavior.

How do I install Adding Models in Claude Code?

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

How do I install Adding Models in Codex?

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

Can I use Adding Models 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/letta-code --skill adding-models -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/adding-models, .gemini/skills/adding-models, .github/skills/adding-models and .opencode/skills/adding-models in your project.

What does Adding Models need to run?

Going by SKILL.md and its folder, Adding Models needs the command-line tools its instructions call (curl, jq and bun).

Does Adding Models access the network?

SKILL.md names 1 domain. In commands or code: api.letta.com; the agent is likely to contact it when it follows the instructions. This is read from the text; nothing was executed.

Is Adding Models 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. Review the folder before installing.

What licence does Adding Models use?

Adding Models is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Adding Models use?

About 1k tokens (SKILL.md is roughly 4.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Adding Models?

Skills that share tags, products or a category with Adding Models: Lettabot (letta-ai/lettabot, 326 stars), Creating Letta Code Channels (letta-ai/skills, 147 stars), Letta Configuration (letta-ai/skills, 147 stars) and Letta Filesystem To Memfs (letta-ai/skills, 147 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Adding Models?

letta-ai (a GitHub organization) maintains it in letta-ai/letta-code, which has 3,541 GitHub stars. The repository holds 25 skills in this directory. The repository was last updated on October 8, 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.