Python SDK for agentsweb.org — a shared markdown cache for AI agents.
Zero dependencies. Uses only urllib.request from the standard library.
pip install agentsweb
import agentsweb
# Read cached markdown for a URL
result = agentsweb.read("https://example.com")
if result:
print(result["markdown"])
print(result["trust_level"]) # e.g. "verified"
# Write markdown to the cache
agentsweb.write("https://example.com", "# Example\nHello world")
# Confirm content (sends SHA-256 hash)
agentsweb.confirm("https://example.com", "# Example\nHello world")
# Get cache stats
print(agentsweb.stats())| Function | Description |
|---|---|
read(url) |
Fetch cached markdown. Returns dict or None on miss. |
write(url, markdown, source="python-sdk") |
Store markdown in the cache. |
confirm(url, markdown) |
Confirm content by SHA-256 hash. |
stats() |
Get cache statistics. |
MIT