grepticon/

Quickstart

Sign up, create a key, push files, and run an AI-SDK agent over ls / find / cat / grep against api.grepticon.com — in one sitting.

Grepticon gives your agents retrieval over an isolated, permissioned workspace with four familiar tools — ls, find, cat, and grep. This walkthrough takes you from zero to an agent answering questions over your files: sign in, create a key, push a file, mint a read token, and run it through the Vercel AI SDK against the hosted API at https://api.grepticon.com.

Before you begin

  • Node.js 20+ and a package manager (npm, pnpm, or yarn).
  • A model provider key. The example uses Anthropic, so it reads ANTHROPIC_API_KEY — swap in any AI SDK provider you prefer.
  • A few minutes. Everything below runs on the free plan (no card required).

Sign in

Open app.grepticon.com/signin and click Continue with Google. Google is the only sign-in method — there's no email-and-password form. New accounts land on the Workspaces page on the free plan.

Create an API key

In the console, open API Keys (/keys) and click Create key. Give it a label (for example, local-dev) and confirm.

The full grp_sk_… management key is shown exactly once — copy it now and keep it somewhere safe. This is the credential the SDK authenticates with; if you lose it, revoke it and create another. Export it for the script:

export GREPTICON_API_KEY=grp_sk_your_key_here
export ANTHROPIC_API_KEY=sk-ant-your_model_key_here

Install the SDK

npm install @grepticon/sdk ai @ai-sdk/anthropic

@grepticon/sdk is the typed client. ai is the Vercel AI SDK (a peer of the adapter subpath), and @ai-sdk/anthropic is one model provider — replace it with whichever provider you run your agent on.

Create a workspace

A workspace is one isolated filesystem. Create it in the console or from the SDK — the code below uses the SDK. baseUrl defaults to https://api.grepticon.com, so you only pass it to point at a self-hosted server.

quickstart.ts
import { GrepticonClient } from '@grepticon/sdk';

const client = new GrepticonClient({
  apiKey: process.env.GREPTICON_API_KEY ?? '',
});

const workspace = 'handbook';
await client.workspaces.create(workspace);

Push files

Files are uploaded through the SDK or REST API — there is no upload UI in the console. Ingestion is asynchronous: upload returns immediately with status: 'pending', and reads won't see the content until the worker finishes extracting it.

quickstart.ts
await client.files.upload(
  workspace,
  'guides/onboarding.md',
  '# Onboarding\n\nNew hires finish account setup on day one.\n',
  { contentType: 'text/markdown' },
);

Wait for ingestion

Before reading, wait for the file to finish ingesting. waitForReady resolves once the targeted paths reach ready or error. It only throws on timeout — an ingest failure resolves normally, so check each returned entry's status and errorDetail yourself.

quickstart.ts
const [file] = await client.files.waitForReady(workspace, {
  paths: ['guides/onboarding.md'],
});
if (file?.status === 'error') {
  throw new Error(`Ingestion failed: ${file.errorDetail ?? 'unknown error'}`);
}

Mint a token and run your agent

Mint a scoped, read-only grp_at_ token for the agent session, then hand the four read tools to generateText. Default token claims (['*']) can see every file; you narrow them once you start tagging files with visibility.

client.session(ws) reads with the credential the client was built with — your grp_sk_ key — not with the token you just minted. To read as the scoped token, build a second client keyed by the token and call .session(ws) on that one.

quickstart.ts
import { anthropic } from '@ai-sdk/anthropic';
import { createVfsTools } from '@grepticon/sdk/ai-sdk';
import { generateText } from 'ai';

const { token } = await client.tokens.mint(workspace, { ttlSeconds: 600 });

// Build a second client keyed by the minted token to read with its claims.
const session = new GrepticonClient({ apiKey: token }).session(workspace);

const { text } = await generateText({
  model: anthropic('claude-sonnet-5'),
  tools: createVfsTools(session),
  prompt: 'When do new hires finish account setup?',
});

console.log(text);

The complete script

Putting every step together:

quickstart.ts
import { anthropic } from '@ai-sdk/anthropic';
import { GrepticonClient } from '@grepticon/sdk';
import { createVfsTools } from '@grepticon/sdk/ai-sdk';
import { generateText } from 'ai';

// Authenticate with your grp_sk_ management key. baseUrl defaults to
// https://api.grepticon.com; pass it only to point at a self-hosted server.
const client = new GrepticonClient({
  apiKey: process.env.GREPTICON_API_KEY ?? '',
});

const workspace = 'handbook';

// Create a workspace (or make one in the console under Workspaces).
await client.workspaces.create(workspace);

// Push a file. Uploads are SDK/API-only and ingest asynchronously — the call
// returns immediately with status 'pending'.
await client.files.upload(
  workspace,
  'guides/onboarding.md',
  '# Onboarding\n\nNew hires finish account setup on day one.\n',
  { contentType: 'text/markdown' },
);

// Wait for ingestion before reading. waitForReady resolves once the targeted
// paths are 'ready' or 'error', and only throws on timeout — so check each
// returned entry for an ingest failure yourself.
const [file] = await client.files.waitForReady(workspace, {
  paths: ['guides/onboarding.md'],
});
if (file?.status === 'error') {
  throw new Error(`Ingestion failed: ${file.errorDetail ?? 'unknown error'}`);
}

// Mint a scoped, read-only grp_at_ token for the agent session. The default
// claims (['*']) see every file; narrow them once you start using visibility.
const { token } = await client.tokens.mint(workspace, { ttlSeconds: 600 });

// Read AS the token. client.session() reads with the credential THIS client
// holds (your grp_sk_ key) — it does not pick up the minted token. Build a
// second client keyed by the token to read with the token's claims.
const session = new GrepticonClient({ apiKey: token }).session(workspace);

// Hand the four read tools (ls / find / cat / grep) to the agent.
const { text } = await generateText({
  model: anthropic('claude-sonnet-5'),
  tools: createVfsTools(session),
  prompt: 'When do new hires finish account setup?',
});

console.log(text);

Run it and the agent will grep the workspace and answer from your file — no embeddings, no sandbox to boot.

Free-plan limits

So nothing surprises you mid-build, here's what the free plan allows:

LimitFree plan
Workspaces3
Account storage500 MiB
Reads (credential)60 requests / minute per credential
Reads (account)300 requests / minute per account

Read rate limits return 429 with a Retry-After header; the SDK retries those automatically. Upgrading to Pro lifts these caps. See Limits & support for the full breakdown.

Next steps

  • Access control — narrow a token's reach with the claims × visibility model, so an agent only sees the files it should.
  • SDK reference — the full GrepticonClient surface and createVfsTools.
  • Concepts — workspaces, the virtual filesystem, and read sessions.

Ready to point this at production? The end-to-end run above works unchanged against the hosted stack — the only thing you swap in is your own grp_sk_ key.

On this page