Galya SDK
Browser ingest and REST client for Galya.
Galya models taste from how people actually engage with content—dwell, scroll depth, revisits, saves—not just clicks. The SDK has two jobs:
- Browser (
@galya/sdk) — tag UI components, collect signals, send batches to your ingest worker. - API (
@galya/agents) — search, index, and query via the Galya API. See openapi.yaml.
@galya/sdk
Browser events → ingest worker
@galya/agents
api.galya.io client + LLM tools
@galya/admin
Create workspaces via API
@galya/schema
Shared event types
Browser ingest
npm install @galya/sdkimport { GalyaSDK, galyaDefaultEventsEndpoint } from "@galya/sdk";
const galya = new GalyaSDK({
endpoint: galyaDefaultEventsEndpoint(), // POST …/v1/events
apiKey: process.env.GALYA_API_KEY!,
userId: "user_123", // your stable visitor id
});REST / agents
npm install @galya/agentsimport { GalyaApiClient } from "@galya/agents";
const api = new GalyaApiClient({ apiKey: process.env.GALYA_SECRET_KEY! });
await api.search(
{ relativeToEntityId: "ent_…", inTermsOfEntityType: "content" },
{ query: "minimalist coastal interiors" },
);