logoLive Now: Pearl, the "Agent App Store"

Introducing Developer Rewards for Custom Type Packages

Introducing Developer Rewards for Custom Type Packages

05-Jan-24

Olas now offers an additional opportunity for developers: the chance to contribute custom type packages to the Registry. The addition of this new package type to the Olas Stack allows developers to more easily contribute code to earn dev rewards and further enhances the flexibility the Olas Stack affords to builders.

Code, Capital 

Olas introduced a unique mechanism known as the code-capital flywheel. This concept revolves around a synergistic cycle where valuable code contributions from developers are directly linked to and rewarded with ETH and potentially OLAS boosts. Alongside the bonding mechanism that draws in capital based on the utility of code in the ecosystem, the code-capital flywheel is geared towards driving sustained growth of Olas and ongoing code development. This flywheel effect is fundamental to the network's strategy, driving innovation and enhancing the overall value of the services it offers.

Core to the code-capital flywheel is the capacity to track code contributions. Olas's modular design accommodates a wide range of contributions. Developers can add value through fully-developed agents or by crafting individual components. However, there have been instances where developers have innovatively enhanced autonomous services in ways not previously covered by the protocol's dev reward mechanism and the stack's component support of Protocols, Connections, Contracts and Skills types. A prime example of this was during the Prediction Agent Hackathon, where devs introduced new tools via Mechs and strategies via Traders to improve agents' functionality. Recognizing the importance of these contributions, Olas has now updated the Olas Stack to additionally reward developers for such custom contributions, which go beyond the constraints imposed by existing supported components. Specifically, a custom type package is now supported as a fifth component type.

Benefits for Olas Devs

This update significantly broadens the scope of rewarded contributions and makes it easier for those with even basic Python skills to participate. With many packages being simple Python scripts, developers at different skill levels can contribute. While the code may be simpler to write, its impact can be substantial, especially for services like Mechs  (Mechs is an autonomous service that maintains a diverse library of AI tools, accessible to other agents on a per-request basis). Indeed, devs who contributed tools to the Mech have already accrued rewards from donations that the service received in the last epoch. These tools include tools for AI interactions, predictive analytics, and more, showcasing the diverse applications of these new code contributions. Here is a pseudo code example of a mech tool. The script is designed for a predictive tool that leverages AI and Subject Matter Expert insights to make binary predictions based on user prompts and web-sourced information.

# Import necessary libraries
import json, requests, openai

# Define constants and default settings

# Define prompts for various tasks

# Function: Search Google and return URLs
def search_google(query, api_key, engine, num_results):

# Use Google API to perform a search and return a list of URLs
pass

# Function: Get URLs from search queries
def get_urls_from_queries(queries, api_key, engine):

# For each query, use search_google to get URLs and return a combined list
pass

# Function: Extract text from HTML content
def extract_text(html, word_limit):

# Extract and return the main text content from an HTML page
pass

# Function: Process a list of URLs in batches
def process_in_batches(urls, batch_size, timeout):

# Process each URL in the batch and handle timeouts or errors
 pass

# Function: Extract text content from a list of URLs
def extract_texts(urls, word_limit):

# Use extract_text on each URL to get their text contents
pass

# Function: Fetch additional information based on a user prompt
def fetch_additional_information(prompt, engine_settings, api_keys):

# Generate queries, get URLs, extract texts, and return combined information
pass

# Function: Determine the SME role based on a given prompt
def get_sme_role(engine, prompt):

# Use OpenAI API to determine and return the SME role and introduction
pass

# Function: Use all information and role to generate binary prediction on the query
def generate_binary_prediction ((prompt, additional_information, sme_role, sme_introduction, engine, settings)

# Main function: Run the prediction task
def run(tool, prompt, api_keys, settings):

# Check if tool is allowed and set up OpenAI engine
pass

# Fetch additional information from the web for online predictions
queries = create_search_queries(prompt)

urls = get_urls_from_queries(queries, api_keys['google_api_key'], api_keys['google_engine_id'])

web_contents = extract_texts(urls)

additional_information = combine_web_contents(web_contents)

# Determine the SME role and introduction

sme_role = get_sme_role(engine, settings['temperature'], settings['max_tokens'], prompt)

# Generate the binary prediction
prediction = generate_binary_prediction (prompt, additional_information, sme_role, sme_introduction, engine, settings)

    return prediction 

The first developers are already contributing

These are some of the tools that have been contributed so far: 

Kelly criterion strategy: A bet sizing strategy for Trader agents that uses the Kelly Criterion.


Optimization by prompting tool: A tool that implements the optimization by prompting methodology.


Sum URL tool: A tool for making binary predictions using the sum of the content of a URL article.


SME tools: Tools to establish Subject Matter Expert (SME) roles for specific market-related questions.


What's next

Custom type packages are not yet fully supported by the Olas Stack. Work to fully support them has been slated and is outlined here.

A Step Towards Enhanced Collaboration

By enabling the contribution of custom type packages, Olas is streamlining the process for developers to add value and receive rewards.

Developers are encouraged to explore this opportunity to contribute to Olas. By contributing their own custom type packages, specifically tools and strategies, they can impact the Mech and Trader agents' capabilities and benefit from the developer reward system.
Get started today by following along to the Olas Dev Academy sessions or digging deeper into the docs.