Skip to content

Oneirocom/pantheon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pantheon - Grimoire World Simulator

Introduction

Here is an example World Simulator for Grimoire apps.

It exists as a colyseus server, and a Grimoire/Nova/Nitro module: pantheon-connector that provides core/runtime functionality for the agent.

I like Colyseus but it's not a requirement. The main concept I wanted to demonstrate here is that we can have a module that lets agent's connect/interact with the simulation while also providing the extra features/abstractions that make the development feel like a framework and not just a library.

Installation

# Install
pnpm install

# Build
pnpm -r build

# Start the server
pnpm --filter pantheon start

# Start the 'playground' agent with the @magickml/pantheon-connector module
pnpm --filter playground dev

End User Features

defineRoom

import { defineRoom } from "@magickml/pantheon-connector/runtime/utils";

export default defineRoom({
  name: "agent_world",
  autoJoin: true,
  onStateChange: (state) => {
    console.log("State changed:", state);
  },
  onMessage: (message) => {
    console.log("Message received:", message);
  },
});

defineAction

import { defineAction } from "@magickml/pantheon-connector/runtime/utils";

export default defineAction({
  type: "move",
  handler: async (room, data) => {
    console.log(`Moving in room ${room.name} with data:`, data);
    room.send("move", data);
  },
});

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published