Skip to main content

Give your AI long-term memory in 1 command. SQLite-based, no setup, no servers.

Project description

AI-IQ

Give your AI long-term memory in 1 command.

LLMs forget everything. AI-IQ makes them remember.

Install

pip install ai-iq

Quick Start

from ai_iq import Memory

memory = Memory()

# Add memories
memory.add("User prefers dark mode", tags=["preference", "ui"])
memory.add("Redis bug fixed with network_mode: host", category="learning")

# Search (hybrid keyword + semantic)
results = memory.search("redis networking")
for r in results:
    print(f"#{r['id']}: {r['content']}")

# Update and delete
memory.update(1, "User STRONGLY prefers dark mode")
memory.delete(1)

CLI

memory-tool add learning "Docker needs network_mode: host" --project MyApp
memory-tool search "docker networking"
memory-tool dream  # Consolidate duplicates, detect conflicts

Why AI-IQ?

  • Single SQLite file = your AI's brain — No servers, no vector DB, no setup
  • No cloud dependencies — Works offline, owns your data, zero API keys
  • Works with any Python agent — Not locked to Claude, OpenAI, or any vendor
  • Hybrid search — Keyword (FTS5) + semantic (vector) + graph traversal
  • Memories decay naturally — FSRS-6 algorithm like human memory

Advanced Features

See docs/REFERENCE.md for complete documentation:

  • Beliefs & Predictions — Confidence tracking with Bayesian updates
  • Knowledge Graph — Entities, relationships, spreading activation
  • Dream Mode — REM-like consolidation (dedup, conflict detection)
  • Identity Layer — Auto-discovers behavioral traits
  • Narrative Memory — Builds cause-effect stories from causal graph
  • Meta-Learning — Search improves from feedback loops

Example

See examples/chatbot_with_memory.py

Documentation

Complete ReferenceExamplesArchitecture

Requirements

Python 3.8+ and SQLite 3.37+. Optional: pip install ai-iq[full] for semantic search.

License

MIT

Links

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ai_iq-5.4.0.tar.gz (159.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ai_iq-5.4.0-py3-none-any.whl (122.1 kB view details)

Uploaded Python 3

File details

Details for the file ai_iq-5.4.0.tar.gz.

File metadata

  • Download URL: ai_iq-5.4.0.tar.gz
  • Upload date:
  • Size: 159.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for ai_iq-5.4.0.tar.gz
Algorithm Hash digest
SHA256 2b5e948706986f3024f82e9de111a617398f4b424abeb4ad9827b76d1919c604
MD5 22c151e246c709fc9d50465e5fb13f0f
BLAKE2b-256 f3e7370b4c0d8a245518b97ade7dbdb494818a5e4636e4888166a445205536a2

See more details on using hashes here.

File details

Details for the file ai_iq-5.4.0-py3-none-any.whl.

File metadata

  • Download URL: ai_iq-5.4.0-py3-none-any.whl
  • Upload date:
  • Size: 122.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for ai_iq-5.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ebdb25ca655c2280b6e95d96d5d2a95e484ece525b4c39b5f6cdc21b39d2dea8
MD5 7eeb5ee0fa3a2e6a9ec956cab5af6a3e
BLAKE2b-256 9b647105ecec4582fb8420f37bbcf4f1203b7a6bb9234232568ab1536b2be211

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page