Skip to content

feat: add Letta agent self-history analysis to /init skill#954

Open
sarahwooders wants to merge 2 commits intomainfrom
update-init-skill
Open

feat: add Letta agent self-history analysis to /init skill#954
sarahwooders wants to merge 2 commits intomainfrom
update-init-skill

Conversation

@sarahwooders
Copy link
Contributor

Add scripts and SKILL.md instructions for the agent to review its own past conversation history during /init, similar to the existing Claude Code/Codex history analysis flow.

New scripts:

  • detect-own-history.ts: list conversations + date ranges via Letta API
  • split-history.ts: split all history into chunk files (conversation × month)
  • extract-messages.ts: extract a single chunk (low-level building block)

Messages are filtered for signal: user messages in full, assistant truncated to 500 chars, reasoning to 200 chars, tool calls as one-liner summaries, tool returns dropped entirely. Chunks are pre-extracted to local files so history-analyzer subagents need no API access.

🐾 Generated with Letta Code

sarahwooders and others added 2 commits February 13, 2026 12:38
Add scripts and SKILL.md instructions for the agent to review its own
past conversation history during /init, similar to the existing
Claude Code/Codex history analysis flow.

New scripts:
- detect-own-history.ts: list conversations + date ranges via Letta API
- split-history.ts: split all history into chunk files (conversation × month)
- extract-messages.ts: extract a single chunk (low-level building block)

Messages are filtered for signal: user messages in full, assistant
truncated to 500 chars, reasoning to 200 chars, tool calls as one-liner
summaries, tool returns dropped entirely. Chunks are pre-extracted to
local files so history-analyzer subagents need no API access.

🐾 Generated with [Letta Code](https://letta.com)

Co-Authored-By: Letta <noreply@letta.com>
Cut from 110 lines to 38 by removing duplicate explanations,
verbose examples, and troubleshooting table already covered by
the Claude/Codex section.

🐾 Generated with [Letta Code](https://letta.com)

Co-Authored-By: Letta <noreply@letta.com>
// Main
// ---------------------------------------------------------------------------

async function main() {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

built-in scripts using the Letta API should be converted into CLI, similar to letta messages list, since it is much more robust for auth

Copy link
Collaborator

@cpacker cpacker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be folded into CLI not scripts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants