Skip to main content

An integration package connecting SibFly (measured ground motion per US address, from NASA InSAR) and LangChain

Project description

langchain-sibfly

LangChain integration for SibFlymeasured ground motion for any US address.

Give it a US address (or lat/lon) and it tells your agent how fast the ground is sinking or rising, in mm/year, measured from NASA OPERA Sentinel-1 satellite radar (InSAR) — measured, not modeled. Negative mm/year = sinking.

Agent-friendly pricing: $0.40 per covered report, and misses are free (out-of-coverage, no-data, too-stale, and low-confidence results all cost $0). Use dry_run=True for a free coverage + price check first.

Install

pip install -U langchain-sibfly
export SIBFLY_API_KEY="sf_live_..."

Get a key with free starter credits at sibfly.com. Agents can self-register with no human step: POST https://sibfly.com/api/v1/autonomous/register.

Usage

from langchain_sibfly import SibflyGroundMotion

motion = SibflyGroundMotion()  # reads SIBFLY_API_KEY

# By address
print(motion.invoke({"address": "1100 Congress Ave, Austin, TX"}))

# By coordinates, free preview (no charge)
print(motion.invoke({"lat": 30.3244, "lon": -97.8102, "dry_run": True}))

Example result:

{
    "status": "ok",
    "velocity_vertical_mm_yr": -6.0,
    "velocity_uncertainty_mm_yr": 1.5,
    "assessment_code": "notable_subsidence",
    "confidence": 0.86,
    "data_age_days": 73,
    "cost_usd": 0.4,
    "credits_remaining_usd": 0.6,
}

Route logic on assessment_code — one of rapid_subsidence, notable_subsidence, stable, mild_uplift, strong_uplift — not on the human-readable assessment string.

Free gates (avoid paying for data you'd reject)

  • dry_run=True — free coverage + would_cost_usd, no reading, no charge.
  • max_age_days=N — if the newest data is older than N days, returns a free stale_data result instead of billing.
  • min_confidence=0.0..1.0 — below this pixel confidence, returns a free low_confidence result instead of billing.

Use it in an agent

from langchain_sibfly import SibflyGroundMotion
from langgraph.prebuilt import create_react_agent
from langchain_anthropic import ChatAnthropic

agent = create_react_agent(
    ChatAnthropic(model="claude-sonnet-5"),
    tools=[SibflyGroundMotion()],
)
agent.invoke({"messages": [("user", "Is the ground sinking at 1100 Congress Ave, Austin TX?")]})

Links

License

MIT

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

langchain_sibfly-0.1.0.tar.gz (7.6 kB view details)

Uploaded Source

Built Distribution

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

langchain_sibfly-0.1.0-py3-none-any.whl (7.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: langchain_sibfly-0.1.0.tar.gz
  • Upload date:
  • Size: 7.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for langchain_sibfly-0.1.0.tar.gz
Algorithm Hash digest
SHA256 d246a1bd54aaf0cd66f9b0e27d38772c757f551eb70b27f3bb4937aabac5d4c1
MD5 ee7562961369715f3592ec6816f01531
BLAKE2b-256 08b5c194c606c75992a362562f2d6a79f627b187007d792d9ff0ca0233834235

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for langchain_sibfly-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 771e87db02a5da472c0cf3672354901809076cd44b5a72ab46634e72c4a5f605
MD5 a1ed07c7bddce0e07fc49246f0ce70c8
BLAKE2b-256 4ceb2615e16cc456f58fd0d7da8f7c65b737b5297c412c81128ab352b4b44917

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