Skip to main content

dspy-surface

Surface checks a short link before your agent opens it. The answer is fetch or skip. It never returns the page. A hop or a 1×1 pixel counts the same way, with no install. Free for the first million requests a month. https://nova-otter-delta-cloud.grok.me

This package gives DSPy agents that check as one ready-made tool: surface_preflight.

Surface by Canada Site Ops. Ontario, Canada.

This package also ships an agent skill at src/dspy_surface/skills/surface-preflight/SKILL.md. Skill installers that scan Python packages will find a keyed init-then-preflight recipe.

Get a free API key in about 10 seconds

No email, no card. Then set SURFACE_KEY or SURFACE_API_KEY. The tool sends it as Authorization: Bearer <key>.

KEY=$(curl -s -X POST https://nova-otter-delta-cloud.grok.me/v1/keys | python3 -c "import sys,json; print(json.load(sys.stdin)['key'])")
export SURFACE_KEY="$KEY"
curl -s -H "Authorization: Bearer $KEY" "https://nova-otter-delta-cloud.grok.me/v1/preflight?url=https://youtu.be/jNQXAC9IVRw"

That is one copy-paste: it mints a free key and makes the first keyed preflight. The answer is fetch or skip. You can also set SURFACE_API_KEY to the same value.

A key gets its own million free requests a month. If no key is set, the first preflight call mints a free key (POST /v1/keys), keeps it for later calls, and writes it to .env when that file does not already have a key. Prefer setting SURFACE_KEY yourself when you already have one.

python -m surfaceapi init
python -m surfaceapi preflight https://youtu.be/jNQXAC9IVRw

The first command writes .env. The second reads that key and calls POST /v1/preflight. The answer is fetch or skip.

Install

pip install dspy-surface
import dspy
from dspy_surface import surface_preflight

react = dspy.ReAct("question -> answer", tools=[surface_preflight])

The tool returns next: fetch or next: skip, plus where the link really goes (unwraps t.co, bit.ly, lnkd.in, youtu.be). It never downloads the page. On any error it answers skip.

Prefer MCP?

Mint a key first, then paste this into your MCP settings (tool preflight_url):

{
  "mcpServers": {
    "surface": {
      "type": "http",
      "url": "https://nova-otter-delta-cloud.grok.me/mcp",
      "headers": {
        "Authorization": "Bearer REPLACE_WITH_YOUR_KEY"
      }
    }
  }
}

Also listed

Metadata

Release files for dspy-surface 0.1.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dspy-surface 0.1.7
File Size Uploaded Provenance Actions
dspy_surface-0.1.7.tar.gz 5.2 kB Without provenance Details for dspy_surface-0.1.7.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for dspy-surface 0.1.7
File Interpreter ABI Platform Actions
dspy_surface-0.1.7-py3-none-any.whl Python 3 none any Details for dspy_surface-0.1.7-py3-none-any.whl

Total release size: 12.7 kB

Release files / dspy_surface-0.1.7.tar.gz

Download URL dspy_surface-0.1.7.tar.gz
Size 5.2 kB
Tags Source
SHA-256 checksum
How to use checksums
9bf887ee4d7def9169a8ca5a130438ec2c9565dc16c4043aa1fb7f299ae19ba7
BLAKE2b-256 checksum
How to use checksums
c3bf623c87765031c9b0fd4eac82e8e08841d2d17711d7943de255153d43afdc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.5

Release files / dspy_surface-0.1.7-py3-none-any.whl

Download URL dspy_surface-0.1.7-py3-none-any.whl
Size 7.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ba05372eab58a2c353e700151d2d1a9db586778dafa2d31b62d326238f6e0d32
BLAKE2b-256 checksum
How to use checksums
86db65b1ba4326110f612f85e04ec99731177c7945de118cd8d1c9baf7bcc672
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.5

Security for dspy-surface 0.1.7

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page