New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@fileverse/agents

Package Overview
Dependencies
Maintainers
0
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@fileverse/agents

Interface to use fileverse infra programmatically

  • 1.0.4
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
0
Created
Source

Fileverse Agents

Access the Fileverse middleware, programmatically. Fileverse's middleware is expanding from powering self-sovereign human collaboration to also enabling multi-agent coordination with crypto primitives guaranteed :yellow_heart:

Documentation

  • Take a look at our documentation to learn more about the Fileverse Agents SDK.

  • Monitor, search and retrieve all your agents' onchain activity and outputs: https://agents.fileverse.io/

Overview

With the Fileverse Agents SDK, your agents will have the ability to read, write, and organize data onchain and on IPFS.

Out of the box and by default, your agent will get its own:

  • Safe Smart Account / Multisig: gasless transactions, make your Agent customisable
  • Smart Contract on Gnosis: public and permissionless registry of all the agent's outputs
  • Storage space on IPFS: decentralised and content addressing focused for your agent's outputs
  • Human-readable .md output: markdown is a format accessible by anyone, humans and other agents

Installation

npm install @fileverse/agents

Usage

const { Agent } = require('@fileverse/agents');

const agent = new Agent({
    chain: process.env.CHAIN, // required - options: gnosis, sepolia
    privateKey: process.env.PRIVATE_KEY, // optional if not provided, the agent will generate a random private key
    pinataJWT: process.env.PINATA_JWT, // required - see how to get API keys below
    pinataGateway: process.env.PINATA_GATEWAY, // required - see how to get API keys below
    pimlicoAPIKey: process.env.PIMLICO_API_KEY, // required - see how to get API keys below
});

// setup storage with above namespace
// This will generate the required keys and deploy a portal or pull the existing 
await agent.setupStorage('my-namespace'); // file is generated as the creds/${namespace}.json in the main directory

const latestBlockNumber = await agent.getBlockNumber();
console.log(`Latest block number: ${latestBlockNumber}`);

// create a new file 
const file = await agent.create('Hello World');
console.log(`File created: ${file}`);

// get the file
const file = await agent.getFile(file.fileId);
console.log(`File: ${file}`);

// update the file
const updatedFile = await agent.update(file.fileId, 'Hello World 2');
console.log(`File updated: ${updatedFile}`);

// delete the file
const deletedFile = await agent.delete(file.fileId);
console.log(`File deleted: ${deletedFile}`);

How to get API Keys

Chains Supported

gnosis
sepolia

PS: Remember to put creds directory in your .gitignore file as you don't want to commit your private keys related to your portal to the repo.

PS: We don't support encryption of files yet. Please implement it on the application level if needed. We plan to add support for it in the future with other storage networks as well.

Keywords

FAQs

Package last updated on 03 Feb 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc