Documentation

Everything you need to build with tenet

Get Started Free View on GitHub

Quick Start

Install the tenet SDK and start building in minutes:

npm install tenet

TypeScript / JavaScript

import { SuperAgent } from 'tenet'

const agent = new SuperAgent({
  uplink: {
    url: 'https://uplink.dev',
    apiKey: process.env.UPLINK_KEY
  },
  tenet: {
    url: 'https://api.ten3t.com',
    apiKey: process.env.TENET_KEY
  }
})

await agent.learn('company-docs.pdf')
const result = await agent.ask('How do I...?')
console.log(result.answer)

Core Concepts

SuperAgent

The all-in-one agent that combines document learning, RAG querying, and multi-channel communication.

Document Management

Upload encrypted documents with metadata tagging and automatic indexing.

RAG (Retrieval-Augmented Generation)

Semantic search with vector embeddings, automatic chunking, and context-aware responses.

Multi-Channel Bots

Deploy your agent to Slack, Discord, Teams, SMS, or phone with a single API.

Authentication

tenet supports two authentication modes:

Managed Mode (Recommended)

Create a tenet account and we'll provision everything for you:

// Sign up
POST /auth/signup
{ "email": "you@company.com", "company_name": "Acme Corp" }

// Response:
{
  "session_token": "...",  // Use in Authorization header
  "passphrase": "alpha-bravo-charlie-delta",  // Save securely!
  "user_id": "...",
  "tier": "freemium"
}

// Sign in
POST /auth/signin
{ "email": "you@company.com", "passphrase": "alpha-bravo-charlie-delta" }

// Response:
{ "session_token": "...", "user_id": "..." }

BYOK Mode (Bring Your Own Key)

Already have an Uplink API key? Use it directly:

// Just use your Uplink API key in requests:
Authorization: Bearer ak_YOUR_UPLINK_API_KEY

// No signup needed! But you won't get:
// - Document listing (GET /documents)
// - Usage tracking
// - Tier management

API Reference

Documents

// Upload document
POST /documents
Authorization: Bearer SESSION_TOKEN_OR_UPLINK_KEY
Content-Type: multipart/form-data

file: File (required)
pool_id: string (optional - groups documents)

// Response:
{
  "document_id": "...",
  "chat_id": "...",  // Use this for /chat
  "status": "active"
}

// List documents (Managed Mode only)
GET /documents
Authorization: Bearer SESSION_TOKEN

// Delete document (Managed Mode only)
DELETE /documents/:id
Authorization: Bearer SESSION_TOKEN

Chat

// Query with RAG
POST /chat
Authorization: Bearer SESSION_TOKEN_OR_UPLINK_KEY
Content-Type: application/json

{
  "message": "How do I...?",
  "chat_id": "...",  // Optional in Managed, Required in BYOK
  "model": "llama-3.3-70b-versatile"  // Optional
}

// Response:
{
  "answer": "To do that, you...",
  "chat_id": "...",
  "usage": {
    "input_tokens": 100,
    "output_tokens": 50,
    "cost_usd": 0.0015
  }
}

Security

All data is isolated by tenant in Uplink's infrastructure. Each tenet user gets their own isolated Uplink sub-tenant.

API Key Encryption

In Managed Mode, your Uplink API keys are encrypted at rest using AES-256-GCM. We never expose them in API responses.

HTTPS Only

All API requests must use HTTPS. HTTP requests are automatically upgraded.

Examples

Check out our GitHub repository for complete examples:

  • Simple RAG agent
  • Multi-channel bot
  • Database integration
  • Custom upload links

Need Help?

• GitHub: github.com/uplink-network/tenet-sdk
• Email: hello@ten3t.com
• Status: ten3t.com/status