Learning Sdk banner
letta-ai letta-ai

Learning Sdk

AI community

Description

Drop-in SDK for adding continual learning and long-term memory to any LLM agent.

Installation

This entry records only its repository, not the path inside it, so there is no exact command to give. Open the source below and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

README

Learning SDK

Add continual learning and long-term memory to any LLM agent with one line of code. This SDK enables agents to learn from every conversation and recall context across sessions—making any agent across any platform stateful.

from openai import OpenAI
from agentic_learning import learning

client = OpenAI()

with learning(agent="my_agent"):
    response = client.chat.completions.create(...)  # LLM is now stateful!

[![pypi](https://img.shields.io/pypi/v/agentic-learning?color=blue)](https://pypi.python.org/pypi/agentic-learning) [![npm shield](https://img.shields.io/npm/v/@letta-ai/agentic-learning)](https://www.npmjs.com/package/@letta-ai/agentic-learning) [![License](https://img.shields.io/badge/license-Apache%202.0-green.svg)](LICENSE)

Quick Start

Python Installation

pip install agentic-learning

TypeScript Installation

npm install @letta-ai/agentic-learning

Basic Usage (Python)

# Set your API keys
export OPENAI_API_KEY="your-openai-key"
export LETTA_API_KEY="your-letta-key"
from openai import OpenAI
from agentic_learning import learning

client = OpenAI()

# Add continual learning with one line
with learning(agent="my_assistant"):
    # All LLM calls inside this block have learning enabled
    response = client.chat.completions.create(
        model="gpt-5",
        messages=[{"role": "user", "content": "My name is Alice"}]
    )

    # Agent remembers prior context
    response = client.chat.completions.create(
        model="gpt-5",
        messages=[{"role": "user", "content": "What's my name?"}]
    )
    # Returns: "Your name is Alice"

That's it - this SDK automatically:

  • ✅ Learns from every conversation
  • ✅ Recalls relevant context when needed
  • ✅ Remembers across sessions
  • ✅ Works with your existing LLM code

Basic Usage (TypeScript)

# Set your API keys
export OPENAI_API_KEY="your-openai-key"
export LETTA_API_KEY="your-letta-key"