# Introduction

The subnet template is a P2P coordination layer to deploy clusters of nodes that communicate in a decentralized network. Your job is to build the distributed AI application logic on top of it.

There are three main facets for building a decentralized AI subnet:

## Application

This is the business logic for each peer and can be made to be role-isolated. Peers or roles have specific tasks; this is where that logic lives. For example, a peer can be responsible for generating inference, validating trainer peers, etc.

The application logic is deployed from the [server](/copy-of-subnet-template/server.md).

## Communication

This is how peers communicate with one another. There are two main features for peers to communicate with one another: **using a GossipSub or direct P2P communication** via custom protocols or the API protocol.

## Consensus & Scoring

The consensus mechanism is for scoring peers. Each peer needs to know the scores of each other peer. On each epoch, a validator from the subnet will be randomly elected for an attestation-based consensus mechanism, where this validator submits scores for each peer in the subnet. The other peers can vote on that proposal by attesting to it; not attesting to it counts as a non-vote. The subnet must reach a consensus of >66% to generate emissions.


---

# 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.hypertensor.org/copy-of-subnet-template/introduction.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.
