Thin client for the forefetch anticipatory memory service — holds the prefetched content client-side, so anticipated retrievals cost one tiny round trip.
Project description
forefetch-client
The thin Python client for forefetch — an anticipatory memory service for multi-agent pipelines. The server predicts what each agent will need next and ships that content during the previous agent's think-time; this client holds it, so an anticipated retrieval costs one tiny round trip.
One dependency (httpx). No engine code, no models, no vector store on your side.
from forefetch_client import MemoryClient
memory = MemoryClient("https://api.forefetch.com", api_key="yourkey", stream="resolver")
memory.remember(["refund policy: duplicate charges are refunded in full within 5 days"])
r = memory.retrieve("how to resolve: duplicate charge", k=4)
# r["wire_frac"] == 1.0 -> every returned row was already here before you asked
memory.observe("resolver: refunded the duplicate charge") # fire-and-forget event record
memory.suggest(k=3) # labeled proactive context, zero round trips
memory.end_session() # close the task; the next session starts pre-warmed
memory.report() # the scorecard: readiness, wire economics, learned handoffs
- One stream per agent. Streams are hard-isolated; only the anticipation layer moves labeled hints between them.
observe()returns instantly — a background worker ships events in order and banks each response's content push. Callflush()before another agent must see your effects.- Every suggestion carries provenance (
kind, andfrom_streamon handoffs): context your agent can attribute, or ignore.
Access (hosted keys or the self-host image): yashvardhan090202@gmail.com
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file forefetch_client-0.1.2.tar.gz.
File metadata
- Download URL: forefetch_client-0.1.2.tar.gz
- Upload date:
- Size: 6.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2a4f1a79799b912f1c0035083256dabafb887e7f90f209a98c7837a4db902731
|
|
| MD5 |
826e7c35be675dccf034e27c9a018ad8
|
|
| BLAKE2b-256 |
c40b64d99f315345d8cec9161472c1af85aab13d9c31aac3cefb79e14d13d65a
|
File details
Details for the file forefetch_client-0.1.2-py3-none-any.whl.
File metadata
- Download URL: forefetch_client-0.1.2-py3-none-any.whl
- Upload date:
- Size: 7.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1ff87426a700664b8b7c0c4758278f04144bd23a50e8dd6c081a74a05eb04117
|
|
| MD5 |
ecab13d9728c7004ebd4f855bd9c820c
|
|
| BLAKE2b-256 |
e5f6dabe7b751931399a6fa777e50af45fcd4bf61511938f2b942afafdf9c4e8
|