Agnostic

Agnostic - SQL Tools for Blockchain Analytics

Agnostic provides an open-source analytics stack for querying and transforming blockchain records with SQL through ClickHouse. Its modular stack covers contract analysis, repeatable data pipelines, and exploration through desktop or web interfaces. AGX presents schemas and results, AGT runs SQL transformations, AGP manages asynchronous queries, and Degen provides notebooks for sharing analyses. EVM decoding functions interpret contract calls and events, while open dataset definitions and Stellar-specific functions extend the available data paths. The components serve different tasks, with access and freshness depending on the selected data source and deployment.

An existing ClickHouse deployment can run Agnostic's EVM decoding functions when it has the appropriate UDF bundle and decoding definitions.

Data Sources, ClickHouse, and the Analytics Tools

ClickHouse supplies the query engine connecting data access, decoding functions, and SQL transformations. Raw records, decoded tables, and imported files can enter the analytics environment through different paths. A prepared event table already exposes fields for analysis. An appropriate decoder turns a raw log's encoded parameters into structured values a query can inspect.

The modular design lets dataset preparation run separately from exploration. AGP adds scheduling and result management when analytical queries require asynchronous execution. An existing ClickHouse deployment can supply the database layer without making every query part of a managed pipeline.

AGX for Exploration and Query Writing

AGX provides a SQL editor, schema browser, and result interface for exploring data available to its connected query engine.

Schema Browsing and Query Results

The schema browser exposes tables, columns, and data types, helping distinguish transaction records from events and identify the fields an analysis needs. The editor supports syntax highlighting and language-model assistance, while tabular results and visualization tools support further exploration. A chart inherits the filters and aggregation choices in its underlying SQL.

Local and Remote Sessions

The native application supports local ClickHouse execution, while the web interface connects to a remote server. AGX also supports an AGP connection for asynchronous queries. The interface location therefore does not establish where computation happens. File operations offer another entry path for data exploration, separate from querying an already populated remote database.

Graphic: Agnostic: Local and Remote Sessions

View image file

AGT for Repeatable Data Transformations

AGT expresses extract, transform, and load operations through SQL, using ClickHouse as the execution engine for batch and micro-batch pipelines.

Source Rows and Runtime Variables

A source query generates tasks from its returned rows, with each task carrying key-value variables derived from those columns. Runtime parameters can supply shared context. Later processors use these values in templated SQL. A processor's final query can update task variables for downstream work.

Ordering and Batch Processing

AGT includes processors for applying SQL, preserving task output order, and accumulating work into batches. Concurrent processing can finish tasks out of order; the sequence processor restores their original emission order. Accumulation combines per-task queries with batch setup and finalization, using configured conditions to determine when a batch closes.

AGP for Asynchronous Query Execution

AGP manages long-running ClickHouse queries through an API, a queue, and workers. Applications can track execution separately from retrieving completed results.

PostgreSQL stores orchestration records, while workers execute the SQL against ClickHouse. Configured tiers can route work to different workers or clusters and apply different resource settings. Available CPU and query time therefore follow the deployment's configuration.

The API distinguishes pending, running, canceled, failed, and succeeded executions. Progress and result availability provide additional information about query processing. A pending execution has entered the queue; it does not yet represent completed SQL work. Successfully completed executions can retain results in object storage or a local filesystem.

AGP also supports deduplication of in-flight queries. Its bookkeeper detects dead workers, recovers stuck executions, and expires old executions and results. Applications needing durable analytical records must preserve output beyond that retention window.

What EVM Data Can Agnostic Decode Inside ClickHouse?

Agnostic's EVM function libraries decode contract calldata, event logs, and transaction data within ClickHouse queries, using the appropriate decoding inputs.

The clickhouse-evm and ch-evm projects provide EVM-specific user-defined functions, or UDFs. Calldata contains encoded function inputs; event logs carry data contracts emit during execution. An application binary interface, or ABI, describes how to interpret those inputs and events. The evm_decode_event function decodes ABI-encoded event logs inside ClickHouse. The function accepts event topics, event data, and decoding definitions, and its result can expose the event signature and input parameters.

Additional functions handle hexadecimal data, function descriptors, and RPC access to compatible nodes. RPC means remote procedure call and lets a query request node data through these functions. EVM compatibility concerns the decoding and node interface. It does not establish the historical coverage or update cadence of a particular hosted table.

Open Datasets and Stellar Integration

The open dataset catalog and chain-specific function libraries give the stack data access paths beyond a single explorer interface.

Ethereum Tables and Portable Storage

The dataset catalog includes Ethereum mainnet blocks, transactions, traces, logs, and decoded logs. It also includes a mapping from EVM selectors to decoding signatures. These records answer different questions: blocks supply chain-level context, transaction records describe submitted transactions, and traces expose execution detail. Decoded logs support analysis of contract events without requiring every query to repeat raw-log parsing.

Agnostic's blockchain data work also uses Apache Iceberg tables and Parquet files for portable storage. Iceberg manages the table layer, while Parquet stores columnar data. Dataset definitions and storage access govern what a connected query engine can read. The broader catalog includes contract-verification records, market-trading data, and external blockchain archives. These sources retain their own schemas and histories; sharing a SQL interface does not make their coverage or update schedules identical.

Stellar Functions and Pipelines

The separate ch-stellar library supports Stellar RPC calls and access to Galexie data lakes from SQL. Its utilities include transaction hashing, XDR decoding, and StrKey decoding. XDR means External Data Representation, the serialization format used in Stellar data. These functions address Stellar-specific formats and interfaces; the EVM libraries serve their own contract encoding context. The stellar-pipelines project combines AGT and ch-stellar to generate Iceberg tables from Stellar history, including ledger metadata and Soroban contract events.

Which Parts Fit an Existing ClickHouse Setup?

An existing ClickHouse setup can use AGX for exploration, AGT for transformations, and AGP for queued query execution. Choose the additions from the task and the infrastructure available:

  • Use AGX when the task requires schema browsing and interactive SQL results.
  • Add an EVM UDF bundle when queries need to decode raw contract inputs or event logs.
  • Use AGT when SQL transformations need a repeatable batch or micro-batch pipeline.
  • Add AGP when an application needs queued queries, execution status, and retained results.
  • Choose managed pipelines when the project has configured access to hosted ClickHouse and Iceberg resources.

A local exploration session and a queued query service have different dependencies. The choice changes when occasional analysis must become a recurring transformation pipeline or serve long-running application queries.

Runtime Dependencies and Ongoing Maintenance

Reliable analytics depends on the SQL runtime and the records available to it. Dataset definitions establish the tables and networks a deployment can query. Freshness follows ingestion and publication, so repeating a query cannot reveal records the underlying source has not supplied. For contract analysis, retain the applicable decoding definitions alongside the table schema and query logic.

Self-hosting assigns database, worker, and storage maintenance to the deployment operator. Managed pipelines require configured project access to their ClickHouse and Iceberg resources. Compute and storage requirements follow the selected workload. The SQL editor, a recurring ETL job, and an AGP worker service can therefore require different amounts of infrastructure.

Query context can include schema names or private values, making the selected model destination relevant to privacy. Limit shared context to what the query needs. After changes to a data source, decoder, or pipeline, rerun representative queries before relying on comparisons with earlier results.

Questions people ask about Agnostic

Can I Import CSV or Parquet Files Into AGX?

AGX supports drag-and-drop loading of CSV and Parquet files, as well as SQL scripts. File loading offers a local-data entry path alongside access to existing database tables. The file's columns and data types determine the queries it can support; importing it does not automatically add contract decoding or blockchain history.

How Does AGP Identify Duplicate Query Submissions?

AGP uses a query_id to group submissions and defaults to a hash of the SQL when no identifier is supplied. Only one pending or running execution can exist for that identifier at a time. This rule governs in-flight work, while the API handles past executions and their stored results separately.

Does an Earlier AGP Result Include Newly Indexed Records?

A stored AGP result reflects its completed query and does not automatically incorporate records indexed afterward. Applications can retrieve earlier results when that degree of staleness suits the task. A new execution is necessary to include newly available data, and the underlying dataset must already contain those records.

Can AGT Run as a Standalone Job?

AGT supports deployment as a standalone binary, job, or service. Its SQL pipeline still requires a suitable ClickHouse runtime and access to the configured sources and destinations. A scheduled job can support recurring processing, while the pipeline configuration defines the transformations and runtime variables.

Do I Need a Cloud Model to Use AI Query Assistance in AGX?

AGX supports local Ollama models for query assistance, so a cloud model is not the only option. This choice controls the model connection. A separately configured database connection can still use a remote server, so local model inference does not establish that every query and dataset remains on the desktop.

Updated ยท