Skip to content
    Back to all Bounties

    Earn 117,000 ($1,170.00)

    Time Remainingdue 1 year ago
    Canceled

    Pokemon for Markets 🐱 Integrate Python Mesa with pre-built LangChain agents and Deploy

    ZachWaugaman
    ZachWaugaman
    Posted 2 years ago

    Bounty Description

    Problem Description

    Mark Twain once said: “History doesn't repeat itself, but it does rhyme.” Let's make some poetry!

    I'm looking for someone interested in agent based simulation to integrate Python Mesa with LangChain agents! Details here: Now that LLMs can mirror individual interactions well, I'm interested in finding out if they can mirror multi-agent systems. Using Python Mesa, set up a simulation and visualization with LangChain agents that are already built. I've been developing LangChain applications for a few months now, and am starting to look at multi-agent simulations. To start, I would like to integrate my LangChain agents with Python's Mesa library for agent based simulation. LangChain agents use OpenAI completions model (or any other LLM) to interact with the world through tools, memory, and personas. Mesa is an agent based simulation framework in Python.

    My idea is to create simulations with LLM-based interactions. My first idea is a stock market game, where agents decide to buy or sell every state based on a LangChain LLM persona ("always be in the top 20% of returns every year but don't try to be an outlier", "you are a cautious trader", "you have a background in credit risk", etc). The market data could be fed from real equities data and loaded into the memory of the LangChain agent. I'm interested in visualizing how these agents interact and how their personas perform relative to certain KPIs ("total profits at the end of the game" etc).

    Sample Architecture

    langsim architecture

    Acceptance Criteria

    To be considered, your application must be a finished project and include a link to a Repl or Github repository.

    Your project will be evaluated on the following criteria:

    • The simulation should work. LangChain agents should be called every state of the Python Mesa simulation and interact with the test simulation. The LangChain agents will be provided to you.
    • The end user experience should be simple and approachable. The goal is to allow users to configure the simulation inputs, set up personas, and measure performance of the simulation during states and at the final state.
    • Open source. I'd love to share the work here with the community that made this possible.
    • Creative and innovative solution. Think big. Image a market simulation with multiple assets + float tracking + LLM options market ontop of it + volatility surface, a social network simulation based on personas created by semantic search of messaging history, or a natural simulation of cells protein folding in a way that's easy to stand up, user friendly, and incorporates natural language programming through the use of LLMs.

    Experience with Python and deploying to your preferred platform quickly (Vercel, AWS, Azure, etc). Familiarity with Mesa or any other agent based simulation library for Python are a plus, but I'm also happy to learn Mesa with you.

    Sample Ideas

    • See if we can recreate the 1987 emergence of the volatility smile with LangChain agents! https://gamesofchance.substack.com/p/how-black-scholes-precipitated-the
    • Create a social network simulation using agents with personas and memory derived from MapReduce of social profiles
    • Cellular simulation with protein folding and other interactions governed by LangChain agents
    • Speedrunners could compete to see who's persona is best against a market (and try out different markets!).
    • Or A/B testing personas and LLMs to answer questions like: is risky or conservative better with this particular LLM?

    My Background

    I'm really having a great time building apps with LangChain. I have built a two Python apps now with LangChain/OpenAI integrations, one of which has done 40+ million tokens in throughput already. I can help with any area as needed.

    Initial Pipeline and Simulation Steps

    Figma: https://www.figma.com/file/uJ3YSr6qcOosrb5jJaYzKh/Python-Mesa-%2F-LangChain-Demo?node-id=0%3A1&t=SkiBvFAq9Bi6l9aY-1
    Agents Example: CatGPT, your feline chatbot. http://www.wrotescan.com/CatGPT / https://github.com/zwaugaman/lang-sim/blob/main/CatGPT.py
    Visualizations should address these steps: https://www.blackrock.com/corporate/insights/blackrock-investment-institute/interactive-charts/market-risk-monitor

    Future States

    Copyright © 2024 Replit, Inc. All rights reserved.
    • twitter
    • tiktok
    • instagram
    • facebook

    Replit

    Programming languages

    • Python
    • JavaScript
    • TypeScript
    • Node.js
    • Nix
    • HTML, CSS, JS
    • C++
    • Golang