Galileo Python SDK for Openclaw

A unified Python interface for the Galileo AI platform to evaluate, observe, and protect generative AI applications throughout their lifecycle.

gyanesh-m
v1.2.1
Apr 13, 2026
0
753
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install galileo-python-sdk

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install galileo-python-sdk using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Galileo Python SDK?

The Galileo Python SDK is a robust library designed to help developers integrate the Galileo AI platform directly into their Python-based AI workflows. When building with Openclaw Skills, this SDK provides critical visibility into LLM performance by enabling automatic tracing, custom span logging, and production-grade observability. It allows developers to monitor hallucinations, toxicity, and PII in real-time while providing a structured framework for prompt evaluation and experimentation. This skill ensures that your GenAI applications are not only functional but also safe, reliable, and optimized for performance.

Galileo Python SDK Use Cases

  • Automatically tracing OpenAI or Anthropic calls to monitor latency and token usage within Openclaw Skills.
  • Implementing runtime guardrails to prevent toxic content or PII from reaching end users.
  • Conducting prompt engineering experiments to compare different model versions and templates.
  • Monitoring RAG pipelines by capturing retriever-specific spans and context relevance.
  • Debugging complex agentic workflows using nested decorators to visualize function execution paths.

How Galileo Python SDK Works

  1. Initialization: The developer initializes the galileo_context with a specific project and log stream identifier.
  2. Instrumentation: The SDK instruments the code using the @log decorator or wrapped clients (like the Galileo-wrapped OpenAI client) to capture telemetry.
  3. Execution: As the application runs, the SDK captures metadata, inputs, and outputs for every LLM interaction or tool call.
  4. Processing: For runtime protection, the SDK sends payloads to the Galileo Protect service to evaluate them against predefined rulesets.
  5. Synchronization: The developer calls the flush method to upload all captured traces and spans to the Galileo Console for analysis.

Galileo Python SDK Setup

Install the core SDK and optional modules for protection or legacy support using pip:

# Core SDK installation
pip install galileo

# Optional: Runtime guardrails
pip install galileo-protect

# Optional: Legacy evaluation interface
pip install promptquality

Configure your environment variables to authenticate with the Galileo platform:

export GALILEO_API_KEY="your-api-key"
export GALILEO_CONSOLE_URL="https://app.galileo.ai"

Galileo Python SDK Data Schema & Taxonomy

The SDK organizes data into a hierarchical structure to facilitate easy analysis within the Openclaw Skills ecosystem:

Level Description
Project The top-level container for a specific application or initiative.
Log Stream A logical grouping of traces, often divided by environment (dev/prod) or team.
Trace A single end-to-end execution of a workflow or request.
Span Individual units of work within a trace, categorized by type (llm, retriever, tool, or workflow).
Metadata Custom key-value pairs attached to spans for advanced filtering and grouping.

Galileo Python SDK Advanced Features

  • Wrapped OpenAI Client: Provides zero-config automatic tracing of all OpenAI library calls.
  • Protection Stages: Define central or local guardrail stages to enforce safety rules during runtime.
  • Custom Scorer Integration: Attach specialized metrics like Hallucination Index or Context Adherence to evaluation runs.
  • Async Support: Native support for asynchronous programming with ainvoke_protect and async-compatible logging.
  • Multi-turn Support: Track conversational history and state across complex, multi-step agent interactions.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*