🧠 FrontalLobe
Give Your AI a devloped Brain!
If you've ever built an AI app, you know the pain: the second your LLM hits its context limit, it suffers from total amnesia. Standard advice tells you to spin up massive vector databases, deploy Redis clusters, and rewrite your entire stack just so your bot remembers a user's name 20 messages later.
That's exhausting. I built FrontalLobe so you can just write code and move on.
FrontalLobe gives your LLM an operating system. It uses a tiny, lightning-fast background model to act as a bouncer for your memory. It pins the absolute most important facts to a permanent "RAM" block, while quietly throwing casual conversational noise into a searchable archive.
It installs faster than you can boot up your IDE, and requires absolutely zero external databases.
Why use it?
- The Dual-Brain Setup: A cheap, fast background model manages the memory so your expensive, smart foreground model doesn't have to.
- Zero Infrastructure: Pure Python. No Milvus, no Pinecone, no headaches. If you can install
genai, you can run this. - No More Goldfish Memory: Stop your AI from dropping user preferences, rules, and crucial context into the void.
Quickstart
from frontal_lobe import FrontalLobeMemory
from google import genai
# Spin up the Frontal Lobe
memory = FrontalLobeMemory(api_key="YOUR_API_KEY")
client = genai.Client(api_key="YOUR_API_KEY")
# 1. Tell the AI something important
user_text = "Before we start, remember that I hate writing in Java and my cat's name is Waffles."
memory.ingest_message("user", user_text)
# 2. Let FrontalLobe build the perfect, memory-injected prompt
optimized_prompt = memory.build_optimized_prompt(user_text)
# 3. Send it to your heavy, frontend model
response = client.models.generate_content(
model="gemini-2.0-flash",
contents=optimized_prompt
)
# 4. Save the response
memory.ingest_message("assistant", response.text)
Metadata
Release files for frontal-lobe-memory 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| frontal_lobe_memory-0.1.1.tar.gz | 3.6 kB | Without provenance | Details for frontal_lobe_memory-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| frontal_lobe_memory-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for frontal_lobe_memory-0.1.1-py3-none-any.whl |
Total release size: 7.6 kB
Release files / frontal_lobe_memory-0.1.1.tar.gz
| Download URL | frontal_lobe_memory-0.1.1.tar.gz |
|---|---|
| Size | 3.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d87898c73a341cb5aebaa2cd0f3d60453efb4654c2cfa5f1fa569fdfc980e264
|
|
BLAKE2b-256 checksum How to use checksums |
267a6042d0f3a95781967049b5f49189ce0e01589197481994e10d26207be3e6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Release files / frontal_lobe_memory-0.1.1-py3-none-any.whl
| Download URL | frontal_lobe_memory-0.1.1-py3-none-any.whl |
|---|---|
| Size | 4.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4a48198f628321c8fa0068501ec6325f8f423e1da487cfd72f8bf8d8c98d8bca
|
|
BLAKE2b-256 checksum How to use checksums |
88c1b44a702199a4123bf3531ca5c895a1e51ee69f58eaf923700d1cd6985de6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Security for frontal-lobe-memory 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.