Bybit AI: The Technical Architecture from Natural Language to Trade Execution
“Buy 0.1 BTC for me.”
To place an order in an app or on the web, users typically open the trading page, select a trading pair, and enter order parameters. With Bybit AI, they can state a goal such as “buy 0.1 BTC,” then review the order details and confirm. In this spot-trading scenario, the buy side, asset, and quantity are already clear; the system only needs to complete the necessary order details. The technical flow behind this experience must connect natural language to business capabilities, retrieve market and account data, produce order parameters the user can review, and pass the confirmed operation to the business system.
Bybit AI provides conversational services to Bybit users. Its official product introduction lists capabilities covering market and account queries, asset operations, trading, investment products, and customer support. This article uses trading to explain the runtime, Skill integration, A2UI interactions, and execution boundaries. Data exchange between these components, and their authority to modify business state, are central to the architecture.
Runtime: Separating Sessions, Capability Calls, and Business Execution
A chat prototype can pass user messages directly to a model and invoke the tools the model selects. Once it connects to a trading system, model context, user identity, tool permissions, and business state cannot be treated as the same thing.
The architecture design for Bybit AI divides responsibilities among the client, identity and session handling, business orchestration, governed business services, and knowledge services. Identity and session handling covers authentication, connections, and session routing; business orchestration runs in the Agent runtime and handles intent, context, and tool selection; governed business services retain the rules for reading data and executing operations, and validate account ownership and operation permissions server-side; and knowledge services provide knowledge retrieval and explanations of business rules. The client presents text and structured interactions, but parameters submitted by the client still require server-side validation.
The diagram shows a logical division of responsibilities. Business services control execution; neither Skills nor model output directly constitutes authorization.
The Agent runtime supports conversation, context management, and capability orchestration, with each user’s runtime environment associated with their identity. Each user’s execution environment is isolated from others’, keeping execution state separate per user. Business APIs must still validate account ownership and operation permissions.
There is a further division of responsibilities within the runtime: capability orchestration and interactive presentation can be adjusted separately—the former decides which capabilities are selected and with what inputs, while the latter decides how results are organized and displayed. Separating them keeps business-call logic from depending on the internals of UI components, and tool selection and the presentation of tool results can be adjusted and validated separately.
This design does not require every request to use the same number of model calls. A trading request that needs clarification may continue the conversation, while an order-status query with an already identified order can follow a defined processing path. The runtime organizes these paths; business services determine whether an operation is valid.
Skill: Business Guidance and API Contracts Have Distinct Roles
A Skill teaches the Agent how to use a business capability: when it applies, what inputs it needs, which tools to call, how to interpret results, and how to handle error branches. Its role differs from that of a knowledge base. A knowledge base can explain limit orders; an order-query API is what tells the user whether a particular order has filled.
Bybit AI integrates business capabilities through Skills paired with tools, which connect to OpenAPI or MCP. The protocol defines how a capability is called; the Skill explains when to call it and how to combine calls. Neither replaces business permissions.
| Layer | What It Handles | Trading Example |
|---|---|---|
| Skill | Scenarios and steps | Identify a spot buy and organize the order-preparation flow |
| Tool Schema | Parameter structure | Fields for trading pair, side, order type, and quantity |
| Business services | Business validity and state | Account permissions, trading rules, balances, and order results |
With many tools available, putting every operational detail into the prompt increases the context burden and makes similar capabilities harder to distinguish. The proposed organizational convention uses a business-line Skill as the entry point, with sub-scenarios within it. Business rules then have clear ownership, and the runtime does not need an ever-growing global prompt to explain every product.
Skills are maintained independently of the runtime’s core code, and capability files carry their own version management and integrity checks: they are validated before release, and signatures confirm content provenance and integrity. These address two different concerns: integrity checking confirms where content came from and that it has not been tampered with, while a Skill’s business correctness still requires testing. A validly signed Skill can still select the wrong API or misinterpret a business response.
Independent updates to capability files also mean that versions must be part of fault diagnosis. The Skill version and tool contract used by a request need to be retained for regression analysis. Independent updating should not be taken to mean that business acceptance testing can be skipped.
A2UI: Bringing Tool Results into a Structured Interface
Models naturally produce text, but users need to check order parameters field by field. Burying price, quantity, and account details in a reply makes them harder to act on. It also makes reliable interaction behavior harder to define.
Bybit AI uses A2UI to describe interactive cards. Text provides explanations; cards carry structured fields and controls for taking action. A2UI is a UI mechanism, not Agent-to-Agent communication.
Card templates consist of the following parts:
| Part | Mechanism | Illustrative Trading Example |
|---|---|---|
| Template | Component tree with conditional and loop directives | Market-data area, order parameters, and confirmation area |
| Data Binding | Bind input and result fields to components | Trading pair, price, quantity, and order status |
| Action | Declare interaction handling | Modify parameters, confirm a proposal, or query an order |
Templates can express conditional display and repeated components, and data binding places business input and result fields in the appropriate locations. Cards do not require the model to generate a new component tree each time, nor do they require it to rewrite existing business state.
This does not rule out generative cards. Templates are easier to inspect when fields and structure are well defined. Generation can serve long-tail scenarios, but amounts, states, and operation targets must still faithfully reflect business data.
Separate Output Channels, One Message Pipeline for Interactions
Text and cards have separate output channels. Text can appear progressively, while cards update when the necessary data is ready. Both share the same business result rather than independently inferring prices or fill status. Text increments and card updates do not block each other, and neither implies a fixed number of model calls—some interface updates can be pushed after a tool finishes, without another model call just to generate the interface.
After a user interacts with a card, handling may be local or server-side. Local Actions such as copying or navigation do not need to be sent to the server; server-side Actions such as business queries enter the main message pipeline and are validated by the server before execution. The design consolidates server-side interaction entry points into that pipeline to avoid maintaining a separate interaction-handling channel. The implementation must still ensure request correlation and logging.
When a card interaction can be handled by a defined rule, it does not need to re-enter model inference. For example, when a user clicks to query an order’s status, the order is already identified, so the model does not need to infer what to query again.
Execution Boundaries: The Model Proposes; the Business System Decides Whether to Execute
A Skill can describe the order-placement flow, and a model can generate order parameters, but neither output can serve as business authorization. Choosing a trading goal does not mean the user has allowed the model to change account state autonomously.
The authority to propose trades must be separated from the authority to execute them. AI can analyze, draft, and propose an operation. An operation that changes account state should be confirmed by an authenticated user, then validated and executed by deterministic business logic.
In a trading scenario, this requires distinguishing the following:
- The user states a goal, such as buying 0.1 BTC.
- The system produces a concrete proposal that identifies the account and order parameters.
- The user confirms that proposal, after which business services validate and execute it and provide a verifiable status.
Before integration, the security and business teams review the scope of exposed APIs, data flows, and operations that require additional review, establishing the conditions under which capabilities may be made available. During request execution, the user confirms the account and order parameters for that particular operation; business services then validate the execution conditions. Neither control amounts to approving every model reply individually.
Confirmation Must Apply to the Same Operation
If a user confirms a limit buy order on a particular account, the system cannot subsequently switch accounts, change the quantity, or turn it into a market order. The execution layer should bind confirmation to a specific proposal and its parameters. If the parameters change, the old confirmation no longer authorizes submission.
Account preferences are not authorization either. The main-account update announcement explains that Bybit AI supports applicable operations on main accounts and allows users to set account preferences. Whether an operation uses a main account or a subaccount, the server must check the actual operation permissions. Subaccount isolation cannot be treated as a universal safeguard for every trading path.
Request Acceptance, Order Acceptance, and Fills Are Different States
A successful tool-call response may only mean that an API accepted the request. An accepted order is not necessarily filled. A limit order may remain unfilled or fill only partially. Both text and cards should read these states from business results rather than display “trade completed” simply because the Agent has finished its flow.
A submission timeout means the status may be unknown. The order may already have reached the business system even though its acknowledgment did not return. The execution layer needs to use idempotency identifiers, order queries, and result verification to decide whether to retry. A network timeout must not directly trigger a second order.
These constraints should reside in the business execution services. The Agent can explain progress and continue collecting input, but regenerating a prompt cannot grant it greater execution authority.
Following These Boundaries Through a Trade
Return to “Buy 0.1 BTC for me.” The following illustrative flow shows how data moves between the components.
In the spot-trading scenario, the buy side and quantity are already clear. The session provides available context, and the server checks account permissions. The system asks the user for clarification only when necessary information is missing. It should not ask again for a quantity already supplied.
Consider the limit-order branch: assume the user subsequently selects a limit order, the account and BTC/USDT trading pair have been determined, but the order price has not yet been entered. At this point the system can retain a parameter record: the trading pair, side, order type, and quantity are already in place, the limit price is still missing, and the record is marked as not yet submittable.
This is not a complete order ready for submission. The selected account is held in the operation context, and the final proposal must also show that account. A market price can be a reference; it cannot automatically become the user’s limit price.
Once the user supplies a price, business services check price precision, quantity step size, minimum-order requirements, and balance against the trading rules. Amount calculations belong to deterministic logic. Fee estimates need to state their basis. The final fill price and completion time cannot be guaranteed. A2UI binds these parameters, text explains the necessary information, and the user reviews and confirms.
The quantity comes from the user’s input; the limit-order type comes from a subsequent choice. Submission does not proceed while the system is waiting for missing parameters or confirmation.
After submission, the system updates the result according to the order’s business status. Confirmation is not a fill, and a proposal is not an execution acknowledgment. Natural language, cards, and tool calls throughout the process must all refer to the same business operation.
Evaluation Should Target Component Contracts and Business Results
The final reply is not the only thing to test in this architecture. Contracts connect intent routing, parameter binding, Action dispatch, and execution state. Checking only whether the language reads well will not reveal an incorrect trading pair or account.
| What to Check | Errors It Should Detect |
|---|---|
| Intent and Skill routing | Treating a question about rules as an order request; selecting the wrong business capability or trading pair |
| Tool inputs and results | Confusing BTC quantity with an amount denominated in the quote currency; misinterpreting empty results, lack of permission, or timeouts |
| Cards and Actions | Misaligned field bindings; a button targeting another order or an old proposal |
| Confirmation and execution | Reusing an old confirmation after parameters change; placing a duplicate order after a submission timeout |
| Final business state | Displaying an accepted or partially filled order as fully filled |
“Buy 0.1 BTC” and “buy BTC with a specified amount in the quote currency” use different input definitions and must not be mapped indiscriminately to the same quantity field. Limit price, quantity, and fees also have different units. Parameter validation needs to check units and precision, not merely whether the JSON passes syntax validation.
Exception tests should produce defined results under defined conditions: no submission without a limit price; no display of a partial fill as a full fill; and invalidation of an old confirmation when parameters change. Expected values must come from business contracts, not the model’s output on that test run. Skill updates, template changes, and Action-handler changes all require regression testing of these boundaries.
Observability needs to connect requests, Skill and template versions, tool results, confirmed proposals, and final business states. This makes it possible to distinguish a model selecting the wrong capability from an API failure, a UI mapping error, or an execution state that is still undetermined. Recovery or handoff to a human also requires retaining completed steps and unknown states.
Success rates must be defined against user goals: a query needs to retrieve the correct object and display it faithfully, while an execution needs the business system to verify the target state. Errors in write operations need separate scrutiny so that large numbers of successful queries do not dilute them. Latency to the first visible text, card readiness, and task completion should also be measured separately. Faster model responses do not necessarily mean faster trade completion.
Keeping Changes Within Their Own Components
Templates and deterministic handlers reduce the model’s workload, but increase the work involved in tool contracts, version compatibility, and state handling. These parts require ongoing maintenance and participation from business teams.
Changes can be handled in clearly defined components. If business rules change, inspect the APIs and Skills. If a field is displayed incorrectly, inspect bindings and templates. If an operation takes the wrong path, inspect Action dispatch. For duplicate submissions or unknown status, inspect the execution layer. Not every problem requires a fix in the global prompt.
In Bybit AI, users express goals in their own language, and the system converts them into business requests they can review. Execution authority remains controlled by explicit identity, permissions, and business rules.