TypeScript-First : Framework-Agnostic : Open-Source

Context & Memory
Orchestration for
AI Assistants

Stop reinventing conversation management. CtxIQ gives you composable building blocks for session management, token budgeting, and prompt construction.

Multi-Session Management
Pluggable LLMs
Context Stack
Token Counter
Read the Docs
LIVE SIMULATION
INSTANCE
US-EAST-1
STATUS
READY

Hello! I am the CtxIQ test assistant. How can I help you manage your session memory?

TOKEN COUNT
26 / 8192
SESSION ENTROPY
0.3 t/char

Get Started in Seconds

Add CtxIQ to your project using your favorite package manager.

$npm install ctxiq

How It Works : See Your Context Stack

Real-time visualization of how CtxIQ structures messages and manages memory limits before sending to the LLM.

CHAT INTERFACE

Simulated

Explain the sliding window strategy.

Type a message to see the stack update...

VISUAL CONTEXT STACK

SUMMARIZE

ACTIVE BUDGET

34 / 200 Tokens

INFRASTRUCTURE

Session Management :

Stateful Persistence

Manage long-running conversations with ease. CtxIQ handles session TTLs, persistent storage across restarts, and instant retrieval. Use the widget to switch between active context threads and monitor metadata in real-time.

Automatic Redis and LocalStorage adapters

Customizable Time-to-Live (TTL) policies

Metadata injection for rich session tracing

SESSION CONSOLE

+ NEW SESSION

General

Code Debug

Refactoring

SESSION METADATA

id: sess_921az02

ttl: 3600s

HISTORY STORAGE

Redis Connected

ACTIVE WINDOW

Recent: "Explain the architecture..."

TOKEN MONITOR

TRIM HISTORY

INPUT BUFFER

Paste text here to simulate token budgeting and clipping...

CONTEXT CAPACITY

0 / 2048 TOKENS

OPTIMIZATION

Token Budgeting :

Precise Limits

Never hit "Max Context Length" errors again. CtxIQ provides real-time token counting and automated trimming strategies. Paste text into the simulator to see how our budgeting engine reacts to overflow.

Multi-model tiktoken support

Intelligent message pruning (Last-in, First-out)

Critical system prompt preservation

CONSTRUCTION

Prompt Builder : Composable
Chains

Construct complex multi-modal prompts by chaining messages, system instructions, and
dynamic context variables. Use the interactive builder below to add mock messages and
see the generated JSON structure used by the LLM providers.

LIVE PROMPT ARCHITECT

ADD MOCK MESSAGE

PROVIDER PAYLOAD PREVIEW

{}

COPY JSON PAYLOAD

COMPATIBILITY

Pluggable LLMs :

Provider Agnostic

One integration, every model. Switch between OpenAI, Anthropic, or local Llama instances without changing your business logic. Configure your engine and storage backend through our standardized configuration interface.

OpenAI

Full GPT-4o Support

Anthropic

Claude 3.5 Sonnet

MODEL CONFIGURATION CONSOLE

PROVIDER

OpenAI

STORAGE

LocalStorage

{
  "engine": "gpt-4-turbo",
  "temperature": 0.7,
  "persistence": "browser-local",
  "encryption": "aes-256-gcm"
}

TEST CONNECTION

Simple API.

Powerful results.

Introduction

Quick Start

Session Management

getting-started.ts

Copy

const ai = new Orchestrator({

maxTokens: 4096,

strategy: 'sliding-window'

});

​

​

const prompt = await ai.session('user-1')

.addMessage('user', 'Hello!')

.build();