Git Product home page Git Product logo

myuz's Introduction

myuz

Phusis Logo

Intro

The core belief driving the Myuz platform is that the most effective AI applications arise from the collaboration between domain experts and AI systems. As demonstrated in the field of text-to-image AI generators, top-performing results are most often achieved when expert photographers work closely with AI technologies. By offering a platform for users with niche knowledge to develop custom AI-powered projects, Myuz seeks to give thinkers and creators from any field a simplified path to levaraging AI for their projects.

Myuz is a play on the word "muse" that we like to bakronym to "My Unleashed Zeal." We're hoping this name reflects the platform's goal of giving creators and thinkers extra resources to indulge their passions. For all the millions of people that lack the time it would take to devote themselves to a project close to their hearts, myuz unleash their zeal.

myuz's current state

Back end

There are currently two componenets to the myuz project, phusis and noveller:

phusis: A Django app that serves as a platform for developing AI assited project structures. It provides abstract classes and engines for AI agents and AI developed/assisted projects to be used in various applications.

noveller: An example implementation of the Phusis platform, specifically tailored for literary projects. It includes concrete classes derived from the Phusis abstract agent, such as CharacterAgents, WorldBuildingAgents, and ConflictAndResolutionAgents. Noveller implements 'Book' as the concreate of the AbstractPhusisProject class and defines concrete classes for the attributes of literary projects like Chapter, Plot, Scene, and LiteraryStyle, derived from the abstract PhusisProjectAttribute class. It also establish a number of AI agent types for the swarm that is directed at the project, such as the CharacterAgent and LiteraryStyleAgent.

By offering such a customizable and adaptable platform, myuz empowers users with niche expertise to develop AI-powered applications tailored to their specific requirements. By combining their domain knowledge with the power of AI, users can create mental maps of their projects and deploy arrays of agents designed to work together, ultimately producing superior outcomes compared to existing multi-agent systems.

NOTE: In it's current incarnation, developing your own phusis project implementation requires an understanding of some of the principles of Object Oriented Programming and an ability to code in Python. While the noveller example should provide most people a good jumping off point for their own projects, we're hoping to make this more accessible in the future.

There are also undeveloped 'stubs' for future implementations of the phusis platform:

  • harmonia
    • A GPT powered 'third' or additional partner that can help a relationship grow in understanding and harmony. The harmonia partner will offer insights into what the other in their relationship might be thinking and feeling, what they want to tell you but find it hard to put the words together, how to help them be happy, how to understand them better and to mediate difficult moments. I think this could be especially useful for people with communication difficulties such as autism (like myself), as Harmonia can take what each user contributes confidentially in their chat 'sessions' and use that knowledge to help with communicative intimacy and understanding.
  • groceryogi
    • Our grocery shopping costs have doubled in the past 2 years, and now that I'm looking for work I'm paying a lot more attention to in-store deals and all those coupon mailers that come in. But there are so many of them, and I'm never really sure if I'm actually getting good value. My groceryogi will help stretch those dollars by consolidating information from various sources, including online deals and mailers from your local stores, to create the best value grocery store run for your requirements.
  • bacchanalia
    • Another swarm of agents with specific goals, roles and abilities for help researching, brainstorming, planning, budgeting and putting together different kinds of events (birthdays, concerts, dinner parties)

Front end

I am currently levaraging Django's UI tools to create a prototype, but I am planning to move to a React front end in the near future. Hoping to work towards a common UI language for phusis projects that could be customized to its various implementations. Would be very interested in collaborating with a front end developer on this project.

Setup

Requirements

This project was built with:

You will also need:

Setup instructions

The following instructions were put together and tested with WSL: Ubuntu on Windows 10 - setup may be different on your own machine

# add your secrets to the secrets folder
touch .secrets/openai_api_key
touch .secrets/pinecone_api_key
touch .secrets/pinecone_api_region # this looks something like 'asia-southeast1-gcp' and can be found alongside your API key in the pinecone console

# set up your virtual environment
python3 -m venv venv
. venv/bin/activate
pip install -r requirements.txt

# install postgres and follow installation and setup instructions for your system
# https://www.postgresqltutorial.com/postgresql-getting-started/
# remember the password you set for the postgres user, we're going to use it later

# add these lines to your ~/.bashrc or ~/.bash_profile
export POSTGRES_PW=''   #the password you set for the postgres user
export MYUZ_DB_PW=''    #the password you want to set for the myuz db user
export MYUZ_DB_USER=''  #the user you want to set for the myuz db user

#depending on whether you added the above...
. ~/.bashrc
. ~/.bash_profile

# This will start the postgres server if it's not already running
# create the myuz database, create and run the migrations for the noveller and phusis apps,
# init the db with data for agents and an example novel,
# and create the pinecone index for the pinecone key
./blank_slate all

#If you just want to restart the server if it's not running on system restart
sudo service postgresql start
sudo service postgresql status

# run the server
python3 manage.py runserver

Creating your own phusis project definitions

myuz (the django project) will be the site of multiple project types that will utilize the phusis platform.

This repo provides a novel writing project type, 'noveller', as an example. However, there are opportunities to use the phusis platform for many other types of projects (research papers, DnD campaigns, business plans, event management, etc.).

phusis (the platform) and noveller (the application) are each apps within the myuz project. But you can create your own apps to implement your own project types.

Check out the AbstractPhusisProject model and related models in phusis/agent_models.py for the abstracts available to create new project types.

Then check out the implementation of those abstracts in the noveller app in noveller/noveller_models.py and noveller/noveller_agents.py.

To create your own implementation of the phusis platform, create a new django app within the myuz django project. For guidance you can read the Django project/app tutorial here - there is also a quick-start guide specific to phusis below.

Creating your own phusis agent definitions

For now, my own agent recipes are remaining private, but here is a guide on creating your own.

Take a look at the AbstractAgent model in phusis/agent_models.py for available attributes for defining your agents. Example concretes of this abstract can be found in noveller/noveller_agents.py

Say you are creating a phusis application 'shopper.' You will need to create a JSON representation of your agent and save it in the agent_data directory shopper/phusis-secret-sauce/agent_data

You can even create a number of agents as an array in one json file. I like to keep agent 'types' in separate files, but you can do it however you like.

[
    {
        "class_name": "ResearchAgent",
        "properties":{
            "name": "Historical Fiction Investigator",
            "elaboration": "This agent is skilled at unearthing historical facts and details, providing rich context for crafting immersive historical fiction.",
            "impersonations": ["Hilary Mantel", "Bernard Cornwell", "Ken Follett"],
            "personality_traits": ["Detail-oriented", "Persistent", "Curious"],
            "goals": ["Uncover historical facts", "Provide context", "Enhance authenticity"],
            "roles": ["Historical researcher", "Fact-checker", "Context provider"],
            "qualifications": ["History expert", "Primary source analyst", "Fact verifier"]
        } 
    },
    {
        "class_name": "ResearchAgent",
        "properties":{
            "name": "Science Consultant",
            "elaboration": "Adept at researching scientific concepts and breakthroughs, this agent provides accurate and engaging scientific context for your story.",
            "impersonations": ["Carl Sagan", "Neil deGrasse Tyson", "Brian Greene"],
            "personality_traits": ["Analytical", "Inquisitive", "Rational"],
            "goals": ["Research scientific concepts", "Clarify complex ideas", "Ensure accuracy"],
            "roles": ["Scientific researcher", "Expert consultant", "Idea simplifier"],
            "qualifications": ["Science expert", "Clear communicator", "Fact verifier"]
        }
    },
    {
        "class_name": "ResearchAgent",
        "properties":{
            "name": "Cultural Anthropologist",
            "elaboration": "Proficient in studying and analyzing cultural practices and customs, this agent provides deep insights into diverse societies for your narrative.",
            "impersonations": ["Margaret Mead", "Claude Lévi-Strauss", "Zora Neale Hurston"],
            "personality_traits": ["Empathetic", "Observant", "Open-minded"],
            "goals": ["Study cultural practices", "Analyze customs", "Provide societal insights"],
            "roles": ["Cultural researcher", "Society analyst", "Tradition explorer"],
            "qualifications": ["Anthropology expert", "Cross-cultural communicator", "Ethnographer"]
        }
    }
]

Then when you have your agent data ready, you can run the following command to create your agents in the database:

app='shopper'
python manage.py init_agents ${app}

Quick guide to creating your own phusis implementation

The name of the example implementation here is 'shopper'

  1. Make sure you have django installed
    • python -m django --version
  2. Create a new django app within the myuz project
    • python manage.py startapp shopper
  3. Write your first view - shopper/views.py
    • from django.http import HttpResponse
      
      def index(request):
      return HttpResponse("Hello, world. You're at the shoppper index.")
  4. Wire up your new view - shopper/urls.py
    • from django.urls import path
      from . import views
      
      urlpatterns = [
          path('', views.index, name='index'),
      ]
  5. Add your new app to the myuz project - myuz/settings.py
    • INSTALLED_APPS = [
          'shopper.apps.ShopperConfig',
          'noveller.apps.NovellerConfig',
          'phusis.apps.PhusisConfig',
          ...
      ]
  6. Make the shopper app modificalbe in the admin view - shopper/admin.py
    • from django.contrib import admin
      from django.db import models
      
      for model in dir():
          try:
              if issubclass(eval(model), models.Model):
                  admin.site.register(eval(model))
          except:
              pass
  7. Based on what you believe is required for an agent swarm to complete the project of your choosing, create your agent, project and project atributte class definitions in shoppper/ (noveller's implementation is a good example)
    • (Optional) Create your own pre-defined agents in JSON format to preload into your app. Store them in
      • shopper/phusis-projects/shopper/init_agents/
    • (Optional) Create your own pre-defined project in JSON format to preload into your app. Store them in
      • shopper/phusis-projects/shopper/projects/${project_name}/init_project/
  8. Run the following commands to create the tables for your custom implementations in the database:
    • python manage.py makemigrations shopper --empty
      python manage.py makemigrations phusis --empty
      python manage.py makemigrations phusis
      python manage.py makemigrations shopper
      python manage.py migrate 
      
      #and if you created JSON data for agents and project
      python manage.py init_agents shopper
      python manage.py init_project shopper
  9. Run the server:
    • python manage.py runserver
    • then navigate to localhost:8000/admin to see your new app in the admin view
    • and localhost:8000/shopper to see shopper's html hello world

myuz's People

Contributors

gitwithsean avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.