# AVS of Agent

To verify the authenticity of agent services executed within a distributed network and ensure the compliance and transparency of node behavior.

<figure><img src="https://2202465257-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FfeTJMmefEjVoLviFIGxM%2Fuploads%2FTgmYvGzUBqJqJoKndnYJ%2Fimage.png?alt=media&#x26;token=537aee6e-23b3-448f-a017-bfa978beaeed" alt=""><figcaption><p>AVS workflow in restaking.</p></figcaption></figure>

### **Core Design**

#### **Task Validation Mechanism**

* **Task Distribution**: AGENT tasks (e.g., model execution, decision-making processes) are distributed by on-chain smart contracts or task aggregators to multiple nodes.
* **Node Execution**: Each node executes the assigned task independently and generates results.
* **Result Verification**: The results are validated on-chain through cryptographic proofs, such as hash verification or zero-knowledge proofs (ZKPs), ensuring the nodes genuinely executed the tasks.

#### **Validation Layer: Result Consistency and Behavior Monitoring**

* **Consensus Mechanism**: Results are validated using majority consensus among nodes. Signatures (e.g., BLS) are aggregated to ensure efficient verification.
* **Proof of Execution**: Nodes provide execution proofs (e.g., logs or ZK-SNARKs) as evidence of task completion. These proofs are submitted on-chain for transparency.
* **Random Sampling**: Random nodes are periodically selected to re-execute tasks, ensuring result authenticity and catching fraudulent behavior.

#### **Reward and Penalty System**

* **Reward Distribution**: Nodes receive rewards based on task completion and verification outcomes, using an ERC-20 token model.
* **Slashing Mechanism**: Nodes that fail to execute tasks, submit fraudulent results, or violate compliance standards will have their stakes slashed.

#### **Signature Aggregation for Efficiency**

* **BLS Signatures**: Task results and execution proofs use BLS signatures for aggregation, reducing on-chain storage costs and gas consumption while maintaining verification efficiency.

### **Workflow**

#### **Task Submission (On-Chain)**

* AVS Consumers submit AGENT tasks to the AVS smart contract for execution.

#### **Task Execution (Off-Chain)**

* Nodes receive and execute the tasks, generating outputs and proofs of execution.

#### **On-Chain Validation**

* Aggregated BLS signatures or ZK proofs are submitted to the AVS contract.
* Execution results and node behaviors are verified on-chain.

#### **Rewards and Penalties**

* Rewards are distributed to compliant and successful nodes.
* Malicious nodes face penalties, including slashing of their stakes.

### **Advantages**

#### **Authenticity**

Combines cryptographic verification and consensus to ensure tasks are genuinely executed.

#### **Decentralization**

Prevents centralized control by distributing tasks to multiple nodes.

#### **Economic Incentives**

Encourages reliable node behavior through rewards while penalizing malicious actions.

#### **Efficient Verification**

Signature aggregation reduces gas costs and on-chain computation.

### **Applicable Scenarios**

#### **Task Execution Validation**

Verify distributed nodes completing AGENT tasks, such as model decision-making or service computations.

#### **Data Integrity**

Ensure nodes process and validate accurate, untampered data.

#### **Service Quality Monitoring**

Monitor node uptime, performance, and compliance with AVS standards.


---

# 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://supernet.gitbook.io/supernet/distributed-network/avs-of-agent.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.
