Skip to main content

griptape-specstream

SpecStream drivers for Griptape: live web search and page reading for Griptape agents, pipelines and workflows.

  • SpecStreamWebSearchDriver: a web search driver on the SpecStream Search API, $5 per 1,000 searches of up to 10 results, or $1 per 1,000 with speed="fast".
  • SpecStreamWebScraperDriver: a web scraper driver on the SpecStream Extract API, $0.80 per 1,000 pages. A page with no text is not charged. It reads web pages, PDF, Word and Excel files.

Install

pip install griptape-specstream
export SPECSTREAM_API_KEY=ss_live_...   # Agents & API in your SpecStream workspace

A free account comes with $2 of credit and needs no card: specstream.ai.

Use it

from griptape.loaders import WebLoader
from griptape.structures import Agent
from griptape.tools import WebScraperTool, WebSearchTool

from griptape.specstream import SpecStreamWebScraperDriver, SpecStreamWebSearchDriver

agent = Agent(
    tools=[
        WebSearchTool(web_search_driver=SpecStreamWebSearchDriver()),
        WebScraperTool(web_loader=WebLoader(web_scraper_driver=SpecStreamWebScraperDriver())),
    ]
)
agent.run("Who won the 2025 Nobel Prize in Physics? Read the announcement page and quote one line.")

The agent needs a prompt driver too; Griptape's default reads OPENAI_API_KEY.

search() returns a ListArtifact of JsonArtifacts: first the answer, when the question has one, with the page it was read from, then one item per result with its title, url, site and snippet.

Argument Default What it does
api_key SPECSTREAM_API_KEY The SpecStream API key
results_count 5 How many results come back, 1 to 100
speed None "fast" for the fast tier ($1 per 1,000 searches)
passages False Adds the text of each top page closest to the query (excerpt)
include_answer True Puts the answer first when the question has one
params {} More Search API parameters, for example {"country": "DE"}
base_url, session The API address and a shared requests.Session

SpecStreamWebScraperDriver takes api_key, base_url, session and format ("markdown", the default, or "text"). The artifact's meta holds the page's url and title.

A call SpecStream refuses raises SpecStreamError with the API's message and status_code.

Develop

pip install -e ".[test]"
pytest -q

The tests answer from a scripted SpecStream and spend nothing.

API reference: specstream.ai/docs/api. License: MIT.

Metadata

Release files for griptape-specstream 0.1.0

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

Source distribution (sdist)

Source distribution for griptape-specstream 0.1.0
File Size Uploaded Provenance Actions
griptape_specstream-0.1.0.tar.gz 8.3 kB Without provenance Details for griptape_specstream-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for griptape-specstream 0.1.0
File Interpreter ABI Platform Actions
griptape_specstream-0.1.0-py3-none-any.whl Python 3 none any Details for griptape_specstream-0.1.0-py3-none-any.whl

Total release size: 17.2 kB

Release files / griptape_specstream-0.1.0.tar.gz

Download URL griptape_specstream-0.1.0.tar.gz
Size 8.3 kB
Tags Source
SHA-256 checksum
How to use checksums
9b706fc96b57f682f48fb5a182cd1416fe13243bad4602d113a1c6a6ee934a8b
BLAKE2b-256 checksum
How to use checksums
c12a4810ae883e4ddd7c2fdd770f7aaa9413cbc9f0de0613cd6949883cca1853
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.16

Release files / griptape_specstream-0.1.0-py3-none-any.whl

Download URL griptape_specstream-0.1.0-py3-none-any.whl
Size 8.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f3069183fa71cb4090e993e1e6f6bae2f343a5b4e04608bd7beb68f19cf0c528
BLAKE2b-256 checksum
How to use checksums
918eea31f81a56f776966f940b6134e1ae94ad48616791079e005a243e997eb0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.16

Security for griptape-specstream 0.1.0

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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

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