A quant analyst wants to answer a market question without writing a Java program, a Python script, or a complicated SQL query. They want to ask:
“Show me the average EUR/USD spread during the London session over the last six months, excluding days when liquidity was unusually low.”
The natural response is to treat this as a language problem: translate the request into data access logic, retrieve the relevant observations, calculate the result, and explain the methodology.
That approach can work—but only if the AI Agent is connected to a precise, reliable market-data interface. Without one, the model may produce plausible query code, hallucinate field names, confuse timestamps, or silently apply the wrong filters. The key is not merely adding an LLM to a database. It is defining a controlled path from natural language to verified functions and market data.
This is where an AI Agent, the SKILL protocol, Function Calling, and TickDB can work together.
The Real Goal Is Not “Ask the AI for Data”
A useful low-code market workflow has four distinct layers:
- Intent understanding: Determine what the user wants to measure.
- Tool selection: Identify the data and calculation functions required.
- Deterministic execution: Run those functions against actual market data.
- Result explanation: Present the result with assumptions, filters, and limitations.
The LLM should primarily interpret intent and compose tool calls. It should not be treated as the numerical engine or the authoritative market-data source.
For example, consider this request:
“Find the 20-day volatility of BTC/USD and compare it with the 30-day volatility of ETH/USD.”
A reliable workflow needs to establish:
- Which instrument identifiers should be used?
- Which price field represents the close?
- Which observations are required for returns?
- How should missing values and weekends be handled?
- Should volatility be annualized?
- What happens if the available history is shorter than 30 days?
An AI Agent can help resolve ambiguity by asking a follow-up question. Once those decisions are clear, it should express them as structured Function Calling arguments rather than free-form instructions to a database.
Where the SKILL Protocol Fits
SKILL provides a structured way to package the knowledge and capabilities an Agent needs for a particular task. A TickDB-oriented SKILL can expose a controlled set of instructions, Function Calling definitions, and reference material to the Agent.
Conceptually, the structure looks like this:
User request
|
v
AI Agent
|
+--> SKILL instructions
| - Supported queries
| - Instrument identifiers
| - Timestamp conventions
| - Calculation rules
|
+--> Function Calling
|
v
TickDB tools
|
v
Structured market data
The important distinction is between instructions and execution.
The SKILL may tell the Agent:
- Use instrument IDs rather than display names.
- Treat stored timestamps according to a documented convention.
- Fetch enough history to calculate a rolling indicator.
- Do not infer a missing session boundary.
- Request validation when the instrument is ambiguous.
- Return the query parameters alongside the computed result.
The Function Calling layer then turns those decisions into machine-executable arguments.
For example, an illustrative tool definition might look like this:
{
"name": "get_bars",
"description": "Retrieve OHLCV bars for a specified instrument and time range.",
"parameters": {
"type": "object",
"properties": {
"instrument": {
"type": "string",
"description": "Canonical TickDB instrument identifier"
},
"start_time": {
"type": "string",
"description": "Inclusive ISO-8601 start timestamp"
},
"end_time": {
"type": "string",
"description": "Exclusive ISO-8601 end timestamp"
},
"interval": {
"type": "string",
"description": "Bar interval, such as 1m, 5m, 1h, or 1d"
},
"price_field": {
"type": "string",
"enum": ["open", "high", "low", "close"],
"description": "Price field to retrieve"
}
},
"required": [
"instrument",
"start_time",
"end_time",
"interval",
"price_field"
]
}
}
The exact schema would depend on the actual TickDB integration. The design principle is more important: each argument should have a defined type, a permitted value, and a clear business meaning.
A Function-Calling Workflow
Suppose a user asks:
“What was the average 5-minute EUR/USD bid-ask spread between 08:00 and 16:00 UTC on trading days last month?”
The Agent should first map the request to one or more functions. A practical design might include:
{
"name": "get_spread_statistics",
"description": "Calculate bid-ask spread statistics for an instrument over a time range.",
"parameters": {
"type": "object",
"properties": {
"instrument": {
"type": "string"
},
"start_time": {
"type": "string"
},
"end_time": {
"type": "string"
},
"interval": {
"type": "string"
},
"session_start": {
"type": "string",
"description": "Session start time in UTC"
},
"session_end": {
"type": "string",
"description": "Session end time in UTC"
},
"aggregation": {
"type": "string",
"enum": ["mean", "median", "p95"]
}
},
"required": [
"instrument",
"start_time",
"end_time",
"interval",
"session_start",
"session_end",
"aggregation"
]
}
}
The returned result should be structured, not just a natural-language summary:
{
"instrument": "FX:EURUSD",
"interval": "5m",
"start_time": "2026-02-01T00:00:00Z",
"end_time": "2026-03-01T00:00:00Z",
"session": {
"start": "08:00:00Z",
"end": "16:00:00Z"
},
"sample_count": 17856,
"mean_spread": 0.000084,
"median_spread": 0.000071,
"p95_spread": 0.000142,
"currency": "USD",
"price_scale": 0.00001
}
This is valuable for three reasons.
First, the user receives an answer rather than a script. Second, the underlying parameters are auditable. Third, another system can consume the result without parsing prose.
The output should also preserve units and conventions. “0.000084” is not useful if the user cannot tell whether it means 0.84 pips, 0.0084 percent, or a value in another instrument’s quote convention.
Why TickDB Matters in the Execution Layer
An AI model is good at interpreting a request and generating a tool call. It is not a substitute for a purpose-built time-series and market-data system.
TickDB provides the data-infrastructure layer for storing and querying time-series market data. In a natural-language workflow, that layer can handle the structured work:
- Time-range selection
- Instrument lookup
- Historical series retrieval
- Bar and tick data access
- Deterministic calculations
- Consistent identifiers and schemas
The Agent sends typed parameters; TickDB-backed functions execute against stored data. This separation reduces the chance that the model “answers” from memory instead of from the dataset.
It also makes the workflow more repeatable. If two users ask equivalent questions, the system can run them with the same query functions rather than relying on slightly different free-form code generated each time.
That matters especially for financial data, where apparently small ambiguities can change the result:
- Bid versus ask
- Trade timestamp versus quote timestamp
- UTC versus exchange-local time
- Continuous versus session-based bars
- Adjusted versus unadjusted prices
- Missing observations versus zero values
- Tick size versus percentage spread
From Data Retrieval to Signal Generation
Natural-language data retrieval and signal generation use similar architecture, but signal generation adds state, validation, and execution-control requirements.
Consider this instruction:
“Send an alert when the 20/50 moving-average crossover occurs for EUR/USD on the 5-minute chart.”
The Agent might select a function such as:
{
"name": "evaluate_moving_average_crossover",
"description": "Evaluate a moving-average crossover for an instrument.",
"parameters": {
"type": "object",
"properties": {
"instrument": {
"type": "string"
},
"interval": {
"type": "string"
},
"fast_period": {
"type": "integer",
"minimum": 2
},
"slow_period": {
"type": "integer",
"minimum": 3
},
"direction": {
"type": "string",
"enum": ["bullish", "bearish", "both"]
},
"start_time": {
"type": "string"
},
"end_time": {
"type": "string"
}
},
"required": [
"instrument",
"interval",
"fast_period",
"slow_period",
"direction",
"start_time",
"end_time"
]
}
}
The tool can return the crossover timestamps:
{
"instrument": "FX:EURUSD",
"interval": "5m",
"events": [
{
"timestamp": "2026-02-11T14:35:00Z",
"direction": "bullish",
"fast_ma": 1.08412,
"slow_ma": 1.08387
}
],
"event_count": 1
}
The Agent can then convert that output into a readable explanation:
“A bullish 20/50 crossover occurred at 14:35 UTC on February 11. The fast average was above the slow average at that timestamp.”
However, “send an alert” introduces another layer. The Agent should not arbitrarily send messages or place orders unless the application explicitly provides and authorizes those tools.
A safer architecture separates:
Research and signal evaluation
|
v
Signal record
|
+--> notification tool
+--> dashboard update
+--> webhook
For an actual trading workflow, additional controls are essential:
- Explicit user authorization
- Idempotency keys to prevent duplicate alerts
- Cool-down periods
- Maximum alert frequency
- Audit logs for every tool call
- A dedicated approval step for order execution
- Position, exposure, and risk-limit checks
The AI Agent can help construct and explain a signal, but it should not bypass deterministic execution and risk controls.
Designing Prompts That Reduce Ambiguity
The quality of a low-code workflow depends heavily on the tool contract. A vague system prompt is not enough.
Instead of asking the model to “answer questions about TickDB,” provide it with a compact operating model:
When answering a market-data request:
1. Resolve the instrument to a canonical identifier.
2. Use UTC for time-range arguments unless the user specifies otherwise.
3. State the price field, aggregation, and interval used.
4. Retrieve data through available functions; do not estimate market values.
5. If a required convention is ambiguous, ask a clarifying question.
6. Include sample count, units, and price scale in the result.
7. Distinguish historical observations from generated interpretations.
8. Do not place orders or send notifications unless an authorized tool is present.
This prompt does not replace schema validation. It works alongside it.
A well-designed function schema can prevent invalid combinations at the API boundary:
{
"type": "object",
"properties": {
"calculation": {
"type": "string",
"enum": ["volatility", "moving_average", "spread"]
},
"annualization": {
"type": "string",
"enum": ["none", "daily", "intraday_252", "intraday_365"]
}
},
"allOf": [
{
"if": {
"properties": {
"calculation": {
"const": "volatility"
}
}
},
"then": {
"required": ["annualization"]
}
}
]
}
Schema-level rules are valuable because they remain consistent even when the user phrase, model version, or prompt changes.
A More Reliable Retrieval Pattern
For analytical questions, returning only the final aggregate can be inconvenient. The user may need to inspect the underlying series or reproduce the result.
A useful pattern is to return three layers:
{
"query": {
"instrument": "FX:EURUSD",
"start_time": "2026-02-01T00:00:00Z",
"end_time": "2026-03-01T00:00:00Z",
"interval": "5m"
},
"summary": {
"sample_count": 17856,
"mean": 0.000084
},
"data": [
{
"timestamp": "2026-02-02T08:00:00Z",
"bid": 1.08421,
"ask": 1.08429
}
]
}
This supports several use cases:
- The Agent can explain how the aggregate was produced.
- The user can export or visualize the observations.
- A developer can compare the result with an independent implementation.
- The workflow can be tested with deterministic fixtures.
For large datasets, the function should normally return a reference to the result set rather than embedding every row in the model context.
Error Handling Is Part of the Product
Market-data workflows fail in predictable ways. A production-oriented Agent should handle them explicitly.
Unknown instrument
{
"error": {
"code": "INSTRUMENT_NOT_FOUND",
"message": "No canonical instrument matched 'EUR US dollar spot'.",
"suggested_matches": [
"FX:EURUSD"
]
}
}
Unsupported interval
{
"error": {
"code": "UNSUPPORTED_INTERVAL",
"message": "The requested interval is not available for this dataset.",
"supported_intervals": ["1m", "5m", "1h", "1d"]
}
}
Insufficient history
{
"error": {
"code": "INSUFFICIENT_HISTORY",
"message": "The requested calculation requires at least 50 observations; 38 were available.",
"available_observations": 38
}
}
The Agent should not convert these errors into invented answers. Its job is to explain the failure, propose a valid adjustment when possible, and preserve the original request.
Evaluating the Agent Correctly
A low-code market interface should not be evaluated only by whether its final prose sounds convincing. That can reward hallucination.
A stronger evaluation suite tests the entire tool-use chain:
| Test | What it verifies |
|---|---|
| Canonical instrument resolution | The Agent maps names and aliases correctly |
| Time-zone handling | Session boundaries use the expected convention |
| Missing-data behavior | The Agent does not turn missing values into zeroes |
| Unit preservation | Price, spread, and volatility units remain intact |
| Invalid arguments | The function layer rejects malformed calls |
| Ambiguous requests | The Agent asks for clarification when necessary |
| Historical grounding | Answers contain values returned by the data tools |
| Recovery from errors | The Agent responds appropriately to tool failures |
| Authorization | The Agent cannot perform unintended external actions |
A useful test case is adversarial rather than merely realistic:
“Calculate yesterday’s EUR/USD volatility using the same method as yesterday.”
The model may understand “yesterday” correctly, but it still needs a defined reference clock, price field, return convention, annualization factor, and treatment of non-trading periods. A deterministic tool contract makes these assumptions visible.
Where Low-Code Ends—and Engineering Begins
Low-code does not eliminate engineering. It relocates engineering effort from repetitive query construction to:
- Tool design
- Schema validation
- Instrument normalization
- Timestamp handling
- Calculation semantics
- Access control
- Monitoring and evaluation
For a non-programmer, this is often the more useful trade. The user no longer has to remember a database dialect or write a data-retrieval script, while the underlying implementation remains testable and controlled.
It does, however, create a boundary. If a user asks for a novel strategy with no corresponding tool, the Agent should not pretend that the request can be completed. It can explain the required data and calculation steps, but implementation is still necessary.
Likewise, natural language is not a substitute for precise specifications in production. “Alert me on a breakout” must eventually become a rule with a defined lookback, threshold, confirmation window, timeframe, and missing-data policy.
A Practical Implementation Pattern
For an evaluation or internal deployment, the following sequence is sufficient:
- Start with read-only market-data functions.
- Define strict JSON schemas for every argument.
- Use canonical instrument identifiers.
- Standardize all tool timestamps and units.
- Return query metadata with each result.
- Require explicit authorization for alerts and external actions.
- Store every function call in an audit log.
- Test both successful calls and ambiguous failures.
- Add signal calculation only after retrieval is reliable.
- Keep order execution outside the conversational interface unless a separate approval and risk layer is implemented.
The first useful milestone should not be autonomous trading. It should be a system that can answer a bounded set of market questions consistently:
“Using EUR/USD 5-minute bars for February 2026, what was the median bid-ask spread between 08:00 and 16:00 UTC?”
A trustworthy answer is more valuable than an impressive but unverifiable one.
The Practical Value of Controlled Natural Language
The strongest low-code market-data systems do not ask the LLM to become a database engine, calculation library, and trading system simultaneously. They use it where language models are strongest—understanding requests, composing structured calls, and explaining results—while delegating execution to deterministic market-data infrastructure.
Within that architecture, SKILL supplies the Agent’s task-specific operating knowledge, Function Calling provides the controlled interface, and TickDB anchors the workflow in time-series market data.
The result is not a system where “the AI simply knows the market.” It is a system where a user’s intent is translated into an explicit, inspectable, and repeatable data operation.
That distinction is what makes natural-language market querying practical for non-programmers—and dependable enough for technical teams to build on.