Architecture & deployment
The Bicycle Analytics Runtime
Your team defines how to measure a KPI. Bicycle uses that definition to calculate the number, check segments for changes and keep the evidence behind each result. The Bicycle app, external assistants and your own products can call the same operations under their own permissions.
How a request reaches your systems
Where the request starts
A scheduled checkout review runs as the assignment, with its named owner, approved segments and budget. A person opening the review uses their own access.
An analyst asks for last week’s rate through remote MCP. Bicycle checks the analyst’s access and returns the permitted calculation and its source.
Your investigation skill can call one comparison through the API or remote MCP. The result carries the definition, scope and evidence the caller may use.
A merchant opens a finding inside your product. The request identifies the merchant’s tenant and the viewer. Bicycle returns only the records that viewer may read.
Request and authenticated identity
Bicycle Analytics Runtime
Resolves the definition, checks authority, runs the requested operation and records the result.
Scoped reads and approved actions
Your systems
Warehouse for KPI data · business and technical sources for evidence · workflow tools for action
Runtime architecture
A scheduled agent, an assistant, a custom app and an embedded product can all use Bicycle. Select an entry point to see how its identity and result travel through the same runtime.
Choose an entry point
The daily checkout review links an unusual segment to a finding. The ecommerce owner opens it in Bicycle under their own access.
Explore the Bicycle appThe analyst asks how West mobile performed last week. The assistant receives the permitted rate, the definition version and the calculation.
Explore assistant accessA trading-report agent calls the price comparison for the affected products and dates. It receives scoped evidence and a record of the untested drivers.
Explore API accessA merchant opens a checkout finding inside your product. The component or API returns that tenant’s finding and the evidence this viewer can read.
Explore embedded analyticsBicycle Analytics Runtime
The control plane resolves the tenant, task identity, metric version, filters, time window and budget. The source role limits what the query can read. Bicycle checks access and freshness again before reusing a cached result.
Warehouse and analytical engine
SQL calculates counts and rates. Statistics and ML fit baselines, score changes and compare drivers. Routine segment checks can run without inference.
Model endpoint
The model plans tests and ranks explanations using permitted evidence. It receives definitions, schema, code and aggregates. Raw rows and connector credentials stay out of the request.
KPI data
Snowflake, BigQuery or Databricks calculate the rate. Selected files and streams can also supply data.
Evidence sources
Pricing and inventory feeds, release logs, Datadog and PagerDuty help test competing explanations.
Workflow systems
Slack or Jira can route a review. A connected pricing system applies the terms its owner approved.
What the model, runtime and team each do
An assistant can plan a checkout investigation and explain the evidence. The definition it starts from, the baseline it tests against and the person who can authorize a price change all have owners outside the conversation.
Compare Bicycle with an assistant
- Metric owner
Define the number
Commerce Analytics publishes checkout conversion v3. Each eligible visit counts once, with internal test traffic excluded.
- SQL and ML
Find the change
Compare each segment with its weekday baseline. A small movement across all traffic can hide a large decline on West mobile.
- Language model
Rank explanations
Select price, inventory and release checks. Analytical code runs the comparisons. The model explains which driver fits and which evidence is missing.
- Business owner
Authorize the action
Merchandising decides whether the proposed price match is worth the margin cost. Approval covers the listed products, region and dates.
- Analytical engine
Measure the outcome
Compare conversion and margin for the affected products with a comparable group. Attach the result to the decision for the next review.
Runtime operations
Your agent can run a complete assignment or call one operation through the API or remote MCP. In this illustrative checkout review, the control plane resolves the caller’s permissions, metric version, segments, time window and budget. The warehouse and analytical engine execute the checks.
| Operation | What runs | Result in the checkout review |
|---|---|---|
| Calculate | SQL applies the approved formula, exclusions and time window in the warehouse. | Purchasing visits divided by eligible visits, using checkout conversion v3. |
| Check segments | The warehouse batches segment counts. Statistical models compare segments with their own baselines after checking volume and completeness. | Three aggregate queries supply 4,200 checks without a model call. West mobile falls from 2.5% to 1.4%, a 44% relative decline outside its usual range. |
| Investigate | The agent selects a test. Analytical code compares the same products and dates in regions with and without a competitor price gap. | The price gap is the leading explanation. The returns feed was unavailable, so the record marks it as unchecked. |
| Record | Bicycle links each observation, comparison, owner decision and follow-up to the metric and the open finding. | Wednesday’s repeat attaches to Tuesday’s finding. Friday’s deeper decline triggers a fresh assessment. |
What travels with a request?
If the agent proposes a price match on 40 products, merchandising reviews the affected West channels and the 14-day term. The pricing system executes after Bicycle rechecks approval. A later comparison measures conversion and margin against comparable products.
Business model and context
The business ontology connects a metric to the events that define it, the evidence that could explain a change and the actions an owner can authorize.
Signals
The checkout definition names eligible visits, purchases and exclusions. Device and region identify the West mobile segment.
Possible causes
Price, promotion, inventory and release changes each have a method for testing them. The investigation records which tests support a particular explanation.
Actions
A price match specifies products, region, duration, approval limits and how to measure the outcome. The action system applies the approved terms.
Outcomes
The outcome links the approved action to the exposed products, comparison group, measurement window and observed change in conversion and margin.
Where the runtime gets context
- Industry pack
- Starting definitions, common drivers and seasonal patterns for businesses such as retail, travel or payments.
- Company definitions
- Your dbt models, BI definitions and operating documents supply the local meaning. Reviewed company definitions take precedence over pack defaults.
- Reviewed lessons
- An inventory owner can require a freshness check before the team uses a feed. Later assignments using that mapping check the file date and record any gap.
Which definition does an agent inherit?
A regional team can inherit the company’s checkout formula and use a locally approved source mapping. The assignment records the effective definition and mapping. Analysts review changes to those mappings and instructions for testing drivers. A note belongs to the finding where it was written. Reusing it across assignments requires an owner to review its evidence, scope and expiry.
Who maintains the setup?
| Area | Bicycle maintains | Your team decides |
|---|---|---|
| Definitions | Imports, source mappings, validation and version history. | Metric owners approve definitions and mappings before publication. Every run records the version it used. |
| Detection and investigation | Scheduled checks, historical baselines, evidence connections and reusable test methods. | Analysts choose the segments, tune sensitivity and review driver tests. Assignment owners set the spending limit. |
| Access and actions | Permission checks, approval routing and a record of each decision. | Your team sets who can run an agent, who can read or contribute to each artifact, and who may publish changes to the shared ontology. |
DefinitionsCompute and costTask records and memoryAccess and approvals
Build, use a warehouse agent or add Bicycle
Build internally
Your team owns the definitions, baselines, cross-system evidence, permissions, records and regression tests for every caller it supports.
Use a warehouse agent
This can cover a team whose metrics and evidence live in one warehouse. Check how your setup handles a release log, a second assistant or an approval in another system.
Add the shared runtime
Keep the interfaces you use. A new agent can call an approved calculation and reopen the decision made on it, within the new caller’s access.
Where the work runs
Choose where to host Bicycle, how to supply data and which model endpoint to use. The diagram shows where each part of that configuration runs.
Explore a deployment
Data and calculations
Your warehouse
Scoped SQL runs under your source roles. Aggregated results return to Bicycle. Source tables stay in place.
A task-scoped snapshot
Your source supplies permitted data for repeated calculations in the runtime. Bicycle deletes the working set when that task ends.
Your tenant’s analytical store
Send selected files, streams or tables to the runtime. Bicycle calculates on that data and retains it for the period you agree.
Bicycle Analytics Runtime
Bicycle cloud
Bicycle operates the runtime on Google Cloud, in the US by default. Findings, evidence references and run history live in your isolated tenant there.
Your cloud account
The runtime, its stores, logs and backups live in your dedicated AWS account, Azure subscription or Google Cloud project. You control the network routes.
Model reasoning
Bicycle’s provider
Permitted context and aggregates go to Bicycle’s contracted OpenAI endpoint. Bicycle’s account uses zero data retention. The provider returns a plan or explanation.
Your provider account
Permitted context and aggregates go to the endpoint your team selects. Your provider contract, region and retention settings apply. Confirm compatibility during setup.
Inside your VPC
A compatible model runs alongside the customer-hosted runtime. The inference request and response stay in your private network.
Example deployment: Bicycle cloud, Warehouse push-down, Bicycle’s provider.
Inference location. An in-VPC model is available with a customer-hosted runtime. The team selects and validates the endpoint during setup.
For either deployment, review the source role used for queries, the path to the model endpoint and the person authorized to send an action. In your VPC, choosing an external model still sends permitted inputs over the approved outbound route.
Compare both deployment diagramsSee who operates each service
Validation before go-live
Testing on your history
Replay the assignment on periods your team understands. Keep one period aside until the method and sensitivity are fixed.
Known incident
Hide the affected segment and the analyst’s explanation. Check whether the assignment finds the change and whether the proposed driver fits the evidence.
Ordinary week
Include a weekday dip or scheduled promotion. Count unnecessary investigations and record any important changes the method missed.
Held-out weeks
Run the approved setup on fresh weeks. Compare coverage, misses, analyst effort and warehouse and model costs at the same quality.
Security and operational tests
Use the same assignment in a test tenant with a test action destination. Record the identity, expected decision, actual result and downstream writes for each case.
| Boundary | Try it | What to verify |
|---|---|---|
| Caller and artifact access | Open one finding as an analyst and a regional manager in two assistants. Revoke the manager’s access and revisit the saved link and cache. | Each reader sees only permitted regions. The revoked reader loses access on the next read. The analyst can still open the finding. |
| Tenant isolation | Give two test merchants the same agent template. Have one request a finding or reviewed lesson saved by the other. | The response reveals neither the other tenant’s record nor its existence. Both merchants can retrieve their own records. |
| Approval and retry | Try approval as a reader, then as the authorized owner. Change the price or let the approval expire. Simulate a destination timeout after an accepted test write. | Only the authorized, current proposal executes. Reconcile the destination receipt before retrying. Count one applied change for the approved proposal. |
| Incomplete work and spend | Delay the inventory feed and repeat a run with a small budget. Restore the feed and rerun the check. | The record identifies the gap and completed checks. New chargeable work stops at the limit. Compare warehouse usage, model usage and elapsed time across runs. |
Repeat the held-out cases when a model, definition, connector or permission rule changes. Compare coverage, evidence, latency and spend with the last accepted run.
Access and approval examplesSecurity reviewOperating responsibilities
How can you test whether sharing the runtime helps?
Give a second assistant the approved West mobile checkout review. Check whether it can reproduce the rate, retrieve the earlier price comparison and route the next decision to merchandising. Measure the analyst time needed to get there and verify what each caller could see.
What reaches the model?
For an investigation, the model gets the question, permitted definitions and schema. It can propose a query or select a test. The warehouse and analytical engine run the calculation. Only the permitted context, code and aggregate results needed for the explanation go to the endpoint.