6. Execution Logic

Once an agent’s trigger condition evaluates as true, the system immediately performs its configured action. Execution is deterministic, observable, and tied directly to the context that triggered it.

This section outlines how execution works in Terminal, how it routes to integrated platforms like Hyperliquid, and what controls are in place.


Action Types

Each agent is built to perform a specific type of action. Hypaw Terminal currently supports:

🟢 Trade Execution (Hyperliquid)

Agents can open, close, or adjust trading positions using live Hyperliquid APIs. Supported actions:

  • Market buy/sell

  • Limit orders

  • Stop-loss / take-profit setups

  • Position size control

Example:

If price surges + social mentions exceed 1000 → place long with 2x leverage

You can configure:

  • Execution side (long/short)

  • Size in USDC or %

  • Entry method (market or limit)

  • Optional stop/TP thresholds

  • Maximum number of executions per time window

🔵 Social Posting (X/Twitter)

Agents can automatically publish posts based on live context. Examples:

  • Announce a trending token

  • Post whale movement alerts

  • Share a DAO vote outcome

Posts support templating (e.g. auto-inserting token names, price data, sentiment) and can include emojis, tags, and links. Twitter/X integration uses OAuth and can be revoked anytime from your dashboard.

🔔 Notifications & Logs (default)

All agents produce structured logs for every evaluation and trigger attempt — even if no action is taken. Logs show:

  • Context snapshot

  • Trigger evaluation result

  • Action fired (or skipped)

  • Response from the execution endpoint

Notifications via Telegram, Discord, or webhooks are coming soon.


Execution Routing

Execution is handled by Terminal’s backend once the agent fires. The flow looks like this:

If the action fails (e.g., trade rejected, API rate-limited, auth expired), the failure is logged and the agent enters a temporary cooldown state (configurable).


Rate Limiting & Controls

Each agent supports safety parameters to prevent runaway behavior or over-execution:

Control
Description

Max executions/hour

Cap total actions within a time frame

Cooldown window

Enforce delay between consecutive executions

Trigger debounce

Ignore trigger changes below a threshold window

Manual pause/stop

Disable agent at any time from dashboard

For trading agents, these settings help prevent repeated entries during volatility. For content agents, they prevent spam or duplicate posts.


Wallet & API Permissions

  • All trading activity is routed through your connected wallet on Hyperliquid.

  • You approve access once and can revoke anytime.

  • For posting, you connect an X account using OAuth — no keys are stored.

Terminal never holds funds, private keys, or API tokens beyond signed permissions.


Next: 7. Security & Safety → Learn how Terminal handles wallet permissions, onchain controls, and execution protection.

Last updated