Skip to main content

Neurotransmitter-inspired adaptive learning layer for LLMs

Project description

Limbiq

Neurotransmitter-inspired adaptive learning layer for LLMs.

Limbiq makes any LLM appear to learn and adapt across conversations — without touching a single weight. It sits between the user and the LLM, modifying what the model sees through five discrete signal types inspired by human brain chemistry.

User → Limbiq → Modified Context → Any LLM → Response → Limbiq observes → Loop

Installation

pip install limbiq

Quick Start

from limbiq import Limbiq

# Initialize
lq = Limbiq(
    store_path="./neuro_data",
    user_id="dimuthu",
)

# Before sending to LLM — get enriched context
result = lq.process(
    message="What's my wife's name?",
    conversation_history=[
        {"role": "user", "content": "Hi there"},
        {"role": "assistant", "content": "Hello! How can I help?"},
    ],
)

# Inject result.context into your system prompt
messages = [
    {"role": "system", "content": f"You are a helpful assistant.\n\n{result.context}"},
    {"role": "user", "content": "What's my wife's name?"},
]
response = my_llm(messages)  # Any LLM

# After getting response — let Limbiq observe and learn
lq.observe("What's my wife's name?", response)

# End session — triggers memory compression
lq.end_session()

Signals (v0.1)

Dopamine — "This matters, remember it"

Fires when the user shares personal info, corrects the model, or gives positive feedback. Tagged memories are always included in context.

lq.dopamine("User's wife is named Prabhashi")

GABA — "Suppress this, let it fade"

Fires when memories are denied, contradicted, or go stale. Suppression is soft — memories can be restored.

lq.gaba(memory_id="abc123")
lq.restore_memory("abc123")  # Undo suppression

Corrections

Combines both signals — stores new info as priority, suppresses the old.

lq.correct("User works at Bitsmedia, not Google")

Inspection

lq.get_stats()              # Memory counts per tier
lq.get_signal_log()         # Full history of signals fired
lq.get_priority_memories()  # All dopamine-tagged memories
lq.get_suppressed()         # All GABA-suppressed memories
lq.export_state()           # Full JSON export for debugging

How It Works

  • LLM-agnostic — works with any LLM (OpenAI, Anthropic, Ollama, llama.cpp, etc.)
  • Zero weight modification — all adaptation through context manipulation
  • SQLite persistence — memories survive across sessions
  • Semantic search — uses sentence-transformers for embedding-based retrieval (falls back to TF-IDF if not installed)
  • Transparent — every signal is logged with trigger, timestamp, and effect
  • Reversible — suppressed memories can be restored, nothing is permanently destructive

License

MIT

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

limbiq-0.1.1.tar.gz (18.8 kB view details)

Uploaded Source

Built Distribution

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

limbiq-0.1.1-py3-none-any.whl (18.7 kB view details)

Uploaded Python 3

File details

Details for the file limbiq-0.1.1.tar.gz.

File metadata

  • Download URL: limbiq-0.1.1.tar.gz
  • Upload date:
  • Size: 18.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for limbiq-0.1.1.tar.gz
Algorithm Hash digest
SHA256 a5d4f57875149c4ba0be89b0cc4a63ffe28bee9e46b68709d9247d194717e0d1
MD5 beaf98e0db27cb920e60fc9bf0ec7ba9
BLAKE2b-256 bf30e44f4c2e342b5552e92dce7406a2a9ff95f9be48a3e7b23b457d7a7fff3d

See more details on using hashes here.

File details

Details for the file limbiq-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: limbiq-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 18.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for limbiq-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 599f10c767f9ffb8a83205914c8cba33afd5020fac2c9ad346fc03a00b316e58
MD5 08c2190bf6dd513d62600fb39e888836
BLAKE2b-256 bc5a2bb60196b71c124ad6748770dbe270fab2d2915774a75ca79a7979ece02c

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