Plomp
A small python module for managing and debugging agent contexts.
Just plomp it in and prompt away and get progress tracking and visibility into what your agents.
Overview
Plomp is a tiny library designed to easily integrate into python programs which invoke an LLM over multiple steps and provide some useful benefits such as visualizing progress and making context retrival easier.
Plomp has three main goals:
- Provide simple observability into execution multistep LLM prompts ("agents" if you must)
- Track and manage context retrieval
- Integrate easily into existing code in an unopinionated way
Example Usage
For a detailed example look I have a sample project which simulates the game survivor which uses plomp, the rendered progress can be seen here https://michaelgiba.github.io/survivor/static/plomp.html with the repo here https://github.com/michaelgiba/survivor
A simpler example below:
import plomp
@plomp.wrap_prompt_fn()
def prompt_llm(prompt: str) -> str:
return "<EXAMPLE LLM RESPONSE>"
llm_response = prompt_llm("What's the weather today?")
for i in range(4):
plomp.record_event(
{
"plomp_display_event_type": "weather_data_accessed",
"plomp_display_text": f"accessed weather data from API: {i + 1}/10",
"value": random.random(),
},
tags={"tool": "weather_api"},
)
past_weather_events = plomp.buffer().filter(tags_filter={"tool": ["weather_api"]}).last(3)
past_weather_events.record(tags={"type": "recent_weather_queries"})
llm_response = prompt_llm(
f"How has the temperature changed over the last three samples?: "
+ str(past_weather_events.to_dict())
)
plomp.write_html(plomp.buffer(), "progress.html")
This would produce a self-contained HTML page which looks like
Structure
Plomp revolves around a centralized buffer which stores three different types of sequential records:
- "Events": Discrete events which happened that could useful future context for decision making
- "Queries": An expression which matches previous events based on user provided logic
- "Prompts": A record of a prompt to an LLM and the response recieved
Installation
Plomp only requires Python3.10+ and its only dependency is typeguard
pip install plomp
Developing
To experiment locally with the UI you can run cd frontend && npm run dev.
Note the project is pretty new so if you see a bug please feel free to file an issue or make a PR.
Contributions
All contributions are welcome. There are a number of things that need to be added:
- Concurrency support
- More frontend features
- Better API documentation
- Optional live progress reloading instead of only static HTML files for realtime playback
- Or anything else valuable
Metadata
Release files for plomp 0.1.4
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 |
|---|---|---|---|---|
| plomp-0.1.4.tar.gz | 28.9 kB | Without provenance | Details for plomp-0.1.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| plomp-0.1.4-py3-none-any.whl | Python 3 | none | any | Details for plomp-0.1.4-py3-none-any.whl |
Total release size: 53.9 kB
Release files / plomp-0.1.4.tar.gz
| Download URL | plomp-0.1.4.tar.gz |
|---|---|
| Size | 28.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
446c7a03f9c263457a303547fea39c11dd05d9f87aa9572976b83af0b05d6e8b
|
|
BLAKE2b-256 checksum How to use checksums |
8d6ff51add579940c399a2760d3a9e3332fdbf66e31242ecc815f0ca118287c7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.10.13
|
Release files / plomp-0.1.4-py3-none-any.whl
| Download URL | plomp-0.1.4-py3-none-any.whl |
|---|---|
| Size | 25.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0baf0e43f6523191624078c9c0aa50f59796a36a1c07926367c74a3759ef43b0
|
|
BLAKE2b-256 checksum How to use checksums |
e9ca5cd8cf4687a54274e134bcf416e2c4dcf8c0ec5dc4e49f4e4afc729e2c5b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.10.13
|
Security for plomp 0.1.4
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.