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: Primus zkTLS plugin to fully verify agent activities #2086

Merged
merged 28 commits into from
Jan 11, 2025
Merged
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
3b16a4c
add primus plugin
WuEcho Jan 6, 2025
b6eae8d
update primus zktls core sdk invoke
fksyuan Jan 6, 2025
de6b982
fix model name bug and update primus attestation decode
fksyuan Jan 6, 2025
1a098b4
Proof provider and action for twitter-plugin
xudean Jan 7, 2025
b750bfb
update readme log
fksyuan Jan 7, 2025
d8df612
update README in plugin-twitter-primus
xudean Jan 7, 2025
e00f5ea
Merge remote-tracking branch 'origin/develop' into develop
xudean Jan 7, 2025
adb2374
Merge remote-tracking branch 'upstream/develop' into develop
xudean Jan 8, 2025
e2e9063
update npm package 'zktls-core-sdk'
xudean Jan 8, 2025
0563ed5
update README in plugin-primus and plugin-twitter-plugin
xudean Jan 8, 2025
e33cead
get tweet by UserScreenName
xudean Jan 9, 2025
02ef838
refactor plugin-primus
xudean Jan 9, 2025
8266043
refine readme in plugin-primus
xiangxiecrypto Jan 9, 2025
d05c974
fix format
xiangxiecrypto Jan 9, 2025
d8d3ce7
update readme in plugin-primus
xudean Jan 9, 2025
adfd2be
Merge remote-tracking branch 'origin/develop' into develop
xudean Jan 9, 2025
d389b22
Merge remote-tracking branch 'upstream/develop' into develop
xudean Jan 9, 2025
8122abc
fix readme format
xudean Jan 9, 2025
c8500cd
fix code error
xudean Jan 9, 2025
4f08094
update readme in plugin-primus
xudean Jan 9, 2025
14fe671
update import
xudean Jan 9, 2025
ff931a9
update import
xudean Jan 9, 2025
730b929
refine readme
xiangxiecrypto Jan 9, 2025
b6818ec
chore: refine readme
xiangxiecrypto Jan 10, 2025
d55da5f
Merge branch 'develop' into develop
xudean Jan 10, 2025
3a3a9f2
Merge remote-tracking branch 'upstream/develop' into develop
xudean Jan 11, 2025
9bf45e0
Merge remote-tracking branch 'upstream/develop' into develop
xudean Jan 11, 2025
d90f838
resolve conversions problems
xudean Jan 11, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 9 additions & 8 deletions packages/plugin-primus/README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
# @elizaos/plugin-twitter-primus
# @elizaos/plugin-primus

A plugin to fully verify agent activities, including LLM access, actions, and interactions with external providers, powered by Primus' zkTLS protocol.

A plugin for Twitter/X integration that ensures the verifiability of information throughout the process, including the source of information, summary, usage, and more, across the stages of 'model -> provider -> action'.
## Overview

This plugin offers the following functionalities:

- Verifying that the information originated from Twitter/X
- Confirming that the information summary was generated by a large model
- Ensuring that the summary message was successfully sent to Twitter/X
Here's a refined version of your text:

In the Eliza framework, an agent consists of three key components: a brain (accessing an LLM), actions (the tasks the agent performs), and perception (gathering external information from providers). To fully verify agent activities, it's essential to ensure that the agent's thoughts, actions, and external information requests are all verifiable. This plugin enables full verification of these activities.

The current plugin includes:

Verification of inference from OpenAI's LLM.
An example for verifying actions, such as posting a tweet (this can be extended to any other actions).
An example to verify that the Bitcoin price is accurately fetched from Binance (this can be extended to any other data providers).


## What we do
@@ -30,7 +31,7 @@ example..
...

...
##
##



4 changes: 2 additions & 2 deletions packages/plugin-primus/src/actions/postTweetAction.ts
Original file line number Diff line number Diff line change
@@ -6,8 +6,8 @@ import {
State,
} from "@elizaos/core";
import { TwitterScraper } from "../util/TwitterScraper.ts";
import { tweetProvider } from "../provider/tweetProvider.ts";
import {tokenPriceProvider} from "../provider/tokenPriceProvider.ts";
import { tweetProvider } from "../providers/tweetProvider.ts";
import {tokenPriceProvider} from "../providers/tokenPriceProvider.ts";

export const postTweetAction: Action = {
description: "Post a tweet on Twitter and be verified by Primus",
2 changes: 1 addition & 1 deletion packages/plugin-primus/src/util/twitterScraper.ts
Original file line number Diff line number Diff line change
@@ -249,7 +249,7 @@ export class TwitterScraper {
const verifyResult = verifyProof(attestation);
if (!verifyResult) {
throw new Error(
"Verify attestation faileddata from source is illegality"
"Verify attestation failed, data from source is illegality"
);
}
const responseData = JSON.parse(attestation.data);