# KVM

The Kardia Virtual Machine (KVM) is a powerful, sandbox virtual stack embedded with each full node, responsible for executing smart contract bytecode. Smart contracts refer to immutable computer programs and run deterministic in the context of KVM. Contracts are written in a higher-level programming  language like solidity, then compiled to bytecode. The machine code is completely isolated from the network, file system, and any processes of the host computer. Every node in the network runs a KVM instance which allows them to agree on executing a contract. The KVM is essential because it executes smart contracts, allowing anyone to execute code in a trustless ecosystem. The outcome of these smart contract code executions is guaranteed and fully determined. For every instruction implemented on the KVM, the system keeps track of execution cost, assigns to each instruction an associated cost in the gas unit. When users initiate an execution, they will reserve some KAI to pay for this gas cost.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.kardiachain.io/docs/archived-docs/kvm.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
