LangChain Notepad Middleware
A production-grade LangChain middleware that provides a plain-text persistent "scratchpad" (notepad) for agents to store intermediate state across multi-hop tasks.
Installation
pip install langchain-notepad-middleware
Usage
from langchain.agents import create_agent
from langchain_middleware_notepad import NotePadMiddleware
# Create an agent with the middleware
agent = create_agent(
model="openai:gpt-4o",
tools=[...], # Your other tools
middleware=[NotePadMiddleware()],
)
How it Works
The middleware injects a system prompt instructing the model to use the notepad for scratchpad memory. It also registers 5 tools for manipulating the notepad state:
notepad_append(text): Append text to the note.notepad_replace(text): Overwrite the entire note.notepad_read(): Read the current note content.
The state is stored in a simple string field notepad within the agent state.
Metadata
Release files for langchain-notepad-middleware 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 |
|---|---|---|---|---|
| langchain_notepad_middleware-0.1.1.tar.gz | 5.8 kB | Without provenance | Details for langchain_notepad_middleware-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| langchain_notepad_middleware-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for langchain_notepad_middleware-0.1.1-py3-none-any.whl |
Total release size: 12.0 kB
Release files / langchain_notepad_middleware-0.1.1.tar.gz
| Download URL | langchain_notepad_middleware-0.1.1.tar.gz |
|---|---|
| Size | 5.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
aa12bfe05d6dc05c171359105f98adf3ba31bebc49f895212d921b7aabad6711
|
|
BLAKE2b-256 checksum How to use checksums |
6ce2481a2c5bdb3783b707e29f657eb28b3b451a972cb269190a563db667ba5b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.7
|
Release files / langchain_notepad_middleware-0.1.1-py3-none-any.whl
| Download URL | langchain_notepad_middleware-0.1.1-py3-none-any.whl |
|---|---|
| Size | 6.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
60a0a8b7ad9ac9004571333cc534f7a28d92d763c66eaceb7e5266f57696f3d8
|
|
BLAKE2b-256 checksum How to use checksums |
fc3f478f6dc336d34fed184a4c6b05ebf87b9b311e3cd05221be8751e2119acd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.7
|
Security for langchain-notepad-middleware 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.