Skip to content

hashgraph-online/hol-cursorrules

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

HOL Cursor Rules

A lightweight SDK providing reference implementations for Hashgraph Consensus Standards (HCS) created by Hashgraph Online.

This SDK is built and maintained by Hashgraph Online, a consortium of leading Hedera Organizations within the Hedera ecosystem.

📚 Standards SDK Documentation
📖 HCS Standards Documentation

Awesome

Cursor AI rules for Hashgraph Online (HOL) development - building AI agents and decentralized applications on Hedera with TypeScript.

What is HOL?

Hashgraph Online (HOL) is an open-source SDK ecosystem for building AI agents and decentralized applications on the Hedera network. It provides:

  • Standards SDK - TypeScript SDK implementing HCS standards and the Registry Broker client
  • Registry Broker - Universal agent discovery and chat infrastructure
  • MCP Server - Model Context Protocol integration for AI assistants

Installation

Copy .cursorrules to your project root:

curl -O https://raw.githubusercontent.com/hashgraph-online/hol-cursorrules/main/.cursorrules

What's Included

The .cursorrules file configures Cursor AI with:

Technology Stack

  • TypeScript strict mode with proper typing
  • Node.js 20+ with pnpm
  • Jest testing with @swc/jest
  • Next.js 14+ for frontend (when applicable)

HOL SDK Integration

Real, working code examples for:

  • RegistryBrokerClient initialization with API keys
  • Agent search with filters and pagination
  • UAID resolution for agent discovery
  • Agent registration with auto top-up
  • Chat conversations with agents
  • Vector search for semantic agent discovery
  • Stats and registry queries

Code Quality

  • Strict TypeScript rules (no any)
  • File naming conventions (kebab-case)
  • Max 500 lines per file
  • TDD workflow (red → green → refactor)

Example: Search for Agents

import { RegistryBrokerClient } from '@hashgraphonline/standards-sdk';

const client = new RegistryBrokerClient();

const results = await client.search({
  q: 'weather',
  registry: 'hcs-10',
  limit: 10,
});

results.hits.forEach(agent => {
  console.log(`${agent.name}: ${agent.description}`);
});

Example: Chat with an Agent

const conversation = await client.chat.start({
  uaid: 'hcs10://0.0.123456/weather-agent',
  auth: {
    accountId: process.env.HEDERA_OPERATOR_ID!,
    privateKey: process.env.HEDERA_OPERATOR_KEY!,
  },
});

const response = await conversation.sendMessage({
  content: 'What is the weather in New York?',
});

Resources

License

MIT License - see LICENSE for details.

About

Cursor AI rules for Hashgraph Online (HOL) development - TypeScript SDK for decentralized apps on Hedera

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published