Token导航 LogoToken导航TokenDH.com
研究检索敏感数据github未标认证来源可访问许可证需确认审计通过

galileo-typescript-sdkgalileo TypeScript SDK 搜索

Agent Skill

galileo-typescript-sdk 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

256

周安装

11

GitHub Stars

公开资料未说明

下载量

90
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:galileo-typescript-sdk(galileo TypeScript SDK 搜索)
来源仓库:https://github.com/gyanesh-m/skills
仓库路径:skills/galileo-typescript-sdk
安装命令:
npx skills add https://github.com/gyanesh-m/skills --skill galileo-typescript-sdk
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/gyanesh-m/skills --skill galileo-typescript-sdk

简介

galileo-typescript-sdk 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中快速定位候选结果。

  • 适用于需要根据关键词或任务场景从来源线索中获取信息的场景。
  • 通过 npx skills add 命令安装,需结合原始 README 核验具体用法。
  • 安装前建议确认权限范围、维护状态及是否触发联网或文件读写操作。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

Galileo TypeScript SDK

The Galileo TypeScript SDK (galileo) provides evaluation and observability workflows for GenAI applications in Node.js and TypeScript. It supports logging LLM calls, retriever operations, tool invocations, and multi-step workflows with built-in scoring.

Additional references:

Installation

npm install galileo

Or with yarn/pnpm:

yarn add galileo
pnpm add galileo

Quick Start

import { wrapOpenAI, init, flush } from "galileo";
import OpenAI from "openai";

await init({ projectName: "my-project", logstream: "my-log-stream" });

const openai = wrapOpenAI(new OpenAI());
const response = await openai.chat.completions.create({
  model: "gpt-4o",
  messages: [{ role: "user", content: "Explain quantum computing in one sentence." }],
});

console.log(response.choices[0].message.content);

await flush();

Authentication

Set the following environment variables in your .env file or shell:

GALILEO_API_KEY="your-api-key"            # Required — from Galileo console
GALILEO_CONSOLE_URL="https://app.galileo.ai"  # Console URL (or self-hosted)

Alternative authentication via username/password:

GALILEO_USERNAME="your-username"
GALILEO_PASSWORD="your-password"

Observability

Wrapped OpenAI Client (Auto-Logging)

The simplest way to trace all OpenAI calls — wrap the client and all calls are logged automatically:

import { wrapOpenAI, init, flush } from "galileo";
import OpenAI from "openai";

await init({ projectName: "my-project", logstream: "production" });

const openai = wrapOpenAI(new OpenAI());
const response = await openai.chat.completions.create({
  model: "gpt-4o",
  messages: [{ role: "user", content: "What is RAG?" }],
});

await flush();

Azure OpenAI is also supported via wrapAzureOpenAI.

The log() Function Wrapper

Wrap any function to log its execution as a span. Supports sync, async, and generator functions:

import { log, init, flush } from "galileo";

await init({ projectName: "my-project", logstream: "production" });

const retrieveDocuments = log(
  { spanType: "retriever", name: "vector-search" },
  async (query: string) => {
    const results = await vectorDb.search(query, { k: 5 });
    return results.map((r) => r.content);
  }
);

const generateResponse = log(
  { spanType: "llm", name: "gpt-4o-call" },
  async (query: string, context: string[]) => {
    const openai = new OpenAI();
    const response = await openai.chat.completions.create({
      model: "gpt-4o",
      messages: [{ role: "user", content: `Context: ${context.join("\n")}\n\nQuestion: ${query}` }],
    });
    return response.choices[0].message.content;
  }
);

const ragPipeline = log(
  { spanType: "workflow", name: "rag-pipeline" },
  async (query: string) => {
    const docs = await retrieveDocuments(query);
    return generateResponse(query, docs);
  }
);

await ragPipeline("What are the benefits of RAG?");
await flush();

Supported span types: workflow, llm, retriever, tool, agent.

GalileoLogger (Manual Spans)

For fine-grained control, use GalileoLogger directly to build traces with explicit spans:

import { GalileoLogger } from "galileo";

const logger = new GalileoLogger({
  projectName: "my-project",
  logStreamName: "production",
});

logger.startTrace({ input: "Calculate 15 * 42" });

logger.addToolSpan({
  input: "15 * 42",
  output: "630",
  durationNs: 50000000,
});

logger.addLlmSpan({
  input: "The math tool returned 630. Respond to the user.",
  output: "15 multiplied by 42 equals 630.",
  durationNs: 800000000,
  model: "gpt-4o",
});

logger.conclude({ output: "15 multiplied by 42 equals 630." });

await logger.flush();

Available span methods: addLlmSpan, addRetrieverSpan, addToolSpan, addWorkflowSpan, addAgentSpan, addProtectSpan.

Context API

Use galileoContext for scoped lifecycle management:

import { galileoContext } from "galileo";

await galileoContext.init({ projectName: "my-project", logstream: "production" });

// ... trace your calls ...

await galileoContext.flush();
await galileoContext.reset();

Sessions

Group related traces into sessions for multi-turn conversations:

import { init, flush, startSession, setSession, clearSession } from "galileo";

await init({ projectName: "my-project", logstream: "production" });

const sessionId = await startSession({ name: "user-conversation-123" });

// All traces created between setSession and clearSession are grouped
setSession(sessionId);
// ... log your traces ...
clearSession();

await flush();

Evaluation

Running an Experiment

Use runExperiment to evaluate your LLM pipeline against a dataset with automated scoring:

import { runExperiment, GalileoMetrics } from "galileo";

const result = await runExperiment({
  name: "qa-eval-run",
  datasetName: "my-test-dataset",
  metrics: [GalileoMetrics.contextAdherence, GalileoMetrics.completeness, GalileoMetrics.inputToxicity],
  projectName: "eval-project",
  function: async (input) => {
    const response = await callYourLLM(input.question);
    return response;
  },
});

console.log("Experiment link:", result.link);

Experiment with Inline Dataset

import { runExperiment, GalileoMetrics } from "galileo";

const result = await runExperiment({
  name: "rag-eval",
  dataset: [
    { question: "What is ML?", expected: "Machine learning is..." },
    { question: "Explain AI", expected: "Artificial intelligence is..." },
  ],
  metrics: [GalileoMetrics.contextAdherence, GalileoMetrics.chunkAttributionUtilization, GalileoMetrics.completeness],
  projectName: "eval-project",
  function: async (input) => {
    const docs = await retrieve(input.question);
    return generateAnswer(input.question, docs);
  },
});

Experiment with Prompt Template

import { runExperiment, GalileoMetrics } from "galileo";

const result = await runExperiment({
  name: "prompt-eval",
  datasetName: "my-test-dataset",
  promptTemplate: { id: "your-prompt-template-id" },
  promptSettings: { model_alias: "GPT-4o", temperature: 0.7 },
  metrics: [GalileoMetrics.correctness, GalileoMetrics.instructionAdherence],
  projectName: "eval-project",
});

See Advanced Evaluation Patterns for more.

Common Patterns

RAG Pipeline with Retriever Spans

import { GalileoLogger } from "galileo";

const logger = new GalileoLogger({
  projectName: "rag-app",
  logStreamName: "production",
});

logger.startTrace({ input: "How does photosynthesis work?" });

logger.addRetrieverSpan({
  input: "How does photosynthesis work?",
  output: ["Photosynthesis is the process by which plants..."],
});

logger.addLlmSpan({
  input: "Using the context, explain photosynthesis.",
  output: "Photosynthesis is a process used by plants...",
  durationNs: 1500000000,
  model: "gpt-4o",
});

logger.conclude({ output: "Photosynthesis is a process used by plants..." });
await logger.flush();

Nested Agent Workflows

import { GalileoLogger } from "galileo";

const logger = new GalileoLogger({
  projectName: "agent-app",
  logStreamName: "production",
});

logger.startTrace({ input: "Research and summarize quantum computing" });

logger.addToolSpan({
  input: "search: quantum computing overview",
  output: "Search results...",
  durationNs: 200000000,
});

logger.addRetrieverSpan({
  input: "quantum computing",
  output: ["Doc1: Quantum bits...", "Doc2: Superposition..."],
});

logger.addLlmSpan({
  input: "Summarize the following research on quantum computing...",
  output: "Quantum computing leverages quantum mechanical phenomena...",
  durationNs: 2500000000,
  model: "gpt-4o",
});

logger.conclude({
  output: "Quantum computing leverages quantum mechanical phenomena...",
});

await logger.flush();

Best Practices

  1. Call init() or create a GalileoLogger before logging any traces.
  2. Always call flush() at the end to upload traces to Galileo. In web servers, flush at the end of each request handler.
  3. Use wrapOpenAI for zero-config automatic tracing of all OpenAI calls.
  4. Use log() to wrap functions as spans — it handles sync, async, and generator functions automatically.
  5. Use GalileoLogger when you need fine-grained control over individual spans.
  6. Use runExperiment for evaluation runs — it handles dataset loading, scoring, and result upload.
  7. Set environment variables in .env files rather than hardcoding API keys.
  8. Use accurate durationNs values when manually creating spans for meaningful latency tracking.

Legacy API

GalileoObserveWorkflow and GalileoEvaluateWorkflow are deprecated but still exported for backward compatibility. Use GalileoLogger (or wrapOpenAI / log()) and runExperiment instead.

Resources

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

37.77%
按下载量换算34

Claude

28.61%
按下载量换算26

Cursor

18.04%
按下载量换算16

Gemini CLI

8.6%
按下载量换算8

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills