Shade Agents

Wiki Powered byIconIQ
Shade Agents

We've just announced IQ AI.

Check it out

Shade Agents

Shade Agents are a framework for developing autonomous, artificial intelligence (AI) agents on the . They are designed to function as AI-powered smart contracts that can securely manage assets, access off-chain data, and execute transactions without direct human oversight or single points of failure. [4]

Overview

Shade Agents were introduced to address a significant challenge in agent design: the limitations of centralized, custodial, or unverified . Most contemporary AI agents operate from centralized servers, making them unsuitable for securely managing digital assets or sensitive data due to risks of single points of failure and custodian control. Shade Agents solve this by combining the verifiability and privacy of Trusted Execution Environments (TEEs) with the decentralized key management capabilities of the NEAR Protocol. This architecture enables the creation of what are termed "Agentic Protocols"—a new class of decentralized applications characterized by their autonomous, proactive, and intelligent nature. [6] [5]

The core concept is to separate the agent's logic and computation from its on-chain identity and asset control. An off-chain "worker agent" runs inside a secure TEE, allowing it to access private data, interact with large language models (LLMs), and perform complex computations. This worker then proposes transactions to an on-chain . The smart contract verifies the integrity of the worker agent before using NEAR's Chain Signatures feature to execute transactions on its behalf various blockchains. This model ensures that the agent's assets are managed non-custodially and that its operations are both verifiable and resilient, as the agent's existence is not tied to a single physical TEE instance. [6] [4]

The framework is designed to empower developers to build sophisticated applications that can automate complex tasks in decentralized finance (DeFi), prediction markets, and other domains. By providing a trustless and transparent , Shade Agents aim to replace traditional user interfaces and intermediaries with intelligent, autonomous entities that can operate permissionlessly the ecosystem. [5]

History

The concept of Shade Agents was officially introduced by the on February 20, 2025, through a blog post. The announcement detailed the architecture, capabilities, and potential use cases for the technology. The initiative was launched with significant ecosystem support, including a dedicated fund from the to encourage development and innovation in the field of autonomous . [4]

Technology

The architecture of Shade Agents is a on-chain and off-chain model designed to balance privacy, computational power, and decentralized security. It relies on two primary components and leverages key features of the .

Core Architecture

A Shade Agent is composed of two distinct but interconnected parts:

  • Worker Agent (Off-chain): This is a backend service that contains the agent's core logic. It runs within a Trusted Execution Environment (TEE), which is a secure and isolated hardware enclave that protects code and data from being accessed or tampered with, even by the host system's administrator. The worker agent can be written in any programming language that can be compiled into a Docker image. Its responsibilities include accessing off-chain data sources like and private LLMs, performing computations, and proposing transactions to its on-chain counterpart. The worker agent is designed to be stateless. [6] [5]
  • Agent Smart Contract (On-chain): This is a smart contract deployed on the NEAR that serves as the agent's on-chain identity and authority. It manages the registration of authorized worker agents, verifies their integrity, and controls the agent's assets. The contract stores an approved code hash (a SHA256 hash of the worker agent's Docker image) and uses this to ensure that only worker agents running the correct, unaltered code can request actions. [6] [4]

Mechanism of Operation

The interaction between the off-chain worker and the on-chain contract follows a precise, security-focused workflow:

  1. Initialization: When a worker agent starts inside a TEE, the TEE hardware generates a temporary, random keypair and a corresponding account. This account is used exclusively for communicating with the agent's smart contract and does not hold any permanent assets.
  2. Registration: The worker agent calls the register_agent function on its smart contract. In this call, it provides a remote attestation quote, which is a cryptographic proof generated by the TEE hardware verifying that the agent is running within a genuine TEE. It also provides the SHA256 hash of its own Docker image.
  3. Verification: The smart contract receives the registration request and performs two checks. First, it validates the remote attestation quote to confirm the TEE's authenticity. Second, it compares the submitted code hash against a list of approved hashes previously set by the contract owner.
  4. Authorization: If both the attestation and the code hash are valid, the smart contract registers the worker agent's temporary account as an authorized signer. This grants the worker agent the permission to request transactions on behalf of the smart contract.
  5. Transaction Signing: Once registered, the worker agent can call the request_signature function on the smart contract to execute transactions. This function utilizes NEAR's Chain Signatures feature, allowing the smart contract to sign transactions for other blockchains like , , or .
  6. Resilience and Redundancy: Any TEE instance running the same approved Docker image can register with the smart contract and gain signing access. This creates a decentralized and resilient system, as the agent's identity and assets are tied to the on-chain contract, not a single physical TEE instance. If one worker agent fails, another can be spun up to continue its operations without loss of assets or control. [6]

Key Technological Pillars

The functionality of Shade Agents is enabled by two core technologies:

  • Trusted Execution Environments (TEEs): TEEs provide a secure environment for the worker agent to execute its logic and handle sensitive information. This allows agents to access private API keys, proprietary AI models, and other off-chain data without exposing them on a public . The remote attestation feature of TEEs is critical for the on-chain smart contract to verify the integrity of the off-chain code. [5]
  • NEAR Chain Signatures: This feature allows smart contracts on the NEAR to generate cryptographic signatures that are valid on other blockchains. For Shade Agents, this means a decentralized group of verified worker agents can collectively control a single cryptographic key managed by the on-chain contract. This eliminates the single point of failure associated with a lone TEE or a centralized key management service. As stated in the project's announcement, this capability is "extremely powerful, as it removes the risk of key loss or compromise from utilizing a single TEE." [4]

Agent Smart Contract Functions

The standard agent smart contract includes several key functions for management and operation:

  • **approve_code_hash**: An owner-only function used to add the SHA256 hash of a worker agent's code to an approved list. This function is essential for deploying new agents and for upgrading the logic of existing ones.
  • **register_agent**: Allows a worker agent to register itself by providing its remote attestation and code hash for verification.
  • **request_signature**: A function restricted to registered agents. It takes the transaction payload, a derivation path for generating a specific address, and a key version (e.g., secp256k1 for EVM chains or ed25519 for ) to generate a valid signature for an external . [6]

Development and Tooling

The Shade Agents framework provides tools to support developers in building, deploying, and managing agents. Agents themselves can be written in any language that can be containerized in a Docker image, offering flexibility. The on-chain agent contracts are written in Rust.

The ecosystem provides the following tools:

  • **shade-agent-cli**: A command-line interface designed to simplify the deployment of the agent smart contract and the approval of the initial code hash.
  • **shade-agent-api**: A library that streamlines agent development by abstracting away the complexities of the registration process. It provides a simple requestSignature function that agents can call to sign transactions.

Developers can follow several development paths:

  • Standard Flow: Utilize the provided quickstart template along with the and API for rapid development.
  • Custom Flow: Deploy a custom agent contract to implement more granular control or to restrict an agent's actions beyond the standard template.
  • Advanced Flow: Build a Shade Agent from scratch without the provided tools for highly specialized or niche use cases. [6]

Security Considerations

The security of Shade Agents relies on the interplay between the TEE, the on-chain contract, and proper governance.

  • Key Management: All valuable assets are intended to be held in the persistent, accounts managed by the agent smart contract via Chain Signatures. The temporary keys generated within the TEE are for communication purposes only and should not be used to store funds.
  • Code Upgradeability: The ability of the contract owner to approve a new code hash is a powerful but centralized vector. The official documentation recommends implementing robust governance mechanisms, such as a Decentralized Autonomous Organization (DAO) vote or a time-locked grace period, to ensure that any upgrades to the agent's logic are transparent and secure.
  • Action Gating: For enhanced security, developers can implement an additional layer of logic within the agent's smart contract to strictly limit its capabilities. This could include restricting the agent to interacting with specific chains, whitelisting certain transaction types (e.g., allowing swaps but not transfers), or setting daily transfer limits to mitigate potential damage from a compromised or malfunctioning agent. [6]

Use Cases and Applications

Shade Agents are designed to enable a wide range of autonomous applications . The framework allows developers to integrate intelligence into protocols without human intervention and provides end-users with verifiable and private automation.

Potential applications include:

  • Mindshare Trading Agent: An agent that tracks social media metrics and market data from sources like Kaito, uses an AI model to make trading decisions, and autonomously executes trades on assets like , , and . [4] [5]
  • Decentralized Solvers: Agents that accept user deposits on any chain and use off-chain data and computation to fulfill user intents, such as rebalancing assets decentralized exchanges (DEXs) and bridges to find the optimal execution path.
  • Automated Prediction Markets: Worker agents can be programmed to query predefined, trusted data sources to automatically and immediately resolve prediction markets, eliminating the need for manual resolution or lengthy challenge periods.
  • Lending Optimizers: Agents that constantly monitor various lending protocols to match borrow and lend requests at the most optimal rates, rebalancing funds different pools to maximize capital efficiency.
  • Social Betting Escrow: An agent that creates and resolves on-chain markets for social bets (e.g., bets made on Twitter). The agent manages escrowed funds and automatically settles the bet based on defined resolution criteria verified by its off-chain logic. [4]

How ADK-TS by IQ AI Works with NEAR Shade Agents

Combining ADK-TS Intelligence with Shade Agent Execution

The integration of AI's Agent Development Kit for TypeScript (ADK-TS) and NEAR Shade Agents creates a framework for building autonomous that can operate on the without human intervention. This combination leverages the distinct strengths of each technology: ADK-TS provides the agent's intelligence and reasoning capabilities, while NEAR Shade Agents handle secure, autonomous transaction execution on the . [7]

ADK-TS is a framework for building sophisticated that can reason through complex scenarios, coordinate with other agents, and maintain memory interactions. A key feature is its support for multi-agent orchestration, which allows developers to create specialized agents for specific tasks, such as market analysis or transaction logic, that work together seamlessly. This approach avoids creating a single, monolithic AI system. [7]

NEAR Shade Agents provide the solution for one of the main challenges in AI-blockchain integration: secure transaction signing. Each agent is given its own NEAR account, with private keys stored securely within a Trusted Execution Environment (TEE). By utilizing NEAR's Chain Signatures technology, these agents can sign transactions not only on the NEAR Protocol but also on other blockchains like and . This enables agents to operate independently multiple chains, making decisions and executing transactions without human oversight. The use of TEEs provides hardware-level security for the agent's private keys, and the decentralized architecture of TEE networks ensures there are no single points of failure, making the system censorship-resistant and highly available. [7]

Example: Autonomous Ethereum Price Oracle

A template developed by demonstrates a practical application of this integration: an autonomous AI agent that functions as an price . The agent is designed to monitor market sentiment by analyzing headlines from Reddit, fetch real-time price data from the API, and then autonomously sign and broadcast a transaction to update an on-chain contract. This entire process is completed without any human involvement. [7]

The system is built using a multi-agent approach:

  • Price Agent: A specialized agent responsible for fetching the current price of from an external API.
  • Sentiment Agent: Another agent that analyzes recent headlines from sources like Reddit to determine the market sentiment, categorizing it as positive, negative, or neutral.

These agents work in to gather data. Once the data is collected and processed, the root agent prepares a transaction. The agent then uses the requestSignature function provided by the Shade Agent framework to autonomously sign the transaction payload using the keys secured within the TEE. Finally, the signed transaction is broadcast to the to update the . This example showcases a complete, end-to-end autonomous pipeline, from data gathering and AI-driven analysis to secure, cross-chain transaction execution. [7]

Ecosystem and Support

The development of Shade Agents is supported by key organizations within the NEAR ecosystem. The is a primary supporter and has established a $20 million fund dedicated to fostering innovation and development of on the protocol. Additionally, the project has received strategic support from for NEAR .

For developers, a range of resources is available, including official documentation, a GitHub template for quick deployment, and technical documentation for Chain Signatures. Community support is offered through developer office hours and dedicated Telegram groups managed by entities like Proximity.dev. The ecosystem is also promoted through workshops and hackathons at major industry events to accelerate adoption. [4] [5] [6]

Future Vision

The long-term vision for Shade Agents extends beyond simple automation to the creation of complex, fully autonomous systems. Proponents envision a future where these agents power sophisticated applications such as:

  • AI-Driven Hedge Funds: Fully autonomous agents managing large pools of capital and executing complex trading strategies multiple markets.
  • Agent-Based DAOs: Organizations where real-time, AI-driven decision-making replaces slow, manual governance votes, enabling more efficient and responsive operations.
  • Autonomous Businesses: Self-sustaining digital organizations where manage key functions like hiring, capital allocation, and operational tasks. [4]

REFERENCES

HomeCategoriesRankEventsGlossary