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.0.tar.gz (6.3 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.0-py3-none-any.whl (6.7 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for forefetch_client-0.1.0.tar.gz
Algorithm Hash digest
SHA256 d265eb05b81ea633708469b1e03357576df7586e671fe4c391460ea9cccc88de
MD5 935ad5761af9401aa31b209f90fdc7cc
BLAKE2b-256 8f21a2302c875d6a740daf7158ce7c16f7ed38b6805009cd1545957a02c20b20

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forefetch_client-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 92cd424a8945479aef50ef2635be9f670e18a1c20d3707094aefb0044d474513
MD5 a3fda283f967bc90e13e46c1bf184025
BLAKE2b-256 cb3d0bb72d4e624c8b8a4736bea0d584a0860563b376b94039be61e54d4fb829

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