Creation Flow

WIP

1. Overview: Agent Creation Flow

From the screenshots, you can see two main components:

  1. Workflow Input Trigger & Data Prep

    • This is where the system fetches relevant environment variables, user inputs, and any scheduled tasks (e.g., a daily trigger).

    • The data includes on-chain info, crypto price feeds, or user parameters (like risk tolerance).

  2. Agent Configuration & Prompt Merging

    • Here, you define your AI agent’s persona (style, niche, inspiration), plus the “base prompt” (the core instructions for how it behaves).

    • The system merges these elements—promptBase, promptNotes, promptOutputFormat—into one final set of instructions that shape your agent’s behavior.

Essentially, you’re assembling both the functional side (where does it get data, how does it execute trades, etc.) and the personality side (tone, style, comedic flair) into a single “agent recipe.”


2. Defining the Agent: Persona & Style

In the “Twitter Persona” or “Persona” blocks, you’ll see:

  • getNiche / editNiche: Where you decide the agent’s domain focus, e.g., “AI trading,” “DeFi strategies,” or “meme coin alpha.”

  • getStyle / editStyle: The agent’s communication style—funny, sarcastic, professional, or a mix.

  • getInspiration / editInspiration: Additional references that shape the agent’s voice (like referencing your knowledge base or other role models).

  • mergePersona: All these elements fuse into a single “persona” object.

Why This Matters:

  • You can create an agent that’s purely serious and data-driven, or comedic and approachable like AIDAO.

  • The persona system ensures consistency in how the agent speaks and interacts across various channels (Twitter, Telegram, etc.).


3. Setting Up Data Sources & Tools

Looking at the pipeline around aspisManager and aspisReporter, you can see references to Onchain Data Collectors and Aspis Tools:

3.1 Onchain Data Collectors

  • Examples: getETHUSDTInflow, getBTCUSDTInflow, getFearGreed.

  • These “tools” query block explorers, analytics APIs, or aggregator sites to gather real-time data—like token inflows/outflows or fear/greed indices.

  • The system stores these results so the agent can interpret them before making decisions or generating messages.

3.2 Aspis Tools

  • getAspisRates: Retrieve real-time yield, performance, or vault metrics from the Aspis platform.

  • aspisExecute: The function that can place trades, rebalances, or other on-chain calls under your vault’s rules.

  • aspisGetFundInfo / getAspisVaultBalance: Query the vault’s details—how many assets are allocated, current stake, etc.

Why This Matters:

  • An agent’s intelligence hinges on the breadth of data. The more tools it has, the better it can reason (like checking inflows, computing fear/greed signals, or verifying your vault’s current state).


4. Merging Prompts & Generating Output

After the system merges:

  1. Base Prompt (the agent’s overall mission/instructions).

  2. Persona (its style, tone, domain).

  3. Aspis Info (vault data, on-chain stats).

…the agent effectively has everything it needs to produce an answer, a trade decision, or a tweet.

You’ll notice steps like promptAspis, promptBase, mergePrompt, etc. This is where each piece of text or data merges into the final “prompt” fed to your chosen LLM (e.g., GPT-4, Claude). The LLM then returns a structured response, which can either be:

  • A tweet: If you’re driving social media updates.

  • A Telegram message: If you’re chatting with the agent in real time.

  • An on-chain command: If the agent is rebalancing the Aspis vault.


5. Output & Execution

Once the agent’s output is ready, a few modules handle the final steps:

  • aspisReporter: Formats the final text into the style you want—maybe a short comedic post or a detailed explanation of the vault’s rebalancing.

  • sendTelegramReport or sendSMMTelegram: Delivers the message to your chosen Telegram channels or your social feed.

  • aspisExecute (in the Aspis Tools set): If the agent decided to actually place a trade or modify a vault, it calls this function to do so on-chain, respecting the vault’s constraints.

Why This Matters:

  • The system doesn’t just produce text; it can follow through with real actions (assuming you allow it).

  • Logging all these outputs (via saveTweetPostgres or similar modules in your pipeline) ensures you have a record of what the agent said or did.


6. Lifecycle: From Creation to Daily Operation

  1. Create / Configure Agent

    • Define persona, niche, style.

    • Select which data sources and on-chain tools the agent can access.

  2. Schedule or Trigger

    • Decide how often the agent runs: daily for a summary, or on-demand if a user messages it.

    • Optionally set a “Schedule Trigger” for routine tasks like “9 AM daily market recap.”

  3. Data Gathering & Prompt Assembly

    • The pipeline fetches environment variables, user input (“What’s my vault’s status?”), plus any aggregator data (on-chain, price feeds, social insights).

    • Merges base instructions + persona + fresh data into a single prompt.

  4. AI Reasoning

    • LLM (GPT-4, Claude, etc.) processes it, decides on an answer or action.

    • For trading, it might propose “Buy $TOKEN with 5% vault allocation, rebalance from stablecoins,” or for SMM, it might produce a tweet like “Market mania is brewing…”

  5. Report & Execution

    • The system either posts that tweet, sends a Telegram message, or calls aspisExecute to do the on-chain transaction.

    • All relevant logs and responses are saved for reference.

  6. User Feedback

    • You or your community can chat with the agent, refine strategies, or change its persona settings at any time.

    • The cycle continues automatically, letting the agent handle day-to-day DeFi tasks or marketing updates.


7. Putting It All Together

  • Agent Creation: Use the Behavior Pattern Forge to shape how it responds to volatility or what style it uses in social posts.

  • Data Connectors: Link up the Onchain Data Collectors, news feeds, sentiment APIs, so your agent remains well-informed.

  • Action Tools: Provide the agent with the ability to execute vault trades or post tweets, so it’s not just generating text but truly automating your DeFi ops and marketing.

  • Monitoring & Logging: Keep track of everything through the logs, Postgres saving, and Telegram updates. This gives full visibility into what your agent decided and why.

Result: A fully integrated flow where your AI agent is born (with a persona + dataset), gathers wide-ranging data, reasons about market moves, communicates that reason via Telegram or Twitter, and can even deploy on-chain trades, all under the secure governance of the Aspis vault infrastructure.


Last updated