Skip to main content

Kronvex Python SDK

Persistent memory for AI agents. Three endpoints, one API key, production-ready.

Installation

pip install kronvex                        # core SDK
pip install "kronvex[langchain]"           # + LangChain integration
pip install "kronvex[crewai]"              # + CrewAI integration
pip install "kronvex[langgraph]"           # + LangGraph integration
pip install "kronvex[openai-agents]"       # + OpenAI Agents SDK integration
pip install "kronvex[autogen]"             # + AutoGen integration
pip install "kronvex[all-integrations]"    # all integrations at once

Quick start

from kronvex import Kronvex

kx = Kronvex("kv-your-api-key")
agent = kx.agent("your-agent-id")

# Store a memory
agent.remember("User prefers concise answers", memory_type="preference")

# Recall relevant memories
memories = agent.recall("what does the user prefer?", top_k=5)
for m in memories:
    print(f"[{m['score']:.2f}] {m['content']}")

# Inject context into your prompt
context = agent.inject_context("How should I respond?")
# → "Relevant memories:\n- User prefers concise answers\n..."

Async support

import asyncio
from kronvex import AsyncKronvex

async def main():
    async with AsyncKronvex("kv-your-api-key") as kx:
        agent = kx.agent("your-agent-id")
        await agent.remember("User is based in Paris", memory_type="semantic")
        memories = await agent.recall("where is the user?")

asyncio.run(main())

Framework integrations

LangChain

pip install "kronvex[langchain]"
from kronvex.integrations.langchain import KronvexMemory
from langchain_openai import ChatOpenAI
from langchain.chains import ConversationChain

memory = KronvexMemory(api_key="kv-your-key", agent_id="your-agent-id")
chain = ConversationChain(llm=ChatOpenAI(), memory=memory)
chain.predict(input="I prefer concise answers.")

CrewAI

pip install "kronvex[crewai]"
import os
os.environ["KRONVEX_API_KEY"] = "kv-your-key"
os.environ["KRONVEX_AGENT_ID"] = "your-agent-id"

from kronvex.integrations.crewai import recall_memory, store_memory, get_context
from crewai import Agent

researcher = Agent(role="Researcher", goal="...", tools=[recall_memory, store_memory])

LangGraph

pip install "kronvex[langgraph]"
from kronvex.integrations.langgraph import make_recall_node, make_store_node

recall_node = make_recall_node("kv-your-key", "your-agent-id")
store_node  = make_store_node("kv-your-key", "your-agent-id")

builder.add_node("recall", recall_node)
builder.add_node("store",  store_node)

OpenAI Agents SDK

pip install "kronvex[openai-agents]"
from agents import Agent, Runner
from kronvex.integrations.openai_agents import KronvexHooks

hooks = KronvexHooks(api_key="kv-your-key", agent_id="your-agent-id", session_id="user-42")

result = await Runner.run(
    agent,
    messages=[{"role": "user", "content": "Hello"}],
    hooks=hooks,
)

AutoGen

pip install "kronvex[autogen]"
from kronvex.integrations.autogen import KronvexMemory

mem = KronvexMemory(api_key="kv-your-key", agent_id="your-agent-id")

context = mem.inject_context(user_message)
system_msg = f"You are a helpful assistant.\n\n{context}"

mem.remember(f"User: {user_message}")
mem.remember(f"Assistant: {ai_response}")

API reference

Kronvex(api_key, *, base_url, timeout)

Method Description
.agent(agent_id) Get an Agent handle
.create_agent(name) Create a new agent
.list_agents() List all agents

Agent

Method Description
.remember(content, *, memory_type, session_id, ttl_days, pinned, metadata) Store a memory
.recall(query, *, top_k, memory_type, session_id, threshold) Semantic search
.inject_context(message, *, top_k, session_id) Get prompt-ready context block
.sessions() List session IDs
.memories(*, session_id, memory_type, limit, offset) List stored memories
.delete_memory(memory_id) Delete one memory
.clear() Delete all memories

Links

Release files for kronvex 0.5.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for kronvex 0.5.2
File Size Uploaded
kronvex-0.5.2.tar.gz 11.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for kronvex 0.5.2
File Interpreter ABI Platform
kronvex-0.5.2-py3-none-any.whl Python 3 none any Details

Total release size: 29.5 kB

Release files / kronvex-0.5.2.tar.gz

Download URL kronvex-0.5.2.tar.gz
Size 11.7 kB
Tags Source
SHA-256 checksum
How to use checksums
9b13f8fab0eb194da67e88afd92ed0f8b1e5710bdb595d2e87a36696984bbe3a
BLAKE2b-256 checksum
How to use checksums
950fd4254e77120a1f9b344d263101dc7a9c6a65a5d0f50eff1bd295d3c6a67d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.13

Release files / kronvex-0.5.2-py3-none-any.whl

Download URL kronvex-0.5.2-py3-none-any.whl
Size 17.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c8eadd05e6a4256a60992c962bade5ee4f20c908146d90de1b428d1236ca24aa
BLAKE2b-256 checksum
How to use checksums
2e764b70d98fa3152a4f17b1d81b4b2217d31d133f0eb0fde50e6e52a7700d08
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.13

Release history Release notifications | RSS feed

This release

0.5.2 This release

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page