Skip to main content

Get started in three steps

Add Zero-Knowledge verification to your AI agents and start building trustworthy autonomous systems.

Step 1: Install the Treeship SDK

Install the Treeship SDK for JavaScript/TypeScript:
npm install @treeship/sdk
Or using yarn:
yarn add @treeship/sdk
Install the Treeship SDK for Python:
pip install treeship-sdk

Step 2: Initialize your first agent

  1. Sign up at treeship.dev
  2. Generate your API key from the dashboard
  3. Set your environment variable:
export TREESHIP_API_KEY="your_api_key_here"
Initialize a Treeship client and create your first verified AI agent:
import { Treeship } from '@treeship/sdk';

const treeship = new Treeship({
  apiKey: process.env.TREESHIP_API_KEY
});

// Create a verified agent
const agent = await treeship.agents.create({
  name: "MyFirstAgent",
  capabilities: ["text-generation", "data-analysis"],
  zkConfig: {
    enableProofs: true,
    preservePrivacy: true
  }
});

console.log("Agent created:", agent.id);
Your agent now has built-in Zero-Knowledge verification capabilities!

Step 3: Generate your first proof

Generate a cryptographic proof of your agent’s performance:
// Execute an agent task with proof generation
const result = await treeship.agents.execute(agent.id, {
  task: "Analyze this data while preserving privacy",
  data: { /* your sensitive data */ },
  generateProof: true
});

// Verify the proof
const verification = await treeship.proofs.verify(result.proofId);

console.log("Proof verified:", verification.isValid);
console.log("Performance score:", verification.metrics.accuracy);
The proof validates performance without exposing your private data!

Next steps

Now that you have your first verified agent, explore these advanced features:
Need help? Join our Discord community or check out our GitHub.