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: added new adapter - zktls - reclaim #1558

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from

Conversation

Gajesh2007
Copy link

Risks

Low

Background

A few weeks ago, we observed issues with aixbt, where users mistakenly believed the moderation was performed by humans. This misconception caused a public relations disaster and raised concerns about the AI's autonomy. As a result, the team had to make logs public to maintain transparency and trust.

This problem can be mitigated using zkTLS. zkTLS enables the generation of zero-knowledge proofs for TLS sessions, also known as "web proofs." With zkTLS, any off-chain data can be proven either on-chain or off-chain, ensuring authenticity without compromising privacy.

What does this PR do?

This PR integrates Reclaim as an adapter into the framework without introducing breaking changes. Reclaim is a zkTLS platform built on EigenLayer as an Actively Validated Service (AVS).

What kind of change is this?

Updates
-->

Why are we doing this? Any context or related work?

This update addresses the critical need for transparency and trust in AI interactions, as highlighted by the PR disaster involving aixbt. By integrating Reclaim as a zkTLS adapter, we ensure that all inferences and interactions are verifiable without compromising privacy. This addition strengthens the framework's credibility by enabling zero-knowledge proof generation and verification for TLS sessions.

The integration aligns with EigenLayer's mission to build secure and verifiable systems, leveraging Actively Validated Services (AVS) to enhance both functionality and trustworthiness. This is especially relevant as more AI systems require robust mechanisms to prove autonomy and authenticity in a seamless and privacy-preserving manner.

Documentation changes needed?

Documentation has been updated in the adapter-reclaim README.
No further changes to the project documentation are required.

Proof Verification Example

Below is a screenshot showcasing the generated proof and its verification process:

Screenshot 2024-12-28 at 11 39 17 PM Screenshot 2024-12-28 at 11 31 20 PM

Testing

Where should a reviewer start?

Detailed testing steps

  1. Configure the following environment variables (generated from the Reclaim Dashboard):
# Reclaim Protocol
RECLAIM_APP_ID= # Reclaim App ID
RECLAIM_APP_SECRET= # Reclaim App Secret

# Verifiable Inference Configuration
VERIFIABLE_INFERENCE_ENABLED=true # Set to true to enable verifiable inference
VERIFIABLE_INFERENCE_PROVIDER=reclaim # Options: reclaim, opacity (soon)
  1. Run a character using the command:

pnpm start --characters="./characters/trump.character.json"

  1. Start the client: pnpm start:client
  2. Interact with the agent via chat and check the logs for proof generation and verification.

Additional Notes

  • Automated tests are sufficient; no manual testing is required for deployment.
  • No database changes or additional deployment instructions are necessary.

Discord username

--> Gajesh#0000

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @Gajesh2007! Welcome to the ai16z community. Thanks for submitting your first pull request; your efforts are helping us accelerate towards AGI. We'll review it shortly. You are now a ai16z contributor!

@Gajesh2007 Gajesh2007 changed the base branch from main to develop December 29, 2024 07:42
@Gajesh2007 Gajesh2007 changed the title feat: added zktls - reclaim feat: added new adapter - zktls - reclaim Dec 29, 2024
@shakkernerd shakkernerd added Plugin_new Mark PRs that are a new plugin Needs Testing labels Dec 29, 2024
@fabianhug
Copy link
Member

testing now

@fabianhug fabianhug self-assigned this Dec 29, 2024
Copy link
Collaborator

@odilitime odilitime left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not an adapter but a plugin. Adapters have to do with persist storage

@fabianhug
Copy link
Member

fabianhug commented Dec 29, 2024

Great use-case. Thanks for the PR!

I am running into some errors:

When modelProvider is set to openai:
Error in Reclaim generateText: Error: Failed to create claim on witness: request body mismatch

When modelProvider is set to anthropic:
Error in Reclaim generateText: Error: Invalid receipt. Regex "\r\n\r\n[a-f0-9]+\r\n(?<response>\{.*\})" didn't match at Object.assertValidProviderReceipt

I am following your testing steps.

@Gajesh2007

@fabianhug fabianhug self-requested a review December 29, 2024 21:04
@Gajesh2007
Copy link
Author

let me look into it

@fabianhug
Copy link
Member

fabianhug commented Dec 30, 2024

let me look into it

we would love to add this to the next release :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Testing Plugin_new Mark PRs that are a new plugin
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants