# Overview

## Knots and Bolts

The Knot Language is made up of a number of different layers.

### Modules

[Modules](/language/syntax/syntax/module.md) are the largest element of Knot, they can contain multiple entities such as `view`'s or `state`'s. Modules can export and import entities so that multiple modules can re-use or access code stored in a different module. Modules are referred to using a name that is based on their path from the source directory of your project.

### Entities

[Entities](/language/syntax/syntax/entity.md) are declared within a module and can *only* be declared within a module (functions can technically be created anonymously within a closure by using lambda expressions). Entities include `view` and `func`. Each is used to define an independent, re-usable piece of an application.

### Statements

Certain statements are only available directly within a `module` such as `const` to define static constants and `import` to import from external modules. The `let` statement is only available to define variables within a closure, such as a function body.

### Expressions

As a functional language, we strive to make as much of the language usable as an expression so it can be easily composed. These include simple primitives like booleans and integers as well as binary operations, unary operations, closures and more!

### Primitives

The most basic types you can use to describe data in your application. These include `nil`, `boolean`, `integer`, `float`, `string` and `element`.


---

# 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://knot.gitbook.io/language/syntax/overview.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.
