LogoLogo
  • Getting Started
    • Overview
    • How-to Guides & Tutorials
      • Video Tutorials
        • Building an Autonomous AI Agent for Twitter/X
        • Bulding Your Own Whale Tracking Agent
        • Building a Degen Agent that Apes in low-caps on Solana
      • How to Build Your First AI Agent
      • How to Choose the Right AI Model for Your Agent
      • How to Add and Configure Plugins
      • How to Set Up and Trigger Workflows
      • How to Launch and Tokenize Your AI Agent
      • How to Edit Your Published Agent
      • How to View Agent Wallet Activity
      • How to get a free Twitter/X API key
      • Official vs Unofficial X plugins. What's the difference?
      • How to Create a Telegram Bot & Get your Chat ID
      • How to Build a Copy-Trading AI Agent
      • Loomlay Troubleshooting Guide
  • LOOMLAY AI AGENTS
    • Introduction
    • Deploying agent live
    • Models
    • Plugins
    • Workflows
    • Workflow Triggers
      • Custom
      • Run on Repeat
      • New Message: Telegram
    • Agent Wallet
  • Terminal
    • Overview & Installation
  • Integration with workflows
  • Configuration & styling
  • Advanced features
  • Tokens
    • LAY Token
    • Agent Tokens
  • Pricing
    • Agent Developer
Powered by GitBook
On this page
  • Loader Messages:
  • Passing User Context:
  • Generating Interactive Elements (Links & Buttons):
  • Generating EVM Transaction Buttons:
  • Hidden Messages (Whispers):

Advanced features

Enhance the user experience and agent capabilities with these advanced features.

Loader Messages:

Display a sequence of messages while the agent is processing a request. Add this inside the <loomlay-chat> element:

<loomlay-chat ... >
    <automaticResponseMessages>
        <message timeout="2000">Your request received</message>
        <message timeout="4000">Analyzing data</message>
        <message timeout="10000">Analyzing finished</message>
        <message timeout="15000">Preparing the answer</message>
        <message timeout="20000">Packing response</message>
    </automaticResponseMessages>
    ...
</loomlay-chat>
  • timeout: Time in milliseconds before the next message in the sequence is shown.

Passing User Context:

Send additional, persistent context about the user with each message. This is useful for passing user IDs, wallet addresses, or other data for function calling or personalization. Add this inside the <loomlay-chat> element:

<loomlay-chat ... >
    <userContext>Additional context about the user (e.g., user_id: 123, wallet: 0xabc...)</userContext>
    ...
</loomlay-chat>

The content of <userContext> will be sent along with every message from the user.

Generating Interactive Elements (Links & Buttons):

Instruct your agent to generate responses containing special syntax to render hyperlinks and buttons in the terminal.

General Syntax:

  • Links: [link|action_type|value|label]

  • Buttons: [btn|action_type|value|label]

Action Types:

  • open-new: Opens the value (URL) in a new browser tab.

  • open-current: Opens the value (URL) in the current browser tab.

  • prompt: Sends the value (text) back to the agent as if the user typed it.

Examples:

  • Hyperlink (open in new tab): Agent response: Check this out: [link|open-new|https://google.com|Open Google] Renders as: A clickable link "Open Google" that opens google.com in a new tab.

  • Button (open in current tab): Agent response: Visit our site: [btn|open-current|https://loomlay.com|Visit Loomlay] Renders as: A button "Visit Loomlay" that navigates to loomlay.com in the current tab.

  • Button (prompt): Agent response: Would you like to: [btn|prompt|analyze wallet 0x123...|Analyze Wallet] Renders as: A button "Analyze Wallet". Clicking it sends "analyze wallet 0x123..." to the agent.

Generating EVM Transaction Buttons:

Allow users to initiate EVM-compatible (e.g., Ethereum, Polygon) transactions directly from the terminal using their self-custodial wallet like MetaMask.

Flow: 1. Your agent's workflow uses a plugin (e.g., Relay, Clanker, Enso) to prepare/generate the transaction details. 2. Upon successful transaction generation, the plugin outputs a unique transaction_key. 3. Instruct your agent to include this transaction_key in its response using the special button syntax.

Syntax:

[btn|transaction|transaction_key|Button Label]

Example: Agent response: To proceed, please [btn|transaction|0xGeneratedTxKey123abc|Confirm Swap] Renders as: A button "Confirm Swap". Clicking it will prompt the user to confirm and send the transaction using their connected EVM wallet.

Hidden Messages (Whispers):

Send information from the agent that is processed by the system or other integrations but is not visible to the user in the terminal. This is useful for passing transaction keys, internal state, or context that shouldn't clutter the user interface.

Syntax: Instruct the agent to include the hidden message between <whisper> and </whisper> tags in its response.

Example Agent Output: Do you want to confirm the swap? <whisper>transaction_key:0xGeneratedTxKey123abc;item_id:789</whisper> Please click the button below. [btn|transaction|0xGeneratedTxKey123abc|Confirm Swap]

User Sees in Terminal: Do you want to confirm the swap? Please click the button below. (Followed by the "Confirm Swap" transaction button)

The content within <whisper>...</whisper> is not displayed via Terminal but is visible to the agent.

PreviousConfiguration & stylingNextLAY Token

Last updated 3 days ago

content_copydownloadUse code .Html

with caution