@elizaos/plugin-action-bench 1.4.2 → 1.4.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,6 +1,8 @@
1
1
  # plugin-action-bench
2
2
 
3
- Action calling benchmark plugins for ElizaOS v2, featuring multiverse mathematics where operations behave differently based on dimensional constants. Designed to test AI agents' ability to handle context-dependent mathematics, unknown operational behaviors, and complex state management across dimensional boundaries.
3
+ Action calling benchmark plugins for ElizaOS v2, featuring typewriter actions, multiverse mathematics with dimensional constants, and relational data management. Designed to test AI agents' ability to handle action chaining, context-dependent operations, and complex entity-relationship graphs.
4
+
5
+ > **🎛️ Environment Control**: Use `TYPEWRITER_ENABLED=false`, `MULTIVERSE_MATH_ENABLED=false`, or `RELATIONAL_DATA_ENABLED=false` to selectively disable benchmark sets. See [Environment Variable Configuration](#environment-variable-configuration) for details.
4
6
 
5
7
  ## Features
6
8
 
@@ -71,16 +73,50 @@ Square root variations:
71
73
  - **MATH_CLEAR**: Reset all buffers
72
74
  - **TRANSFER_TO_INPUT**: Move accumulator to input buffer
73
75
 
76
+ ### 🔗 Relational Data Operations
77
+ Entity-relationship graph management for testing complex data operations:
78
+
79
+ #### Entity Management
80
+ - **CREATE_ENTITY**: Create entities with types (person, company, product, etc.)
81
+ - **SELECT_ENTITY**: Select an entity as the current focus
82
+ - **DELETE_ENTITY**: Delete entity and all its relationships
83
+ - **SET_ATTRIBUTE**: Add/update attributes on entities
84
+
85
+ #### Relationship Management
86
+ - **CREATE_RELATIONSHIP**: Link entities with typed relationships
87
+ - Types: parent_child, sibling, friend, employment, ownership, management, partnership, membership, location, assignment
88
+
89
+ #### Query Operations
90
+ - **QUERY_ENTITIES**: Find entities by type or attribute values
91
+ - **QUERY_RELATIONSHIPS**: Find relationships by type or entity
92
+ - **FIND_PATH**: Find shortest path between two entities
93
+ - **COUNT_STATISTICS**: Get graph statistics (entity/relationship counts)
94
+
95
+ #### Utility Operations
96
+ - **CLEAR_GRAPH**: Reset the entire entity-relationship graph
97
+
74
98
  ## State Management
75
99
 
76
100
  The plugin maintains a sophisticated state system:
101
+
102
+ ### Typewriter State
103
+ - **typedText**: Accumulation buffer for typed characters
104
+
105
+ ### Multiverse Math State
77
106
  - **accumulator**: Main calculation result storage
78
107
  - **inputBuffer**: Temporary number input storage
79
108
  - **memory**: Persistent value storage
80
- - **history**: Operation history tracking with explanations
81
- - **typedText**: Typewriter accumulation buffer
82
109
  - **dimension**: Current dimensional constant affecting operations
83
- - **lastOperation**: Track the most recent operation performed
110
+ - **history**: Operation history tracking with explanations
111
+
112
+ ### Relational Data State
113
+ - **entities**: Collection of created entities with attributes
114
+ - **relationships**: Collection of relationships between entities
115
+ - **currentEntity**: Currently selected entity for operations
116
+ - **queryResults**: Results from recent queries
117
+
118
+ ### Global State
119
+ - **lastOperation**: Track the most recent operation performed across all benchmarks
84
120
 
85
121
  ## Usage
86
122
 
@@ -94,6 +130,106 @@ const agent = createAgent({
94
130
  });
95
131
  ```
96
132
 
133
+ ### Checking Configuration
134
+
135
+ You can verify which benchmarks are loaded programmatically:
136
+
137
+ ```typescript
138
+ import { benchmarkConfig } from "@elizaos/plugin-action-bench";
139
+
140
+ console.log("Benchmark configuration:", benchmarkConfig);
141
+ // Output:
142
+ // {
143
+ // typewriterEnabled: true,
144
+ // multiverseMathEnabled: true,
145
+ // relationalDataEnabled: true,
146
+ // totalActionsLoaded: 58
147
+ // }
148
+ ```
149
+
150
+ ## Environment Variable Configuration
151
+
152
+ The plugin supports granular control over which benchmark actions are loaded through environment variables. This is useful for testing specific features or reducing the action space when not benchmarking.
153
+
154
+ ### Available Environment Variables
155
+
156
+ | Variable | Default | Description |
157
+ |----------|---------|-------------|
158
+ | `TYPEWRITER_ENABLED` | `true` | Controls loading of typewriter actions (A-Z) |
159
+ | `MULTIVERSE_MATH_ENABLED` | `true` | Controls loading of multiverse math operations |
160
+ | `RELATIONAL_DATA_ENABLED` | `true` | Controls loading of relational data operations |
161
+
162
+ ### Examples
163
+
164
+ ```bash
165
+ # Load all benchmarks (default)
166
+ npm start
167
+
168
+ # Only load typewriter actions
169
+ MULTIVERSE_MATH_ENABLED=false RELATIONAL_DATA_ENABLED=false npm start
170
+
171
+ # Only load multiverse math actions
172
+ TYPEWRITER_ENABLED=false RELATIONAL_DATA_ENABLED=false npm start
173
+
174
+ # Only load relational data actions
175
+ TYPEWRITER_ENABLED=false MULTIVERSE_MATH_ENABLED=false npm start
176
+
177
+ # Disable all benchmarks (useful for production)
178
+ TYPEWRITER_ENABLED=false MULTIVERSE_MATH_ENABLED=false RELATIONAL_DATA_ENABLED=false npm start
179
+ ```
180
+
181
+ ### .env File Configuration
182
+
183
+ You can also configure these in your `.env` file:
184
+
185
+ ```env
186
+ # Enable/disable specific benchmarks
187
+ TYPEWRITER_ENABLED=true
188
+ MULTIVERSE_MATH_ENABLED=true
189
+ RELATIONAL_DATA_ENABLED=true
190
+
191
+ # Example: Only enable typewriter for focused testing
192
+ # TYPEWRITER_ENABLED=true
193
+ # MULTIVERSE_MATH_ENABLED=false
194
+ # RELATIONAL_DATA_ENABLED=false
195
+ ```
196
+
197
+ ### Runtime Feedback
198
+
199
+ The plugin provides console output to confirm which benchmarks are loaded:
200
+
201
+ ```
202
+ [plugin-action-bench] Typewriter actions enabled
203
+ [plugin-action-bench] Multiverse math actions enabled
204
+ [plugin-action-bench] Relational data actions enabled
205
+ [plugin-action-bench] Total actions loaded: 58
206
+ ```
207
+
208
+ Or when disabled:
209
+
210
+ ```
211
+ [plugin-action-bench] Typewriter actions disabled via TYPEWRITER_ENABLED=false
212
+ [plugin-action-bench] Multiverse math actions enabled
213
+ [plugin-action-bench] Relational data actions enabled
214
+ [plugin-action-bench] Total actions loaded: 32
215
+ ```
216
+
217
+ ### Why Use Environment Variables?
218
+
219
+ The environment variable system provides several benefits:
220
+
221
+ 1. **Reduce Action Space**: In production, disable benchmarks to reduce the number of actions the AI needs to consider
222
+ 2. **Focused Testing**: Enable only specific benchmarks when testing particular capabilities
223
+ 3. **Performance**: Fewer loaded actions means faster action selection and reduced memory usage
224
+ 4. **Debugging**: Isolate specific action sets to debug issues
225
+ 5. **A/B Testing**: Compare agent performance with different action sets enabled
226
+
227
+ Example scenarios:
228
+ - **Development**: Enable all benchmarks to test full capabilities
229
+ - **Production**: Disable all benchmarks to focus on real actions
230
+ - **Typewriter Testing**: Enable only typewriter to test rapid action chaining
231
+ - **Math Testing**: Enable only multiverse math to test context-dependent operations
232
+
97
233
  ## Benchmarking Examples
98
234
 
99
235
  ### Typewriter Test
@@ -143,6 +279,30 @@ Agent: Must understand to set chaos dimension and apply MULTIVERSE_ADD
143
279
  Result: Deterministic chaos factor added based on seed generation
144
280
  ```
145
281
 
282
+ ### Relational Data Test
283
+ Test entity and relationship management:
284
+ ```
285
+ User: "Create person named Alice, create company named TechCorp, create employment relationship"
286
+ Agent: Uses CREATE_ENTITY, CREATE_ENTITY, CREATE_RELATIONSHIP
287
+ Result: Graph with Alice → (employment) → TechCorp
288
+ ```
289
+
290
+ ### Complex Graph Query Test
291
+ Test graph traversal and querying:
292
+ ```
293
+ User: "Create entities Bob and Carol, make them siblings, find path between them"
294
+ Agent: Creates entities, establishes sibling relationship, finds connection path
295
+ Result: Bob → (sibling) → Carol
296
+ ```
297
+
298
+ ### Attribute Management Test
299
+ Test entity attribute handling:
300
+ ```
301
+ User: "Create person John, set age 30, set role manager, query person entities"
302
+ Agent: Uses CREATE_ENTITY, SET_ATTRIBUTE (×2), QUERY_ENTITIES
303
+ Result: John with {age: 30, role: "manager"}
304
+ ```
305
+
146
306
  ## Development
147
307
 
148
308
  This plugin is part of the ElizaOS ecosystem and follows the standard plugin architecture.