Sofie AI
  • Introduction
  • Capabilities
  • CREATE AN AGENT
    • Agent Dashboard
    • Information
    • Twitter Configuration
    • Configure Triggers
    • Configure Functions
    • Finalize and Launch
  • EXAMPLE
    • Example (Weather)
    • Example (Custom)
    • Example (Stocks)
  • SECTOR AI
    • API Access
    • Product Roadmap
  • Tokenomics
  • Official Links
Powered by GitBook
On this page
  1. CREATE AN AGENT

Configure Functions

Set up functions for your agent and functions

PreviousConfigure TriggersNextFinalize and Launch

Last updated 3 days ago

Functions: What are Agent Functions?

  • Agent functions are capabilities that you enable your agent to utilize based on whether it meets the criteria specified in your "Description" during creation

What are Trigger Functions?

  • Trigger functions are operations that you want your agent to perform at regular intervals (every X minutes) that can either enhance the agent's memory or gather information to supply 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 lowercase

  • Example: get_weather_data or analyze_stock_prices

Description: Provide a detailed explanation here, as this information helps your agent determine when to use this function

Usage Hint: Specific guidance for your agent regarding appropriate situations to call this function

Function Arguments:

  • These are the parameters your agent should provide when invoking the function

  • Example: If creating a weather data retrieval function, you would add location as a string argument and then incorporate it into the request using {{location}}. Without defining this argument, the function won't know which location to check for weather conditions

Method: The HTTP request type (GET, POST, PUT, DELETE, etc.) for the URL you're accessing

URL: The endpoint address for the API you're utilizing

Headers: The required headers for the API you're connecting to. You can incorporate your arguments here by wrapping them in double curly braces (Ex. {{location}})

Request Body: The payload structure needed for the API you're using. You can include your arguments here by enclosing them in double curly braces (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).