chatkit-agent-memory

Load complete conversation history for ChatKit agents with unique ID mapping.

Updated Feb 6, 2026
One-click install
npx skills add https://github.com/SHAJAR5110/hackathon-II-phase-4 --skill chatkit-agent-memory
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: chatkit-agent-memory
Source: https://github.com/SHAJAR5110/hackathon-II-phase-4/tree/main/.claude/skills/chatkit-agent-memory
Command: npx skills add https://github.com/SHAJAR5110/hackathon-II-phase-4 --skill chatkit-agent-memory

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill loads complete conversation history for ChatKit agents, enabling memory across interactions and preventing the agent from only seeing the current message.

Core Features & Use Cases

  • Memory-enabled history loading: Loads full thread history to feed the agent with context.
  • Unique ID mapping: Maps provider-generated IDs to store-generated IDs to prevent collisions in streaming responses.
  • Full lifecycle handling: Properly handles added, done, and updated thread events to maintain consistent history.
  • Use Case: A user introduces themselves early; the agent remembers and references their name in subsequent turns.

Quick Start

  • Instantiate a MemoryStore and a LitellmModel with your chosen provider.
  • Create and run ChatKitServerWithMemory(data_store=store, model=model, instructions="You are a helpful assistant. Remember what the user tells you.").
  • Send a multi-turn conversation to verify memory retention and that IDs remain unique across messages.

Frequently Asked Questions about chatkit-agent-memory

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I preserve conversation history for ChatKit agents across multiple turns?

To preserve conversation history for ChatKit agents, you can load complete thread history to feed the agent full context. This ensures the agent remembers previous interactions rather than only seeing the current message.

Why do my LiteLLM and Gemini streaming responses experience ID collisions?

ID collisions in LiteLLM and Gemini streaming responses occur when provider-generated IDs conflict. You can prevent this by implementing ID mapping to translate provider-generated IDs into stable store-generated IDs.

How do I set up agent memory using a MemoryStore and LiteLLM?

To set up agent memory, instantiate a MemoryStore and a LitellmModel, then run ChatKitServerWithMemory with your data store and model. Send a multi-turn conversation to verify memory retention and unique IDs.

Does ChatKit handle added, done, and updated thread events for memory consistency?

Yes, ChatKit handles added, done, and updated thread events to maintain consistent history. This full lifecycle handling ensures ordered history retrieval and safe streaming results across multi-turn dialogues.

What is the best way to prevent ID collisions when using ChatKit's ThreadItemConverter?

The best way to prevent ID collisions with ChatKit's ThreadItemConverter is to implement unique ID mapping. This maps provider-generated IDs to store-generated IDs, ensuring stable identifiers throughout the streaming response lifecycle.