Skip to content

Commit fa6a03a

Browse files
authored
Merge pull request elizaOS#801 from monilpat/realitySpiral/coinbaseTesting
feat: coinbase webhook + add more examples + testing
2 parents 86d9d4e + 1c49989 commit fa6a03a

143 files changed

Lines changed: 1517 additions & 879 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.env.example

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,8 @@ COINBASE_PRIVATE_KEY= # from coinbase developer portal
142142
# if not configured it will be generated and written to runtime.character.settings.secrets.COINBASE_GENERATED_WALLET_ID and runtime.character.settings.secrets.COINBASE_GENERATED_WALLET_HEX_SEED
143143
COINBASE_GENERATED_WALLET_ID= # not your address but the wallet id from generating a wallet through the plugin
144144
COINBASE_GENERATED_WALLET_HEX_SEED= # not your address but the wallet hex seed from generating a wallet through the plugin and calling export
145-
145+
# for webhook plugin the uri you want to send the webhook to for dummy ones use https://webhook.site
146+
COINBASE_NOTIFICATION_URI=
146147
# Conflux Configuration
147148
CONFLUX_CORE_PRIVATE_KEY=
148149
CONFLUX_CORE_SPACE_RPC_URL=

agent/src/index.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ import {
3232
coinbaseMassPaymentsPlugin,
3333
tradePlugin,
3434
tokenContractPlugin,
35+
webhookPlugin,
3536
} from "@ai16z/plugin-coinbase";
3637
import { confluxPlugin } from "@ai16z/plugin-conflux";
3738
import { imageGenerationPlugin } from "@ai16z/plugin-image-generation";
@@ -393,6 +394,11 @@ export function createAgent(
393394
getSecret(character, "COINBASE_PRIVATE_KEY")
394395
? [coinbaseMassPaymentsPlugin, tradePlugin, tokenContractPlugin]
395396
: []),
397+
getSecret(character, "COINBASE_API_KEY") &&
398+
getSecret(character, "COINBASE_PRIVATE_KEY") &&
399+
getSecret(character, "COINBASE_NOTIFICATION_URI")
400+
? webhookPlugin
401+
: null,
396402
getSecret(character, "WALLET_SECRET_SALT") ? teePlugin : null,
397403
getSecret(character, "ALCHEMY_API_KEY") ? goatPlugin : null,
398404
getSecret(character, "APTOS_PRIVATE_KEY") ? aptosPlugin : null,

docs/api/classes/AgentRuntime.md

Lines changed: 41 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
[@ai16z/eliza v0.1.4-alpha.3](../index.md) / AgentRuntime
1+
[@ai16z/eliza v0.1.5-alpha.3](../index.md) / AgentRuntime
22

33
# Class: AgentRuntime
44

@@ -83,7 +83,7 @@ Custom fetch function to use for making requests.
8383

8484
#### Defined in
8585

86-
[packages/core/src/runtime.ts:208](https://github.com/ai16z/eliza/blob/main/packages/core/src/runtime.ts#L208)
86+
[packages/core/src/runtime.ts:208](https://github.com/monilpat/eliza/blob/main/packages/core/src/runtime.ts#L208)
8787

8888
## Properties
8989

@@ -99,7 +99,7 @@ The ID of the agent
9999

100100
#### Defined in
101101

102-
[packages/core/src/runtime.ts:63](https://github.com/ai16z/eliza/blob/main/packages/core/src/runtime.ts#L63)
102+
[packages/core/src/runtime.ts:63](https://github.com/monilpat/eliza/blob/main/packages/core/src/runtime.ts#L63)
103103

104104
***
105105

@@ -115,7 +115,7 @@ The base URL of the server where the agent's requests are processed.
115115

116116
#### Defined in
117117

118-
[packages/core/src/runtime.ts:67](https://github.com/ai16z/eliza/blob/main/packages/core/src/runtime.ts#L67)
118+
[packages/core/src/runtime.ts:67](https://github.com/monilpat/eliza/blob/main/packages/core/src/runtime.ts#L67)
119119

120120
***
121121

@@ -131,7 +131,7 @@ The database adapter used for interacting with the database.
131131

132132
#### Defined in
133133

134-
[packages/core/src/runtime.ts:72](https://github.com/ai16z/eliza/blob/main/packages/core/src/runtime.ts#L72)
134+
[packages/core/src/runtime.ts:72](https://github.com/monilpat/eliza/blob/main/packages/core/src/runtime.ts#L72)
135135

136136
***
137137

@@ -147,7 +147,7 @@ Authentication token used for securing requests.
147147

148148
#### Defined in
149149

150-
[packages/core/src/runtime.ts:77](https://github.com/ai16z/eliza/blob/main/packages/core/src/runtime.ts#L77)
150+
[packages/core/src/runtime.ts:77](https://github.com/monilpat/eliza/blob/main/packages/core/src/runtime.ts#L77)
151151

152152
***
153153

@@ -163,7 +163,7 @@ Custom actions that the agent can perform.
163163

164164
#### Defined in
165165

166-
[packages/core/src/runtime.ts:82](https://github.com/ai16z/eliza/blob/main/packages/core/src/runtime.ts#L82)
166+
[packages/core/src/runtime.ts:82](https://github.com/monilpat/eliza/blob/main/packages/core/src/runtime.ts#L82)
167167

168168
***
169169

@@ -179,7 +179,7 @@ Evaluators used to assess and guide the agent's responses.
179179

180180
#### Defined in
181181

182-
[packages/core/src/runtime.ts:87](https://github.com/ai16z/eliza/blob/main/packages/core/src/runtime.ts#L87)
182+
[packages/core/src/runtime.ts:87](https://github.com/monilpat/eliza/blob/main/packages/core/src/runtime.ts#L87)
183183

184184
***
185185

@@ -195,7 +195,7 @@ Context providers used to provide context for message generation.
195195

196196
#### Defined in
197197

198-
[packages/core/src/runtime.ts:92](https://github.com/ai16z/eliza/blob/main/packages/core/src/runtime.ts#L92)
198+
[packages/core/src/runtime.ts:92](https://github.com/monilpat/eliza/blob/main/packages/core/src/runtime.ts#L92)
199199

200200
***
201201

@@ -209,7 +209,7 @@ Context providers used to provide context for message generation.
209209

210210
#### Defined in
211211

212-
[packages/core/src/runtime.ts:94](https://github.com/ai16z/eliza/blob/main/packages/core/src/runtime.ts#L94)
212+
[packages/core/src/runtime.ts:94](https://github.com/monilpat/eliza/blob/main/packages/core/src/runtime.ts#L94)
213213

214214
***
215215

@@ -225,7 +225,7 @@ The model to use for generateText.
225225

226226
#### Defined in
227227

228-
[packages/core/src/runtime.ts:99](https://github.com/ai16z/eliza/blob/main/packages/core/src/runtime.ts#L99)
228+
[packages/core/src/runtime.ts:99](https://github.com/monilpat/eliza/blob/main/packages/core/src/runtime.ts#L99)
229229

230230
***
231231

@@ -241,7 +241,7 @@ The model to use for generateImage.
241241

242242
#### Defined in
243243

244-
[packages/core/src/runtime.ts:104](https://github.com/ai16z/eliza/blob/main/packages/core/src/runtime.ts#L104)
244+
[packages/core/src/runtime.ts:104](https://github.com/monilpat/eliza/blob/main/packages/core/src/runtime.ts#L104)
245245

246246
***
247247

@@ -276,7 +276,7 @@ Some environments may not have access to the global fetch function and need a cu
276276

277277
#### Defined in
278278

279-
[packages/core/src/runtime.ts:110](https://github.com/ai16z/eliza/blob/main/packages/core/src/runtime.ts#L110)
279+
[packages/core/src/runtime.ts:110](https://github.com/monilpat/eliza/blob/main/packages/core/src/runtime.ts#L110)
280280

281281
***
282282

@@ -292,7 +292,7 @@ The character to use for the agent
292292

293293
#### Defined in
294294

295-
[packages/core/src/runtime.ts:115](https://github.com/ai16z/eliza/blob/main/packages/core/src/runtime.ts#L115)
295+
[packages/core/src/runtime.ts:115](https://github.com/monilpat/eliza/blob/main/packages/core/src/runtime.ts#L115)
296296

297297
***
298298

@@ -308,7 +308,7 @@ Store messages that are sent and received by the agent.
308308

309309
#### Defined in
310310

311-
[packages/core/src/runtime.ts:120](https://github.com/ai16z/eliza/blob/main/packages/core/src/runtime.ts#L120)
311+
[packages/core/src/runtime.ts:120](https://github.com/monilpat/eliza/blob/main/packages/core/src/runtime.ts#L120)
312312

313313
***
314314

@@ -324,7 +324,7 @@ Store and recall descriptions of users based on conversations.
324324

325325
#### Defined in
326326

327-
[packages/core/src/runtime.ts:125](https://github.com/ai16z/eliza/blob/main/packages/core/src/runtime.ts#L125)
327+
[packages/core/src/runtime.ts:125](https://github.com/monilpat/eliza/blob/main/packages/core/src/runtime.ts#L125)
328328

329329
***
330330

@@ -340,7 +340,7 @@ Manage the creation and recall of static information (documents, historical game
340340

341341
#### Defined in
342342

343-
[packages/core/src/runtime.ts:130](https://github.com/ai16z/eliza/blob/main/packages/core/src/runtime.ts#L130)
343+
[packages/core/src/runtime.ts:130](https://github.com/monilpat/eliza/blob/main/packages/core/src/runtime.ts#L130)
344344

345345
***
346346

@@ -356,7 +356,7 @@ Hold large documents that can be referenced
356356

357357
#### Defined in
358358

359-
[packages/core/src/runtime.ts:135](https://github.com/ai16z/eliza/blob/main/packages/core/src/runtime.ts#L135)
359+
[packages/core/src/runtime.ts:135](https://github.com/monilpat/eliza/blob/main/packages/core/src/runtime.ts#L135)
360360

361361
***
362362

@@ -372,7 +372,7 @@ Searchable document fragments
372372

373373
#### Defined in
374374

375-
[packages/core/src/runtime.ts:140](https://github.com/ai16z/eliza/blob/main/packages/core/src/runtime.ts#L140)
375+
[packages/core/src/runtime.ts:140](https://github.com/monilpat/eliza/blob/main/packages/core/src/runtime.ts#L140)
376376

377377
***
378378

@@ -386,7 +386,7 @@ Searchable document fragments
386386

387387
#### Defined in
388388

389-
[packages/core/src/runtime.ts:142](https://github.com/ai16z/eliza/blob/main/packages/core/src/runtime.ts#L142)
389+
[packages/core/src/runtime.ts:142](https://github.com/monilpat/eliza/blob/main/packages/core/src/runtime.ts#L142)
390390

391391
***
392392

@@ -396,7 +396,7 @@ Searchable document fragments
396396
397397
#### Defined in
398398

399-
[packages/core/src/runtime.ts:143](https://github.com/ai16z/eliza/blob/main/packages/core/src/runtime.ts#L143)
399+
[packages/core/src/runtime.ts:143](https://github.com/monilpat/eliza/blob/main/packages/core/src/runtime.ts#L143)
400400

401401
***
402402

@@ -410,7 +410,7 @@ Searchable document fragments
410410

411411
#### Defined in
412412

413-
[packages/core/src/runtime.ts:144](https://github.com/ai16z/eliza/blob/main/packages/core/src/runtime.ts#L144)
413+
[packages/core/src/runtime.ts:144](https://github.com/monilpat/eliza/blob/main/packages/core/src/runtime.ts#L144)
414414

415415
## Methods
416416

@@ -432,7 +432,7 @@ Searchable document fragments
432432

433433
#### Defined in
434434

435-
[packages/core/src/runtime.ts:146](https://github.com/ai16z/eliza/blob/main/packages/core/src/runtime.ts#L146)
435+
[packages/core/src/runtime.ts:146](https://github.com/monilpat/eliza/blob/main/packages/core/src/runtime.ts#L146)
436436

437437
***
438438

@@ -454,7 +454,7 @@ Searchable document fragments
454454

455455
#### Defined in
456456

457-
[packages/core/src/runtime.ts:161](https://github.com/ai16z/eliza/blob/main/packages/core/src/runtime.ts#L161)
457+
[packages/core/src/runtime.ts:161](https://github.com/monilpat/eliza/blob/main/packages/core/src/runtime.ts#L161)
458458

459459
***
460460

@@ -480,7 +480,7 @@ Searchable document fragments
480480

481481
#### Defined in
482482

483-
[packages/core/src/runtime.ts:165](https://github.com/ai16z/eliza/blob/main/packages/core/src/runtime.ts#L165)
483+
[packages/core/src/runtime.ts:165](https://github.com/monilpat/eliza/blob/main/packages/core/src/runtime.ts#L165)
484484

485485
***
486486

@@ -502,7 +502,7 @@ Searchable document fragments
502502

503503
#### Defined in
504504

505-
[packages/core/src/runtime.ts:174](https://github.com/ai16z/eliza/blob/main/packages/core/src/runtime.ts#L174)
505+
[packages/core/src/runtime.ts:174](https://github.com/monilpat/eliza/blob/main/packages/core/src/runtime.ts#L174)
506506

507507
***
508508

@@ -520,7 +520,7 @@ Searchable document fragments
520520

521521
#### Defined in
522522

523-
[packages/core/src/runtime.ts:375](https://github.com/ai16z/eliza/blob/main/packages/core/src/runtime.ts#L375)
523+
[packages/core/src/runtime.ts:375](https://github.com/monilpat/eliza/blob/main/packages/core/src/runtime.ts#L375)
524524

525525
***
526526

@@ -542,7 +542,7 @@ Searchable document fragments
542542

543543
#### Defined in
544544

545-
[packages/core/src/runtime.ts:439](https://github.com/ai16z/eliza/blob/main/packages/core/src/runtime.ts#L439)
545+
[packages/core/src/runtime.ts:439](https://github.com/monilpat/eliza/blob/main/packages/core/src/runtime.ts#L439)
546546

547547
***
548548

@@ -564,7 +564,7 @@ The number of recent messages to be kept in memory.
564564

565565
#### Defined in
566566

567-
[packages/core/src/runtime.ts:461](https://github.com/ai16z/eliza/blob/main/packages/core/src/runtime.ts#L461)
567+
[packages/core/src/runtime.ts:461](https://github.com/monilpat/eliza/blob/main/packages/core/src/runtime.ts#L461)
568568

569569
***
570570

@@ -590,7 +590,7 @@ The action to register.
590590

591591
#### Defined in
592592

593-
[packages/core/src/runtime.ts:469](https://github.com/ai16z/eliza/blob/main/packages/core/src/runtime.ts#L469)
593+
[packages/core/src/runtime.ts:469](https://github.com/monilpat/eliza/blob/main/packages/core/src/runtime.ts#L469)
594594

595595
***
596596

@@ -612,7 +612,7 @@ The evaluator to register.
612612

613613
#### Defined in
614614

615-
[packages/core/src/runtime.ts:478](https://github.com/ai16z/eliza/blob/main/packages/core/src/runtime.ts#L478)
615+
[packages/core/src/runtime.ts:478](https://github.com/monilpat/eliza/blob/main/packages/core/src/runtime.ts#L478)
616616

617617
***
618618

@@ -634,7 +634,7 @@ The context provider to register.
634634

635635
#### Defined in
636636

637-
[packages/core/src/runtime.ts:486](https://github.com/ai16z/eliza/blob/main/packages/core/src/runtime.ts#L486)
637+
[packages/core/src/runtime.ts:486](https://github.com/monilpat/eliza/blob/main/packages/core/src/runtime.ts#L486)
638638

639639
***
640640

@@ -666,7 +666,7 @@ The message to process.
666666

667667
#### Defined in
668668

669-
[packages/core/src/runtime.ts:495](https://github.com/ai16z/eliza/blob/main/packages/core/src/runtime.ts#L495)
669+
[packages/core/src/runtime.ts:495](https://github.com/monilpat/eliza/blob/main/packages/core/src/runtime.ts#L495)
670670

671671
***
672672

@@ -702,7 +702,7 @@ The results of the evaluation.
702702

703703
#### Defined in
704704

705-
[packages/core/src/runtime.ts:572](https://github.com/ai16z/eliza/blob/main/packages/core/src/runtime.ts#L572)
705+
[packages/core/src/runtime.ts:572](https://github.com/monilpat/eliza/blob/main/packages/core/src/runtime.ts#L572)
706706

707707
***
708708

@@ -734,7 +734,7 @@ An error if the participant cannot be added.
734734

735735
#### Defined in
736736

737-
[packages/core/src/runtime.ts:642](https://github.com/ai16z/eliza/blob/main/packages/core/src/runtime.ts#L642)
737+
[packages/core/src/runtime.ts:642](https://github.com/monilpat/eliza/blob/main/packages/core/src/runtime.ts#L642)
738738

739739
***
740740

@@ -770,7 +770,7 @@ The user name to ensure the existence of.
770770

771771
#### Defined in
772772

773-
[packages/core/src/runtime.ts:658](https://github.com/ai16z/eliza/blob/main/packages/core/src/runtime.ts#L658)
773+
[packages/core/src/runtime.ts:658](https://github.com/monilpat/eliza/blob/main/packages/core/src/runtime.ts#L658)
774774

775775
***
776776

@@ -794,7 +794,7 @@ The user name to ensure the existence of.
794794

795795
#### Defined in
796796

797-
[packages/core/src/runtime.ts:678](https://github.com/ai16z/eliza/blob/main/packages/core/src/runtime.ts#L678)
797+
[packages/core/src/runtime.ts:678](https://github.com/monilpat/eliza/blob/main/packages/core/src/runtime.ts#L678)
798798

799799
***
800800

@@ -824,7 +824,7 @@ The user name to ensure the existence of.
824824

825825
#### Defined in
826826

827-
[packages/core/src/runtime.ts:695](https://github.com/ai16z/eliza/blob/main/packages/core/src/runtime.ts#L695)
827+
[packages/core/src/runtime.ts:695](https://github.com/monilpat/eliza/blob/main/packages/core/src/runtime.ts#L695)
828828

829829
***
830830

@@ -855,7 +855,7 @@ An error if the room cannot be created.
855855

856856
#### Defined in
857857

858-
[packages/core/src/runtime.ts:731](https://github.com/ai16z/eliza/blob/main/packages/core/src/runtime.ts#L731)
858+
[packages/core/src/runtime.ts:731](https://github.com/monilpat/eliza/blob/main/packages/core/src/runtime.ts#L731)
859859

860860
***
861861

@@ -885,7 +885,7 @@ The state of the agent.
885885

886886
#### Defined in
887887

888-
[packages/core/src/runtime.ts:744](https://github.com/ai16z/eliza/blob/main/packages/core/src/runtime.ts#L744)
888+
[packages/core/src/runtime.ts:744](https://github.com/monilpat/eliza/blob/main/packages/core/src/runtime.ts#L744)
889889

890890
***
891891

@@ -907,4 +907,4 @@ The state of the agent.
907907

908908
#### Defined in
909909

910-
[packages/core/src/runtime.ts:1190](https://github.com/ai16z/eliza/blob/main/packages/core/src/runtime.ts#L1190)
910+
[packages/core/src/runtime.ts:1190](https://github.com/monilpat/eliza/blob/main/packages/core/src/runtime.ts#L1190)

0 commit comments

Comments
 (0)