Skip to main content
LLMs and AI agents struggle with raw on-chain data. EVM bytecode, ABI-encoded calldata, token transfer event logs, and internal call traces are dense, low-signal, and expensive to fit in a context window. ParaLens pre-processes the trace and returns a structured TxReport that is designed to be consumed by downstream AI systems — labeled intents, formatted USD values, actor attribution, and human-readable token flow summaries that a model can parse and reason over without any domain-specific prompt engineering.

Why Structured Data Matters for AI

Raw Ethereum transaction data presents several problems for LLMs:
  • Bytecode and calldata are hex-encoded and require ABI decoding before they carry any semantic content.
  • Event logs are tightly packed and reference opaque addresses with no human-readable context.
  • Internal traces can be hundreds of nested calls deep — far beyond what a model can reason over efficiently.
  • USD values are absent from on-chain data entirely; price resolution requires off-chain oracle data.
TxReport solves all of these. By the time data reaches your agent, it is a clean JSON object with a headline intent ("AtomicArbitrage"), formatted USD values ("$1,739.12"), named token symbols ("WETH", "USDC"), and a compact motif list that summarizes the structural proof. A model can reason meaningfully over this in a single context window. Not all fields in TxReport are equally useful for AI tasks. Focus the model’s context on these high-signal groups:
Strip pipeline_stats, price_source, and price_confidence from the context you pass to the LLM — these are low-signal for most AI tasks and consume tokens without adding reasoning value.

Minimal LLM Context Snippet

Extract only the fields that matter before passing the report to a model. This keeps prompts focused and token-efficient.

Tool / Function Calling

Wrap the /analyze call as a named tool so your AI agent can request transaction analysis on demand. The JSON schema below is compatible with both OpenAI function calling and Anthropic tool use.

Tool Definition

Tool Handler (TypeScript)

Example Prompt Pattern

Use the following template when asking a model to summarize or reason over a TxReport. The three-part structure — summary, anomaly detection, economic outcome — keeps responses focused and auditable.
Replace {TxReport JSON} with the output of JSON.stringify(buildLlmContext(report), null, 2).

Example Agent Loop (OpenAI)