Skip to content

Add Letta agent#650

Open
codeluggage wants to merge 2 commits into
xenodium:mainfrom
codeluggage:add-letta-agent
Open

Add Letta agent#650
codeluggage wants to merge 2 commits into
xenodium:mainfrom
codeluggage:add-letta-agent

Conversation

@codeluggage

Copy link
Copy Markdown
Contributor

Closes #649

I've been using this for a while now and it works fairly well, though there are more and more features added that I haven't been able to keep up with.

Main concept here is that there's a permanent ongoing conversation, and stand-alone conversations. Memory is available in all of them, but the flow of conversation is more streamlined in the main chat.

I'm working on schedules next, which can open up some nice use cases as memory comes along with it.

Requires a few different pieces to work:

I don't mind maintaining agent-shell-letta.el in the other repo but it would rock to have it included in agent-shell!

The pitch, overall, would be completely offline, local memory. Can be done in a simple way with letta as a service in the cloud but they're making everything quite easy to use locally too. I have been using their service but I'm working on more fully fleshed out local version and there's some recent gaps that have been covered when it comes to scheduling things.

As far as documentation goes, it's a bit in flux right now. I suppose this PR serves as ok documentation right now and when the letta-ai/letta-code#2631 PR lands the documentation gets cleaner. Also cleaner on docs if agent-shell-letta.el gets to hang out here with the big boys.

Checklist

  • I agree to communicate (PR description and comments) with the author myself (not AI-generated).
  • [-] I've reviewed all code in PR myself and will vouch for its quality.
  • I've read and followed the Contributing guidelines.
  • I've filed a feature request/discussion for a new feature.
  • I'm making visual changes, so I'm including screenshots so you can view and discuss.
  • I've added tests where applicable.
  • [-] I've updated documentation where necessary.
  • I've run M-x checkdoc and M-x byte-compile-file.

Adds agent-shell-letta.el with a Letta Code agent configuration driven
through the letta-code-acp adapter (wraps 'letta -p' over ACP).

Letta agents are stateful with long-term memory, so alongside the
standard start command this adds two Letta-specific entry points:
agent-shell-letta-start-main-chat attaches to the agent's persistent
main conversation, and agent-shell-letta-start-conversation spawns an
isolated one.
Per CONTRIBUTING guidance on limiting defcustom: agent id, model, and
permission mode are plain environment passthroughs, so they are
documented as LETTA_* variables for agent-shell-letta-environment
instead of dedicated defcustoms. Conversation selection becomes an
internal defvar bound by the start commands.

@xenodium xenodium left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Thanks for the PR!

If I'm understanding correctly, we still need some of the PRs to land before agent-shell can use this, right? If so, let's wait until those land before we merge this one.

Also, can we please update the README to include similar information as other agents?

Comment thread agent-shell-letta.el
:client-maker (lambda (buffer)
(agent-shell-letta-make-client :buffer buffer))
:install-instructions
"Install the adapter with 'npm install -g letta-code-acp', or

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Like other agents, could we please link to its installation page so we always point to fresh instructions?

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.

Add support for memory through Letta

2 participants