Getting Started

Getting Started

Get up and running with Slate in minutes.

This guide will walk you through setting up Slate and connecting your first agent.

Step 1: Sign Up

  1. Navigate to the Slate Console.
  2. Create an account using your email or social login.

Step 2: Create Your Instance

Once logged in to the dashboard:

  1. Click the "Create New Instance" button.
  2. Choose a name for your instance (e.g., my-agent-memory).
  3. Select your preferred region.
  4. Click "Launch".

Your instance will be ready in a few seconds.

Step 3: Get Credentials

After your instance is created, you will see a connection card.

  1. Locate the Connect section on your instance dashboard.
  2. You will see the following details:
    • Address: e.g., grpc.your-instance-id.slate.tryrice.com:80
    • Auth Token: Hidden - click to reveal
Important: Keep your auth token secure. Do not commit it to public repositories.

Step 4: Install the Client

Slate provides SDKs for Node.js/TypeScript and Python.

Node.js / TypeScript

npm install git+https://github.com/rice-ai-hq/slate.git#subdirectory=clients/node

Python

pip install git+https://github.com/rice-ai-hq/slate.git#subdirectory=clients/python

Slate on GitHub

View full source code and examples.

Step 5: Connect and Verify

Node.js

import { CortexClient } from "slate-client";

const client = new CortexClient(
  "grpc.your-instance-id.slate.tryrice.com:80",
  "your-secret-token",
  "my-session"  // Optional run_id for session isolation
);

// Test connection with a simple focus operation
await client.focus("Hello, Slate!");
const items = await client.drift();
console.log("Connected! Items in Working Memory:", items.length);

Python

from slate_client import CortexClient

client = CortexClient(
    address="grpc.your-instance-id.slate.tryrice.com:80",
    token="your-secret-token",
    run_id="my-session"  # Optional run_id for session isolation
)

# Test connection with a simple focus operation
client.focus("Hello, Slate!")
items = client.drift()
print(f"Connected! Items in Working Memory: {len(items.items)}")

Next Steps

Now that you are connected, you are ready to build!


Your First Agent

Let's build a simple note-taking assistant that remembers what you tell it and learns from interactions. This example shows all four memory types in action.

The Goal

Build an agent that can:

  1. Remember notes you give it (Working Memory)
  2. Learn from past interactions (Episodic Memory)
  3. Store reference facts (Semantic Memory)

Complete Example

import { CortexClient } from "slate-client";

const client = new CortexClient(
  "grpc.your-instance-id.slate.tryrice.com:80",
  "your-token",
  "travel-agent"  // run_id for session isolation
);

// 1. WORKING MEMORY: Store current session context
await client.focus("User is planning a trip to Japan");
await client.focus("Budget is around $3000");
await client.focus("Interested in temples and food");

// Retrieve current context (sorted by relevance)
const context = await client.drift();
console.log("Current context:", context);

// 2. EPISODIC MEMORY: Learn from interactions
// Record a successful interaction
await client.commit(
  "What should I pack for Japan in spring?",  // Input
  "Suggested layers, umbrella, comfortable walking shoes",  // Outcome
  {
    action: "travel_advice",
    reasoning: "Spring weather is variable, lots of walking expected"
  }
);

// Later, recall similar past interactions
const pastAdvice = await client.reminisce("packing for Asia trip", 3);
console.log("Similar past advice:", pastAdvice);

// 3. Use past experience to improve responses
// The agent now knows what worked before

What Just Happened?

  1. Working Memory held the current conversation context. When you called drift(), it returned items sorted by relevance.
  2. Episodic Memory recorded a complete interaction trace. When you called reminisce(), it found similar past experiences using semantic search.
  3. Your agent can now use past experiences to make better decisions.

The Agent Loop

Every cognitive agent follows this pattern:

User Input
    ↓
Recall past experiences (reminisce)
    ↓
Get current context (drift)
    ↓
Make decision (your LLM)
    ↓
Take action
    ↓
Learn from result (commit)
    ↓
Update context (focus)

That's it. This simple loop is the foundation of every learning agent you'll build with Rice.