build.fun ($BUILD)
  • Basics
    • What is $BUILD
    • Capabilities
    • Product Roadmap
    • Official Links
    • Tokenomics
  • Create an Agent
    • Getting Started
      • Agent Dashboard
      • Information
      • Twitter Configuration
      • Configure Triggers
      • Configure Functions
      • Finalize and Launch
    • API Access
    • Example (Weather)
    • Example (Custom)
    • Example (Stocks)
Powered by GitBook
On this page
Export as PDF
  1. Create an Agent
  2. Getting Started

Configure Functions

Set up functions for your agent and triggers

PreviousConfigure TriggersNextFinalize and Launch

Last updated 3 months ago

Functions:

What are Agent Functions?

  • Agent functions are functions that you allow your agent to call depending on if it meets the requirements of your "Description" when creating it

What are Trigger Functions?

  • Trigger functions are functions that you want your agent to call every X minute that can either add to the agents memory or use to get information to provide to Agent Functions

Function Name: This should be in snake case

What is snake case?

  • "Snake case" is a naming convention in programming where spaces between words are replaced with underscores ("_"), and all letters are written in lowercase

Description: The more descriptive the better for this as this is what your agent will use to decide if it needs to call the function

Usage Hint: More specific and help for your agent on when to call this function

Function Arguments:

  • Data that your agent should pass in to the function when it decides to call it

  • Ex. If you are creating something to get weather data from a specific location you would add location as an argument of type string and then pass it in to the request body or url with {{location}}. Without adding an argument the function won't know where to get the weather for

Method: The request type for the URL you are accessing

URL: The url for the api you are accessing

Headers: The headers necessary for the api you are accessing. You can use your arguments here but just make sure to wrap them in {{}} (Ex. {{location}}

Request Body: The request body necessary for the api you are accessing. You can use your arguments here but just make sure to wrap them in {{}} (Ex. {{location}}

Success Message: This is what you should provide your agent when the request is successful (determined by the response status code).

How do I parse a response from a custom API?

  • To describe a path to a value in JSON, use dot notation to represent the hierarchy of keys. For example, in the JSON object { "user": { "profile": { "name": "Alice" } } }, the path user.profile.name points to the value "Alice". If the key refers to an array, include the index like items[0].price for the first item's price in an items array.

Error Message: This is what you should provide your agent when the request is unsuccessful (determined by the response status code).