Agents that can't break the rules.

Smart Agents are rule-bound accounts. The rules live on-chain. The validator network refuses every action that breaks them. Trading bots, treasury vaults, autonomous workers, without writing a single smart contract.

Anatomy

Four parts. All on-chain.

Every Smart Agent has the same shape: a typed rule authored with the Rules namespace, a published ruleRef anchored on HCS, rule-checked execution before the TSS quorum signs, and an audit trail where every rule version is itself anchored on-chain.

01

Rule

A typed AgentValidatorRules authored with Rules.template.tradingAgent or the fluent Rules.forAgent() builder. Trade limits, approved pairs, cooldowns and approval thresholds — all schema-validated before the network ever sees it.

02

ruleRef

Publish once with baas.rules.publish(rule) and receive a typed ruleRef — { chain, topicId, consensusTimestamp } — the cluster stamps onto every entity it gates. Updates re-publish; the on-chain history is the audit trail.

03

Execution

Every action is checked against the on-chain rule BEFORE the validator quorum will TSS-sign. Dry-run any candidate via baas.rules.simulate — refused actions return structured reasons, no off-rules paths possible.

04

Audit trail

Every action gets a Merkle proof anchored on the chain of your choice. Anyone (not just you) can audit the agent's full history without trusting the operator.

Real SDK

One agent. Four touchpoints.

Author rules with the typed Rules namespace, publish via baas.rules.publish, create the agent entity bound to the published ruleRef, then simulate or execute rule-checked actions. The network enforces the on-chain rule whether you go through the SDK or hit the REST API directly.

  • Author rules with Rules.template.tradingAgent or the fluent Rules.forAgent() builder
  • Local Rules.validate(rule) preflight — schema errors before the network sees them
  • Publish once via baas.rules.publish, anchored to HCS as a typed ruleRef
  • Validator network checks the on-chain rule BEFORE the quorum will TSS-sign
  • baas.rules.simulate dry-runs any candidate action against the published rule
  • Rule updates are themselves anchored; full version history via getVersionHistory
  • Two sovereignty modes per rule: partial (validator co-signs) or full (TSS-only)
  • Multi-chain, same agent across Hedera, XRPL, Polkadot, Solana
agent.register.ts
// Two steps: publish the agent's rules to HCS, then create the
// agent entity bound to that ruleRef. The validator network refuses
// any action that doesn't satisfy the on-chain rules.
import { BaasClient, Rules } from '@hsuite/smart-engines-sdk';

const baas = await BaasClient.connectToCluster({ network: 'testnet', appId });

// 1. Author a trading-agent rule with bounded caps + approved pairs.
const rule = Rules.template.tradingAgent({
  name: 'DCA trader',
  maxPerTrade: '100',
  dailyLimit:  '1000',
  approvedPairs: [
    { baseToken: 'HBAR', quoteToken: 'USDC', chain: 'hedera' },
    { baseToken: 'XRP',  quoteToken: 'USDC', chain: 'xrpl'   },
  ],
  cooldownMs: 30_000,
  approvalThreshold: '500',
});

// 2. Publish to HCS → returns a typed ruleRef the cluster stamps
//    onto every entity it gates.
const { ruleRef } = await baas.rules.publish(rule);
// ruleRef: { chain, topicId, consensusTimestamp }

// 3. Create the agent entity, bound to the published rule.
const agent = await baas.entities.createAgent({
  primaryChain: 'xrpl',
  name: 'DCA trader',
  agentType: 'trading',
  ruleRef,
});
Reference implementation

See one running.

The showcase runs real Smart-Agents on the Smart Engines validator network: registered on testnet, rule-checked at sign-time, every action anchored on-chain. Open it and watch one act.

Smart-Agents vs smart contracts

Why a contract can't be an agent.

Contracts are reactive code on one ledger. They can't enforce off-chain rules, they can't refuse partway, they can't act on their own, and they can't operate cross-chain. Smart Agents do all four because the network, not the bytecode, enforces the contract.

A smart contract can't… …how Smart-Agents do it

Enforce off-chain rules

Whatever the VM can't express, KYC, sanctions, geo-allowlists, real-world oracle prices, velocity limits, can't be enforced before a signature lands.

Rule-checked TSS signing

Validators run the rules engine before the quorum signs. KYC providers, sanctions feeds, real HTTPS APIs, all called pre-sign by the network itself.

Refuse a transaction

Once a contract permits a path, anyone can take it. No quorum says "no" partway through. Bad inputs go on-chain and you reverse later.

Refused at the signing layer

Rule violations return structured errors. The network never signs a bad action, no replay, no rollback, no after-the-fact cleanup.

Act on its own initiative

Contracts are reactive. They wait for a caller. No scheduled triggers, no event-driven autonomy, no agent that wakes up on its own.

Scheduled and event-driven

Agents fire on cron, on price thresholds, on incoming messages, fully autonomous within their rule envelope. The validator network is the runtime.

Update rules without an admin key

Contract upgrades need a privileged key (or proxy gymnastics). The admin can rug. The agent's safety reduces to one person's integrity.

Rules pinned to HCS

Every rule change is anchored to a Hedera HCS topic, no admin key, no rug-pull surface. The audit trail is the source of truth.

Hold assets on other chains

A contract's scope is its ledger. To touch another chain you need a bridge, a wrapped token, and 40-minute finality. Each is a new attack surface.

Native multi-chain wallet

One TSS key, derived natively for Hedera, XRPL, Solana, Polkadot. The agent trades XRPL while custodying on Solana, no bridge, no wrap.

What's possible

Six agents you could deploy this week

Concrete shapes that map to the primitives above. Each card describes the pattern, the rule shape, and the kind of failures it makes impossible.

01

Autonomous DCA / rebalancing treasury

DCAMulti-chainSchedule trigger

Rules-based portfolio rebalance across chains. Schedule the agent to dollar-cost-average into target allocations. The network refuses trades outside allowed pairs or above the daily limit.

02

Auto-LP yield rotation

Yield routingMulti-chainConditional logic

LP agent rotates positions between Hedera, XRPL, Solana, Polkadot based on APY thresholds. Conditions like min-liquidity and max-slippage are part of the rule set, enforced before signing.

03

Compliance-bound transfer agent

KYC · AMLRules EngineGeo-allowlist

A transfer agent that calls external KYC providers and sanctions feeds before approval. Geographic allowlists, velocity limits, and sender-side compliance all live in the rule set.

04

Rug-proof token launchpad

No admin keyRules.template.fairLaunchFair launch

A token-launch agent where mints, transfers and freezes all require the validator quorum signing against rules published via Rules.template.fairLaunch. The dev cannot dump early. The network refuses the tx.

05

Cross-chain arb bot

TSSNo bridgesNative keys

One agent, one wallet, every chain. Sniping XRPL DEX and Solana DEX from a single TSS-signed identity. No bridge. No wrapped token. No 40-minute finality.

06

Trigger-fired autonomous worker

Smart-Host FunctionsEvent-drivenMulti-step

Agent listens for on-chain events (deposits, oracle prices, NFT mints), runs multi-step logic in a Smart-Host Function, and fires follow-up transactions through the same rule set.

Ship an agent today.

Register an agent on testnet, set the rules, fire your first rule-checked action. Watch the network refuse a bad one, accept a good one, and anchor the proof on-chain.