documentation/getting-started/ai-coding-agents.mdx
AI coding agents like <a href="https://claude.ai/code" target="_blank">Claude Code</a> and <a href="https://openai.com/index/openai-codex/" target="_blank">OpenAI Codex</a> can help you build applications that use QuestDB.
These agents work with QuestDB out of the box by reading the online documentation. For deeper integration, agent skills embed rich context directly into the agent so it can work faster and more accurately. The QuestDB agent skill covers SQL, ingestion, and Grafana dashboards, while the TSBS Benchmark skill automates end-to-end performance benchmarking.
No setup required. Use the public QuestDB demo with Claude Code:
You: "Use QuestDB's REST API at https://demo.questdb.io/ to list all tables"
Claude Code: [Queries /exec endpoint and lists available tables including trades]
You: "Query the trades table and show me the last 10 trades. Data is time-ordered natively, no ORDER BY needed"
Claude Code: [Sends SQL via HTTP: SELECT * FROM trades LIMIT -10]
You: "What's the total volume traded per symbol, sampled by 1 hour? Use SAMPLE BY"
Claude Code: [Writes and executes SAMPLE BY 1h query grouped by symbol]
You: "Plot the price of BTC-USDT over the last 30 days"
Claude Code: [Queries data and generates a chart using matplotlib]
You: "Connect to my QuestDB at localhost:9000 and show me what tables I have"
Claude Code: I'll query the QuestDB REST API to list your tables.
[Executes curl command and shows results]
The <a href="https://github.com/questdb/questdb-agent-skill" target="_blank">QuestDB agent skill</a> is an experimental skill for Claude Code and Codex. It embeds QuestDB-specific knowledge directly into the agent's context - SQL syntax, common mistakes, ingestion patterns, Grafana templates, and financial indicator recipes - so the agent can build complete data pipelines without searching the docs for every step. For topics not covered by the skill, the agent falls back to the online documentation automatically.
Copy the questdb/ folder from the <a href="https://github.com/questdb/questdb-agent-skill" target="_blank">repository</a> into your skills directory:
Claude Code:
~/.claude/skills/questdb/ - available in all projects<project>/.claude/skills/questdb/ - available in a specific projectCodex:
~/.codex/skills/questdb/ - available in all projects<project>/.codex/skills/questdb/ - available in a specific projectThe folder must contain SKILL.md and the references/ directory.
SAMPLE BY, LATEST ON, ASOF JOIN, window functions, and materialized viewstime_bucket() does not exist, use SAMPLE BY instead)With QuestDB and Grafana running locally:
Build a real-time crypto market data pipeline using cryptofeed (OKX exchange)
ingesting trades and L2 order book data into QuestDB.
Symbols: BTC-USDT, ETH-USDT, SOL-USDT.
Then create a Grafana dashboard with OHLC candlesticks, VWAP,
Bollinger Bands, and RSI panels, with a symbol dropdown.
The agent will create the database schema, write the ingestion script, wait for data, and deploy a Grafana dashboard - all in a single pass.
<video autoPlay muted loop playsInline width="100%" src={require("/static/images/docs/ai-coding-agents/questdb-skill.mp4").default} />
The following indicators are embedded in the skill and can be generated without online lookups:
Aggressor imbalance, ATR, Bid-ask spread, Bollinger Bands, Bollinger BandWidth, Compound interest, Cumulative product, Donchian Channels, Keltner Channels, Liquidity comparison, MACD, Maximum drawdown, OBV, OHLC bars, Rate of Change, Realized volatility, Rolling std dev, RSI, Stochastic Oscillator, TICK & TRIN, Volume profile, Volume spikes, VWAP.
The <a href="https://github.com/questdb/tsbs-benchmark-agent-skill" target="_blank">TSBS Benchmark skill</a> is a skill for Claude Code and Codex that runs end-to-end <a href="https://github.com/timescale/tsbs" target="_blank">Time Series Benchmark Suite</a> (TSBS) benchmarks against QuestDB. It installs prerequisites, spins up QuestDB in Docker, builds TSBS, generates data, loads it, runs all query benchmarks, and cleans up - all from a single prompt.
Copy claude/SKILL.md from the <a href="https://github.com/questdb/tsbs-benchmark-agent-skill" target="_blank">repository</a> into your skills directory:
Claude Code:
~/.claude/skills/tsbs-benchmark/SKILL.md - available in all projects<project>/.claude/skills/tsbs-benchmark/SKILL.md - available in a specific projectCodex:
~/.codex/skills/tsbs-benchmark/SKILL.md - available in all projects<project>/.codex/skills/tsbs-benchmark/SKILL.md - available in a specific projectThe skill orchestrates eight sequential steps:
| Parameter | Value |
|---|---|
| Use case | cpu-only |
| Scale | 4,000 hosts |
| Time window | 1 day (2016-01-01 to 2016-01-02) |
| Log interval | 10 seconds |
| Rows generated | 34.5M |
| Metrics generated | 345.6M |
| Query types | 16 (cpu-max variants, single/double-groupby, high-cpu, lastpoint, groupby-orderby-limit) |
| Queries per type | 1,000 |
Run the full TSBS benchmark against QuestDB with the default cpu-only dataset.
The agent will handle everything from installing prerequisites through reporting the final query-by-query results.