Logic Layer

AI agents that turn Web3 commands into seamless agentic actions.

Logic Layer

Created At

ETHGlobal New Delhi

Project Description

Logic Layer is a goal-oriented execution engine that fundamentally changes how users interact with the Hedera network. It introduces a new paradigm where users simply describe their end goal in plain English, and an AI agent autonomously plans and executes the entire on-chain workflow required to achieve it.

The Problem with Web3 Interaction

Historically, interacting with a blockchain has presented a steep learning curve.

Era 1: The Coder: Required deep expertise in SDKs and smart contracts, making it inaccessible to most. Era 2: The Builder: Introduced visual, drag-and-drop tools. While simpler, this still forced the user to be an expert in the process, requiring them to manually map out every single step of a workflow. Both eras share a fundamental flaw: they require you to know how to do something. Logic Layer challenges this by creating a new paradigm where you only need to know what you want to do.

The Solution: A Goal-Oriented AI Agent

With Logic Layer, you converse with an AI agent that acts as your personal Web3 operator. Instead of providing step-by-step instructions, you state a high-level goal. The AI planner then decomposes that goal into a sequence of verifiable on-chain actions, presents the plan for confirmation, and executes it seamlessly.

This transforms complex tasks into simple conversations:

Simple Goal: "Send 150 HBAR to account 0.0.12345." Complex DeFi Goal: "I have 5,000 HBAR. Find the best yield for it on SaucerSwap, deposit it into the liquidity pool, and stake the resulting LP token in the farm." DAO Management Goal: "Draft a proposal to fund the developer guild with 10% of the treasury, put it to a 5-day vote, and execute the transfer if it passes." Logic Layer is the bridge between human intent and on-chain finality. It makes Web3 accessible for newcomers, unlocks 10x productivity for experts, and empowers non-technical users to securely manage complex operations like DAO governance and treasury diversification. It's the first step towards a future where autonomous agents securely manage our on-chain lives.

How it's Made

Logic Layer is a full-stack application composed of a conversational frontend, a powerful AI backend, and deep, meaningful integration with the Hedera network's core services.

  1. Frontend: The Conversational Interface

Technology: The frontend is a modern, responsive web application built with Next.js, React, and TypeScript. Architecture: We used a component-based architecture, leveraging shadcn/ui for a clean and accessible user interface. The entire user experience is centered around a single, powerful chat interface that captures the user's goal and renders the AI's plan and results in a human-readable format. It's designed to feel less like a traditional DApp and more like a conversation with an intelligent assistant. 2. Backend: The AI Core & Execution Engine

Technology: The backend is a Node.js server running TypeScript, providing a robust API for the frontend. The AI Planner (The "Magic"): This is the heart of the system. When a user's goal is received from the frontend, it's passed to our AI Planner, which is powered by a Large Language Model (LLM) configured for advanced tool use. Goal Decomposition: The LLM is given a prompt that instructs it to act as a "Hedera Expert Agent." It has access to a predefined set of "tools," which are wrapper functions for Hedera SDK actions (e.g., createToken, executeSwap, addLiquidity). The LLM's task is to break down the user's high-level goal into a JSON-based "plan" consisting of a sequence of these tools and their required arguments. Execution Engine: Once a plan is generated and confirmed by the user, our Execution Engine iterates through the steps. It securely calls the appropriate functions in the hedera-sdk-js to perform each on-chain action. 3. Hedera Integration: The Trust Layer

Our choice of Hedera was deliberate, as its unique features are essential for an AI this powerful to operate safely.

Partner Technologies Used: We used the Hedera SDK for JavaScript (hedera-sdk-js) as the fundamental bridge to the network. Our entire "toolset" for the AI is built on top of this library. Hedera Services: Token Service (HTS) & Smart Contract Service (EVM): The AI agent directly invokes these services to perform its tasks, from simple HBAR transfers to complex interactions with DeFi protocols like SaucerSwap.

The Full Flow:

User types a goal in the Next.js frontend. The goal is sent to the Node.js backend. The AI Planner (LLM) decomposes the goal into a JSON plan. The plan is sent to the user for confirmation. Upon confirmation, the Execution Engine begins executing the plan's steps using the hedera-sdk-js. Each executed action is logged to the Hedera Consensus Service for an immutable audit trail. The final result and a link to the transaction on Hashscan are returned to the user in the chat interface.

background image mobile

Join the mailing list

Get the latest news and updates