Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: coinbase webhook + add more examples + testing #801

Merged
merged 11 commits into from
Dec 6, 2024
Merged
3 changes: 2 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,8 @@ COINBASE_PRIVATE_KEY= # from coinbase developer portal
# 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
COINBASE_GENERATED_WALLET_ID= # not your address but the wallet id from generating a wallet through the plugin
COINBASE_GENERATED_WALLET_HEX_SEED= # not your address but the wallet hex seed from generating a wallet through the plugin and calling export

# for webhook plugin the uri you want to send the webhook to for dummy ones use https://webhook.site
COINBASE_NOTIFICATION_URI=
# Conflux Configuration
CONFLUX_CORE_PRIVATE_KEY=
CONFLUX_CORE_SPACE_RPC_URL=
Expand Down
6 changes: 6 additions & 0 deletions agent/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import {
coinbaseMassPaymentsPlugin,
tradePlugin,
tokenContractPlugin,
webhookPlugin,
} from "@ai16z/plugin-coinbase";
import { confluxPlugin } from "@ai16z/plugin-conflux";
import { imageGenerationPlugin } from "@ai16z/plugin-image-generation";
Expand Down Expand Up @@ -393,6 +394,11 @@ export function createAgent(
getSecret(character, "COINBASE_PRIVATE_KEY")
? [coinbaseMassPaymentsPlugin, tradePlugin, tokenContractPlugin]
: []),
getSecret(character, "COINBASE_API_KEY") &&
getSecret(character, "COINBASE_PRIVATE_KEY") &&
getSecret(character, "COINBASE_NOTIFICATION_URI")
? webhookPlugin
: null,
getSecret(character, "WALLET_SECRET_SALT") ? teePlugin : null,
getSecret(character, "ALCHEMY_API_KEY") ? goatPlugin : null,
getSecret(character, "APTOS_PRIVATE_KEY") ? aptosPlugin : null,
Expand Down
82 changes: 41 additions & 41 deletions docs/api/classes/AgentRuntime.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[@ai16z/eliza v0.1.4-alpha.3](../index.md) / AgentRuntime
[@ai16z/eliza v0.1.5-alpha.3](../index.md) / AgentRuntime

# Class: AgentRuntime

Expand Down Expand Up @@ -83,7 +83,7 @@ Custom fetch function to use for making requests.

#### Defined in

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

## Properties

Expand All @@ -99,7 +99,7 @@ The ID of the agent

#### Defined in

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

***

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

#### Defined in

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

***

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

#### Defined in

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

***

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

#### Defined in

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

***

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

#### Defined in

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

***

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

#### Defined in

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

***

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

#### Defined in

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

***

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

#### Defined in

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

***

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

#### Defined in

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

***

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

#### Defined in

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

***

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

#### Defined in

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

***

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

#### Defined in

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

***

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

#### Defined in

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

***

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

#### Defined in

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

***

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

#### Defined in

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

***

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

#### Defined in

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

***

Expand All @@ -372,7 +372,7 @@ Searchable document fragments

#### Defined in

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

***

Expand All @@ -386,7 +386,7 @@ Searchable document fragments

#### Defined in

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

***

Expand All @@ -396,7 +396,7 @@ Searchable document fragments

#### Defined in

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

***

Expand All @@ -410,7 +410,7 @@ Searchable document fragments

#### Defined in

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

## Methods

Expand All @@ -432,7 +432,7 @@ Searchable document fragments

#### Defined in

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

***

Expand All @@ -454,7 +454,7 @@ Searchable document fragments

#### Defined in

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

***

Expand All @@ -480,7 +480,7 @@ Searchable document fragments

#### Defined in

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

***

Expand All @@ -502,7 +502,7 @@ Searchable document fragments

#### Defined in

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

***

Expand All @@ -520,7 +520,7 @@ Searchable document fragments

#### Defined in

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

***

Expand All @@ -542,7 +542,7 @@ Searchable document fragments

#### Defined in

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

***

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

#### Defined in

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

***

Expand All @@ -590,7 +590,7 @@ The action to register.

#### Defined in

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

***

Expand All @@ -612,7 +612,7 @@ The evaluator to register.

#### Defined in

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

***

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

#### Defined in

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

***

Expand Down Expand Up @@ -666,7 +666,7 @@ The message to process.

#### Defined in

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

***

Expand Down Expand Up @@ -702,7 +702,7 @@ The results of the evaluation.

#### Defined in

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

***

Expand Down Expand Up @@ -734,7 +734,7 @@ An error if the participant cannot be added.

#### Defined in

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

***

Expand Down Expand Up @@ -770,7 +770,7 @@ The user name to ensure the existence of.

#### Defined in

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

***

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

#### Defined in

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

***

Expand Down Expand Up @@ -824,7 +824,7 @@ The user name to ensure the existence of.

#### Defined in

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

***

Expand Down Expand Up @@ -855,7 +855,7 @@ An error if the room cannot be created.

#### Defined in

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

***

Expand Down Expand Up @@ -885,7 +885,7 @@ The state of the agent.

#### Defined in

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

***

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

#### Defined in

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