Skip to main content

ToolTrace LlamaIndex Integration

LlamaIndex data reader for the ToolTrace web intelligence API. Load webpages as LlamaIndex Documents with clean Markdown content for RAG pipelines and knowledge bases.

Install

pip install tooltrace-llamaindex

Quick start

from tooltrace_llamaindex import ToolTraceReader

reader = ToolTraceReader(api_key="your-key")

docs = reader.load_data(
    urls=[
        "https://example.com/blog/post-1",
        "https://example.com/blog/post-2",
    ]
)

for doc in docs:
    print(doc.metadata["title"])
    print(doc.text[:200])

RAG pipeline example

from llama_index.core import VectorStoreIndex

from tooltrace_llamaindex import ToolTraceReader

# Load and index
reader = ToolTraceReader(api_key="your-key")
docs = reader.load_data(urls=["https://tooltrace.io/docs"])
index = VectorStoreIndex.from_documents(docs)

# Query
engine = index.as_query_engine()
response = engine.query("How does browser rendering work?")
print(response)

Document metadata

Each document includes:

  • source: Final URL after redirects
  • title: Page title
  • canonical_url: Canonical URL
  • author: Author name
  • language: Content language
  • published_at: Publication date
  • word_count: Word count
  • render_method: Whether static or browser rendering was used
  • content_hash: Content hash for change detection

Options

reader = ToolTraceReader(
    api_key="your-key",        # or set TOOLTRACE_API_KEY env var
    render="auto",             # "never" (1 credit), "auto", "always" (5 credits)
    continue_on_error=True,    # skip failed URLs instead of raising
)

License

MIT

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tooltrace_llamaindex-0.1.0.tar.gz (4.0 kB view details)

Uploaded Source

Built Distribution

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

tooltrace_llamaindex-0.1.0-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for tooltrace_llamaindex-0.1.0.tar.gz
Algorithm Hash digest
SHA256 03dbb42eae8d5a1e6c55005711482488d0b27798c12c963e95fee8f5036980a0
MD5 fc97963d3bfdc9ff6dbab9b78f198000
BLAKE2b-256 fee62564575c1219b3d6432a98a255c9ac1a7d4f75e3b719e9e5bffdc5a24e92

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tooltrace_llamaindex-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a2274774bcc48a1b3d239fd77f834c242ffa8ee2deea76f6b9ca800570fe1649
MD5 d5d7c04c097ca31f17a0d5764003af97
BLAKE2b-256 eb13abb078bf071e661b586cb73c938e8bbe19c7316f6e618293bb9135174c0a

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 files

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