Skip to main content

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. Call flush() before another agent must see your effects.
  • Every suggestion carries provenance (kind, and from_stream on handoffs): context your agent can attribute, or ignore.

Access (hosted keys or the self-host image): yashvardhan090202@gmail.com

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

forefetch_client-0.1.1.tar.gz (6.7 kB view details)

Uploaded Source

Built Distribution

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

forefetch_client-0.1.1-py3-none-any.whl (7.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: forefetch_client-0.1.1.tar.gz
  • Upload date:
  • Size: 6.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.6

File hashes

Hashes for forefetch_client-0.1.1.tar.gz
Algorithm Hash digest
SHA256 f85368849a05d4eead09266b3ae173a365f5bc17227a852aa4e22750c0f35a57
MD5 a7625a6fec07860a255883139a15b691
BLAKE2b-256 6e8606da126fd01410a11b32068a9f32601d85747b9d1ff7e54c435f71543ae9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forefetch_client-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4cb8c6608d945ed863619b05f715f6853f1142d1999cff1539a9885a8952f4b9
MD5 44edf5cea8d7e05951dbd79fc9b5ca94
BLAKE2b-256 98fa94730495f477f9a3e60d1876d996b2f6755478f37bbf66640ae0427643c2

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