|
| 1 | +# Eternum Plugin |
| 2 | + |
| 3 | +## Overview |
| 4 | + |
| 5 | +The idea here is that we provide the agent with context about the game: |
| 6 | + |
| 7 | +1. Decide Task |
| 8 | +2. Decide Action |
| 9 | +3. Execute Action |
| 10 | + |
| 11 | +### Runtime |
| 12 | + |
| 13 | +Each of these steps could themselves be a few steps, this is very rough. |
| 14 | + |
| 15 | +Look at [eternum/src/provider/index.ts](./eternum/src/provider/index.ts) for rough example of how the messages could |
| 16 | +work. |
| 17 | + |
| 18 | +_Query 1:_ |
| 19 | + |
| 20 | +1. Look at goal, state of realm. So resource balances, buildings etc (this is fetched from a DB right?) |
| 21 | +2. Decide what information is needed for the context. (this is done by an LLM?) Create a graphql query for it, and fetch the information. Keep in |
| 22 | + context. |
| 23 | +3. Decide if you want to take an action or not. (we have a list of actions defined in the same way as eliza?) |
| 24 | + |
| 25 | + - If not, return and ask question again in 1 minute |
| 26 | + - If yes, continue to Query 2 |
| 27 | + |
| 28 | +_Query 2:_ |
| 29 | + |
| 30 | +1. Pass context from Query 1 into another lookup to find how to take that action. |
| 31 | +2. consume the cache of available actions |
| 32 | + (wouldn't this be redundant if we have actions defined in the Eliza way?) |
| 33 | + |
| 34 | +_Execute 3:_ |
| 35 | + |
| 36 | +1. Take an action or not. |
| 37 | + |
| 38 | +if success -> save memory |
| 39 | + |
| 40 | +Repeat |
| 41 | + |
| 42 | +### TODO: |
| 43 | + |
| 44 | +1. Create file will all available actions formatted calldata. Don't we already have that in the EternumProvider? Or do |
| 45 | + you mean Eliza actions? |
| 46 | + |
| 47 | +- Add TypeDoc to all the Providers. In the example of the typedoc include formatted call data. |
| 48 | +- Write a script to extract only the typedoc information and save it to a file. This is what we will cache in the db. We |
| 49 | + need to be able to run this again so making a helper function is the key |
| 50 | + |
| 51 | +2. Get all graphql models in a cache somehow. The entire generated files are too big. We need to compress the |
| 52 | + information of the available queries just enough that the model will still understand it. |
| 53 | + |
| 54 | +3. Write Action that runs like the above. We just want everything encapsulated within that one ACTION for gameplay. |
0 commit comments