garrytan / garrytan/gstack

Add Letta Code as a supported host

Open
#2,117 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
133k
Forks
19.9k
Avg merge
18h 46m
Merged PRs (30d)
26

Description

## Summary

Request to add [Letta Code](https://docs.letta.com/letta-code/index.md) as a supported host in gstack's declarative host config system.

Letta Code is an AI coding agent by [Letta Corporation](https://letta.com) — the team behind the open-source Letta framework for stateful LLM agents. It runs as a CLI (`letta`)
installed via `npm install -g @letta-ai/letta-code` and shares a similar skill format to Claude Code (markdown `SKILL.md` files with YAML frontmatter).

## Why

Letta Code is gaining traction as a coding agent with unique capabilities:
- **Persistent memory** — agents retain context across sessions via MemFS (git-backed memory filesystem)
- **Skills system** — `SKILL.md` files with `name` and `description` frontmatter, discovered and loaded on demand
- **Mods** — TypeScript mods at `~/.letta/mods/` that extend the harness with tools, commands, events, panels, and providers
- **Subagents** — agents can spawn specialized subagents for parallel work
- **Hooks** — `PreToolUse`, `Stop`, and other lifecycle hooks for safety and automation
- **Crons** — self-invocation for time-based task scheduling

Adding Letta Code as a host would let gstack's 23+ specialist skills (office-hours, plan-ceo-review, review, qa, ship, etc.) work with Letta Code, expanding gstack's reach to another AI
coding agent.

## Proposed Host Config

Based on `docs/ADDING_A_HOST.md`, here's a starting point for `hosts/letta.ts`:

```typescript
import type { HostConfig } from '../scripts/host-config';

const letta: HostConfig = {
name: 'letta',
displayName: 'Letta Code',
cliCommand: 'letta',
cliAliases: ['letta-code'],

globalRoot: '.letta/skills/gstack',
localSkillRoot: '.letta/skills/gstack',
hostSubdir: '.letta',
usesEnvVars: true,

frontmatter: {
mode: 'allowlist',
keepFields: ['name', 'description'],
descriptionLimit: null,
},

generation: {
generateMetadata: false,
skipSkills: ['codex'],
},

pathRewrites: [
{ from: '~/.claude/skills/gstack', to: '~/.letta/skills/gstack' },
{ from: '.claude/skills/gstack', to: '.letta/skills/gstack' },
{ from: '.claude/skills', to: '.letta/skills' },
],

runtimeRoot: {
globalSymlinks: ['bin', 'browse/dist', 'browse/bin', 'gstack-upgrade', 'ETHOS.md'],
globalFiles: { 'review': ['checklist.md', 'TODOS-format.md'] },
},

install: {
prefixable: false,
linkingStrategy: 'symlink-generated',
},

learningsMode: 'basic',
};

export default letta;

Letta Code specifics

│ Item │ Value │
├──────────────────┼──────────────────────────────────────────────────────────────────────────┤
│ CLI binary │ `letta` (installed via `npm install -g @letta-ai/letta-code`) │
│ Skills directory │ `~/.letta/skills/` (env-level, shared across agents) │
│ Skill format │ `SKILL.md` with YAML frontmatter (`name`, `description`) │
│ Project config │ `AGENTS.md` (equivalent of `CLAUDE.md`) │
│ Docs │ [docs.letta.com/letta-code](https://docs.letta.com/letta-code/index.md) │
│ GitHub │ [github.com/letta-ai/letta-code](https://github.com/letta-ai/letta-code) │

Skill format compatibility

Letta Code's SKILL.md format is nearly identical to Claude Code's:

---
name: skill-name
description: When to use this skill
---

# Skill content...

The frontmatter uses name and description — the same fields gstack's allowlist mode already keeps. No frontmatter transformation should be needed beyond the standard allowlist.

Tool name mapping

Letta Code's built-in tools use similar names to Claude Code:

│ Claude Code │ Letta Code │
├─────────────┼───────────────┤
│ Bash │ Bash │
│ Read │ Read │
│ Write │ Write │
│ Edit │ Edit │
│ Glob │ Glob │
│ Grep │ Grep │
│ WebSearch │ web_search │
│ WebFetch │ fetch_webpage │

Most tool references in gstack skills should work as-is or with minimal rewrites.

Checklist

- [ ] Create hosts/letta.ts with the config above
- [ ] Register in hosts/index.ts
- [ ] Add .letta/ to .gitignore
- [ ] Run bun run gen:skill-docs --host letta and verify output
- [ ] Verify no .claude/skills path leakage in generated docs
- [ ] Run bun test test/gen-skill-docs.test.ts and bun test test/host-config.test.ts
- [ ] Update README.md with Letta Code install instructions
- [ ] Add --host letta to the setup table

Install command (for README)

git clone --single-branch --depth 1 https://github.com/garrytan/gstack.git ~/gstack
cd ~/gstack && ./setup --host letta

Or from within Claude Code with gstack already installed:

Install gstack for Letta Code: run `cd ~/.claude/skills/gstack && ./setup --host letta`

Context

I'm a Letta Code user and would love to use gstack's workflow skills (especially /office-hours, /review, /qa, and /ship) with Letta Code. Happy to help test or contribute a PR if
there's interest.

Contributor guide

Open the contributing guide

Research direction

Start with docs/ADDING_A_HOST.md and the existing host configs, then add the proposed integration in hosts/letta.ts and register it in hosts/index.ts. Run bun run gen:skill-docs --host letta, inspect generated paths for .claude/skills leakage, and run test/gen-skill-docs.test.ts and test/host-config.test.ts. Done includes the .gitignore and README.md setup updates from the checklist.

Written by the indexing model from the issue text.

Assessment

Tech stack
nodejs, typescript
Domain
cli, tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.