Steph Orpilla I Speedrun Nillion's SecretVault I Agentic Ethereum 2025
ETHGlobal·Thu, Oct 9, 2025, 12:00 AM
Protect your AI agent data with Nillion's SecretVault—a fully decentralized storage solution that easily secures and encrypts sensitive information. In this workshop, Steph Orpilla, Head of DevRel at Nillion, demonstrates how to create, store, and retrieve private data using Nil DB Nodes, Nillion SecretVault Wrappers, and Nillion Query Language (nql). Whether you’re building AI agent swarm memory, encrypting user PII, or sharing secure off-chain context, this quickstart covers the entire flow—from schema creation to encrypted record reads. Learn how to integrate SecretVault into your hackathon projects with minimal overhead, all via simple REST APIs and user-friendly libraries. 00:00 Introduction & Prizes 00:07 Overview: Nillion SecretVault 01:23 Use Cases & Encryption Flow 02:31 Quickstart: Installing the Wrappers 03:40 Building & Posting Schemas 05:06 Writing Encrypted Data to Nodes 06:40 Reading & Decrypting Records 08:01 Implementation Tips & Best Practices 09:18 Registering an Organization 10:41 Joining the Community & Final Remarks _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 🤖 *Agentic Ethereum* Agentic Ethereum is an online, async hackathon that runs from Jan. 31 to Feb. 12, 2025. With over $175,000 USD in prizes, Agentic Ethereum is a great way to dive into the world of autonomous AI agents and explore how they can revolutionize projects on Ethereum. Start the year with groundbreaking innovation! Watch the full playlist: https://youtube.com/playlist?list=PLXzKMXK2aHh7jxP_flgRf5nZ_WDgFpBy3&si=RZozbd9C5KrG6Bf3 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ✅ *Follow Nillion* X: https://x.com/nillionnetwork Website: https://nillion.com ✅ *Follow ETHGlobal* X: https://x.com/ETHGlobal Warpcast: https://warpcast.com/ethglobal Website: https://ethglobal.com YouTube: https://www.youtube.com/c/ETHGlobal _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _Are you interested in Ethereum development and entrepreneurship?_ 👉 Sign up for the next ETHGlobal event: https://ethglobal.com/events 🎁 Get exclusive access and perks with ETHGlobal Plus! https://ethglobal.com/plus 📣 Want us to throw an event in your city? Tell us where! https://ethglobal.com/city _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
Transcript
Hello everyone. Welcome to this session. I'll just hide the controls. Today I will be hosting a session called "Speedrun Secret Vault". And to quickly introduce myself, I'm Steph Orpiglia.
I am the head of developer relations at Nillian. And I'm glad you all can get your hands on Secret Vault and start creating with it during E Global Agentic. And because I know you're curious, we're giving away $5,000 in prizes for this hackathon. The first set of prizes is for the best use of the Nillian Secret Vault. And there's a little star next to this prize because this seminar is dedicated to the Nillian Secret Vault.
I'll quickly help you get started with Nillian Secret Vault so you can use and integrate it into all your hackathon projects. Another prize is hackathon projects. Another prize is for creating integration with an agent framework. There is a $1,000 prize for the best framework integration, and it is for those who create a library or developer tool that makes it easier for other developers or users to work with Nillian and the chosen agent. It could be Eliza, or something based on OpenAI.
Any type of AI agent framework integration can win this prize can win this prize . So it's a kind of " . So it's a kind of " joker" and it has a more open nature. And another prize, again, four of them, is for the best use of Secret Vault, which I'll talk about later. Oh, and you can scan this QR scan this QR code to learn more about the prizes and understand what you need to do to participate.
And now I want to talk about Nillian Secret Vault. So, Secret Vault Secret Vault. So, Secret Vault is a decentralized data storage solution designed to preserve privacy, which works by storing encrypted pieces of data in a decentralized cluster of Nil DB nodes. The reason why Secret Vault is so cool is that your data stays safe. This is great if you are building something for your AI something for your AI agents that uses user data.
So, if your agent stores user data somewhere , it should be in a place where that data is protected as securely as possible. This can also be useful if your agents are in a swarm and are communicating with each other, needing to share data, but don't want that data to leak, as that would create a vulnerability where someone else could access the data and understand what the swarm is doing, which would make your product less useful. So, in Nillion Secret Vault you encrypt the data, and when you encrypt it, you divide it into different chunks, and each of these chunks is stored in a separate Nillion DB node, so no node sees the encrypted data, it only sees the meaningless chunk. Here's how we use Secret Vault to protect data. One of my favorite things about using Secret Vault using Secret Vault is that it's very easy to integrate, in my opinion, because you access and interact with Secret Vault through easy-to- use APIs.
Before Web3, I had experience developing in Web2 and used APIs all the time. So when I came to Web3 and had to get used to more complex ways of reading and writing through clients or whatever, I really missed the API because it was easy to understand how to interact with everything. And Secret Vault is cool because you can use the API to create schemas and then read and write data to those schema collections. So storing and retrieving data seems very familiar and easy. And the last reason I like working with Secret Vault working with Secret Vault is that we provide several powerful libraries that you can use right out of the box.
The first library is called NilQL. This is Nil Query Language, and it is designed to encrypt and decrypt decrypt any private data you want to store in Secret Vault. The second library is called Nillion SV wrappers. These are Nillion Secret Vault wrappers, essentially a JavaScript npm wrappers, essentially a JavaScript npm package that performs many API calls for you as you write data to multiple nodes. If you were to use the API directly, you would have to use n APIs, one for each node.
But if you use a wrapper library, it simplifies the process. You just tell the library: here's this node, that node, and the third node, these three URLs, and it takes care of all the API calls for you. So, that's a little bit about Secret Vault. Another thing worth talking about is NilQL. This is the library for encrypting and decrypting secret data that I mentioned earlier I mentioned earlier .
This is an example of a recording I might want to save in Secret Vault. This looks like a JSON data payload , but there are a few things to note. There are many markers in the data , and any place where there is a marker signals NilQL, the encryption library, that this value needs to be encrypted. So the first value I want to encrypt want to encrypt is the name, it's marked. So my name will be encrypted in the received data.
I also want to encrypt the number of years I have been in Web3. So, I also have a property that specifies that this number should be encrypted before saving the product rating. Imagine this is just survey data. This is not confidential to my application. So I don't need to encrypt it, it can be stored in plain text.
And when nilql works with this record, when you encrypt it using the library using the library , the resulting data might look like this. So, I have three different datasets, and each of them has these encrypted properties. You can see that the name and years in Web3 are written with a fraction in all three cases, and these fractions differ between nodes. So the first node will receive this packet with different particles than the second node, and different from the third node. So, if someone were to compromise the security of one node, they still wouldn't know the name or the number of years in Web3 for that entry, because it's encrypted with a encrypted with a , which makes no sense at all.
But when you use NoQL to decrypt or rejoin that record, you get it back. You will be able to see the name, years in Web3, and product rating in plain text. Because it brings these particles together. And these three records are individually uploaded to each Secret Vault node, and that's how the data is stored. So, to summarize, the complete process of using Secret Vault is to create an AI is to create an AI agent or application.
This is shown here below. This AI agent or application receives data. Imagine you have an agent that asks a user: give your name, how long you've been in Web3, and a product rating. So, they give you all this information, and then the agent says, "Okay, I'll encrypt these fields." The agent encrypts private data fields using the NoQL library.
This results in three different encrypted records encrypted records , each of which is loaded onto a separate database node , and when you need to decrypt the data or read it, the agent can contact the nodes. Nodes provide chunks of data, and then you can combine those three pieces to decrypt the data again using NoQL, and it all happens very simply through wrappers. OK. Now let's actually speed up this process. By acceleration, I mean we'll go through the quick launch very quickly.
Oh, I hear someone. Does anyone have a question? Okay, cool. So, we're going to go through a quick tutorial very quickly. You can code with me if you want.
But if you miss something, you can message partner Nillian on Discord and I'll look into it later. Or just let me know if anything is unclear and I'll stop by to answer the question, but for now I'll just run a quick tutorial on my computer. Okay. So, let's go. So, I'll just go to docs.
nillion.com/quickstart. And you see that there are different things that you can start creating. So I'm going to click on the Secret Vault quick guide because that's what I want to go through. In this quick tutorial, which will take about 15 minutes, we will create a privacy-preserving data collection for a Web3 survey.
In this survey, we will have the name and age fields in Web3, which we will encrypt, and leave the experience ratings open. We'll just store them in plain text so anyone can read them if they want. This will be a NodeJS project that I will create completely from scratch, as outlined in the guide. So let 's start building the project. I'll just minimize this window and leave it on the left side of the screen.
And here I have a terminal, which I'll leave on the right, and I'll also open a code editor. The first thing we need to do is create a directory for our project. So, I'll create a directory and go into it. Next, we need to initialize the project. It will be initialized as a module.
So I'll run npm init es6 and that will set the module type in the package.json file module type in the package.json file . The next thing I need to do is install the sv wrappers package. This is the package that manages private keys and all the wrappers.
This is a package that manages all the keys and also creates JWT API tokens based on your organization's configuration for Secret Vault. Now that I have all of that, I'm just going to open up Cursor because it's... I'm going to use an AI code editor for my project and I'm just going to open up a terminal at the bottom to do everything within Cursor. Okay, we've set up the project. The next thing I need to do is create a file that will store my organization's configuration.
So now I have this org configuration file in the quickstart. I have a demo organization configuration that I will copy into org config. Now let's talk briefly about org config. So, if you create an entity to use Secret Vault, you are creating an organization. I'm just using the demo using the demo organization from the quickstart, but you can register your own organization.
And I recommend doing this for your projects here on the portal. So, you will simply use this registration portal. You can create a new organization. Enter the name you want and select the nodes. These are the three demo nodes.
These are the three demo nodes that will be selected for you. And these are exactly the nodes that my organization uses. So I'm skipping this step since I already have my organization's credentials. But along with the organization credentials, I have the node configuration. The node configuration contains node configuration contains URLs and decentralized identifiers for each node.
And it is to these nodes that I will upload my data. Each of these nodes will receive a separate piece of data, so it is important to have information about the nodes within the configuration along with the organization. The organization's secret key generates API tokens for each of these nodes so that Secret Vault knows that the organization is the entity writing data to the vault. Okay, we got our organization's credentials. The next thing we need to do is create a collection schema.
So I'll create a file for this schema.json. JSON. It's empty for now, but I'll copy the web3 experience schema into schema.json.
And now we can look at it. All schemas for Secret Vault adhere to the JSON schema draft 7 standard. Inside, you can add a name for your schema. And then you start defining the structure of the data you will upload to Secret Vault. If you've Vault.
If you've ever used something like MongoDB, it's very similar: you specify all the properties you expect to load. So, the first thing I expect is ID. It will always be set for each record, and then I will load the person's name, number of years in Web3, and a collection of answers to the question. So, each question will have a number. For example, question number one, number two, and the answer to the question will be a score from one to five.
So, for the survey I'm creating, I want people to be able to rate their user experience with different things. So I'm asking them to rate their experience with Solidity experience with Solidity , with wallet UX, etc. so I can get a general idea of how UX is improving in web3 this year. Okay. We talked earlier about how secret vault is really cool because you can store secret data inside the vault, and the way to mark data in a schema as secret is share.
So if something is share, it's not a real name. We load the share of load the share of the name. So, this is that line. If I go back to my presentation, oops. So, if this is the original record, then share is the part of the encrypted data that goes into the node.
So we denote anything that is to be encrypted as a share, and the type of share is and the type of share is string. You can see that both name and years in web 3 are shares, while the response array is just plain text. They are integers, strings, dates, so what goes into the response array doesn't need to be encrypted. So, there are no shares there. Okay, this is our scheme.
And to start loading data into the collection, we must first load the schema onto all three nodes. To do this, I will create a mini- this, I will create a mini- script that will take this diagram and load it. I created a file, and in this file I will simply paste the script, and explain what it does. Okay, this is a script to send the schema to all the different nodes. At the top you can see that I am importing the secret vault wrappers.
It's just a collection that helps execute all API requests. I also import org config. Org config import org config. Org config is what we created earlier, it contains the keys and IDs of all the nodes so we know where to load the schema. Now that I have all of this, I can run it to create the wrapper and initialize the organization.
The organization was initialized with these nodes as well as credentials. And in order to create the schema, I have to provide the wrapper with a schema file, i.e. schema.json, and the name of the collection, which in this case is web3 experience survey.
It can be anything you want. This is so that when you look at all your diagrams, you can easily understand: oh, this is my survey about experience. So, after that, you can create the schema and it should load on all three nodes. But let's actually test this. I'll just run node host schema, which is this file.
Perfectly. So, this was successful and a new collection schema was created for all three nodes. So for this node, this node, and this node. You will also see that the schema ID is the same for all three nodes. And this is very important because you want to be able to write to the same schema and not worry: oh, did I use a different ID for one node compared to another?
Everything needs to be very consistent so that the only difference between nodes is the value of the encrypted share. And that's because they have to be different so that when you combine them, you get true meaning. OK. So now we have the schematics on all the different nodes. The next thing we will do is create a script to interact with the secret storage data.
That is, writing data to our schema collection and then reading data from the schema collection. So let's create another script called index.js. And inside this script, I'm going to copy some things. So, the first thing is to import dependencies.
We don't really need the UUID package, so I'll skip it. Oh so I'll skip it. Oh , the AI is trying to autocomplete for me. I don't need it. Hmm, okay.
So, we're going to import the wrappers package, the same one as before, and also the org config. The next thing we need to do is create a constant for the schema ID. And we can read it directly from the console of another script. This will be hardcoded to the schema we just uploaded to the secret repository. After that, we will create the data payload.
And this will be, oh, this will just be the data that we want to send to the schema. Remember that each of the encrypted fields is pre- marked to show that they will be encrypted, and once uploaded to the secret storage they will be converted to particles. So, instead of Vitalik, let's say Satoshi, Satoshi Nakamoto. He's probably been in Web3 longer than anyone, maybe 16 years. And I'll just leave his survey answers as is.
So now we have the data payload and all we have to do is add the main function. Let's quickly walk through this basic function. So, inside the main function, the first thing we do first thing we do is initialize the collection using the organization configuration, nodes, credentials, and the schema ID that we hardcoded above. So now we have initialized the collection for this schema. Once the collection is ready, we can start writing data to the nodes.
This collection function " collection function " write to nodes" comes from that wrapper package, it will simply write this data to all three nodes in the collection and then output the new IDs. I'll comment out this second part for now because after writing the data we'll be able to read it, but I want us to focus on writing the data to this collection first and then we'll read it. Good. So, we have a function and we can run node index.js.
This writes data to all three nodes. You can see that this ID was created on the first node . The same identifier is created on the second node , and the same one is created on the third node . You can see that this ID has been loaded on all three nodes. So, the data is successfully located on all three nodes of the collection.
Now let's try to read the data. I will comment on this. And we'll just read the data from the collection. I'll remove the slice because we haven't actually loaded any new data right now. So, this simply means: okay, let's take the collection and read from all three nodes.
And the reason these brackets are empty is these brackets are empty is because we're not passing any filter. If you want, you can filter different things with plain text. For example, you could filter for a specific answer rating. You can do this by passing a valid filter here. But I'll just read the records that are currently inside the secret vault.
Good. So, we see one entry. This is the same last entry, just Satoshi Nakamoto. Let's add another record and then perform a write and read. So maybe it will be Jacob from ETH Global.
Known. I have a feeling he's been in Web3 for probably 10 years. I'll have to ask him later. And we'll say that he rates both questions as a five because he thinks the UX is great. So, going back , I'm going to uncomment all of this code so that it reads, or rather reads, or rather , writes Jacob's entry to our data collection, and then reads all of the decrypted data from the collection.
So we should see both Satoshi and Jacob's entries in the logs. So, coming back here, the first thing that happened was the entry into the Secret Vault. So, one new record 39F blah blah blah was created, and when it needs to be read, it reads both records that are in the secret storage. The first entry at the bottom The first entry at the bottom is Satoshi, who was uploaded earlier, and we also see Jacob, who was just uploaded. As you can see, with Secret Vault we were able to encrypt and write data and then read it all back because we have the organization secret key needed for reading and writing, as well as for creating new schemas.
This is a bit about Secret Vault. I think we went through the entire quick start in, I would say, less than 10 minutes. I think this should be enough to use Secret Vault in almost Secret Vault in almost any process for your AI agents. If you want to do it yourself from scratch, you just need to register a new organization. You will receive your own secret keys for your organization and can create collection schemas based on any data you want your agent to read and write to Secret Vault.
This could be user data. Perhaps it is a shared state between agents so that they know part of what each of them is doing. Maybe it's memory so that when creating context for the agent they have a lot of different things to draw on. Anything like this would be a great example of using Secret Vault. And one more thing worth mentioning: if you visit us on Discord, we have consultation hours every day, twice a day .
One of the consultation hours seems to be at 10:00 European time, and the other is at 10:00 Pacific Standard Time. So regardless of your time zone, you will likely have zone, you will likely have at least one weekday consultation hour that works for you. We'd love to hear what you're creating and help if you have any questions. We are so excited to see what you all create.
Automatic transcript — names and jargon may be misspelled.