Skip to main content

Graphsignal context client for AI agents

Project description

Graphsignal Context Client

CLI for Graphsignal: login (store API key), query signal context, and fetch signal guide content from api.graphsignal.com. You can also install a skill so your AI coding agent (Cursor, Claude Code, Codex, etc.) can run the CLI and use the returned context to help optimize inference, profiles, or errors.

Install

pip install graphsignal-context

Or install as an isolated CLI tool with uv:

uv tool install graphsignal-context

Usage

Login

Store your Graphsignal API key in ~/.graphsignal/config.yml:

graphsignal-context login

You will be prompted for your API key.

Signals

Query signal context for a time range. Requires being logged in.

graphsignal-context signals --start 2026-03-10T00:00:00Z --end 2026-03-12T00:00:00Z

Optional --tags filter (semicolon-separated key:value pairs). Tags must match exactly the tags sent to Graphsignal when the app was instrumented:

graphsignal-context signals --start 2026-03-10T00:00:00Z --end 2026-03-12T00:00:00Z --tags "env:prod"

The command calls GET /api/v1/context/signals/ on https://api.graphsignal.com with start_time_ns, end_time_ns, and optional tags, and prints the response context.

Guide

Fetch guide content about signals.

graphsignal-context guide

The command calls GET /api/v1/context/guide/ on https://api.graphsignal.com and prints the returned text.


AI agent integration

Install the Graphsignal skill so your AI coding agent can run graphsignal-context signals for a time range and use the returned context (profiles, errors, traces) to help you optimize.

Claude Code — Clone the repo into Claude's personal skills directory:

git clone https://github.com/graphsignal/graphsignal-context ~/.claude/skills/graphsignal-context

Other agents (Cursor, Codex, Gemini) — Use the skills.sh registry:

npx skills add graphsignal/graphsignal-context

Install the CLI first (pip install graphsignal-context or uv tool install graphsignal-context), then run graphsignal-context login with your API key.

Supported agents

  • Cursor — Use the skill when working in Cursor with agent/composer.
  • Claude Code — Use with Claude Code (e.g. via Claude CLI or supported IDEs).
  • Codex — Use with Codex agent workflows.
  • Gemini CLI — Use with Gemini from the command line.

Example prompts

Once the skill is installed, you can ask the agent to:

  • Find the root cause of a latency spike — e.g. "Fetch Graphsignal data for the last 2 hours and find the root cause of the latency spike" or "What's causing the slowdown? Use Graphsignal signal context from 10am to noon today."
  • Explain errors or failures — e.g. "Get signal context for the last 24 hours and summarize any errors or failures" or "Why did inference fail around 3pm? Pull Graphsignal data for that window."
  • Inspect profiles and bottlenecks — e.g. "Get Graphsignal context for yesterday and identify the main performance bottlenecks" or "Which operations are taking the most time? Use Graphsignal data from the last 6 hours."

The agent will call graphsignal-context signals --start <ISO> --end <ISO> (and optional --tags when you specify deployment or service tags), then analyze the returned context to answer your question.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

graphsignal_context-0.1.4.tar.gz (4.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

graphsignal_context-0.1.4-py3-none-any.whl (6.3 kB view details)

Uploaded Python 3

File details

Details for the file graphsignal_context-0.1.4.tar.gz.

File metadata

  • Download URL: graphsignal_context-0.1.4.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.3.4 CPython/3.10.20 Linux/6.17.0-1010-azure

File hashes

Hashes for graphsignal_context-0.1.4.tar.gz
Algorithm Hash digest
SHA256 dc1172f618c1198a9f93d430592c8b28a79daa1207ea4dc95004162adabe25ff
MD5 6f69d4d5db689354781c6b87dd21edc9
BLAKE2b-256 5d9aec6d92e907af42f6d184167d4a028a8fe856662eb918cd6b75897fc2b3a6

See more details on using hashes here.

File details

Details for the file graphsignal_context-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: graphsignal_context-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 6.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.3.4 CPython/3.10.20 Linux/6.17.0-1010-azure

File hashes

Hashes for graphsignal_context-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 a0b58e8daa0aafdf75b362bcc7176d2d8f34b3a34f7d0d8551423cfc6052cd1d
MD5 86cee46da9e90104db6bfd16e70df880
BLAKE2b-256 4255eb9c006884aa9db3d390020c24e347114e9276c107a723abcfacf4d66e54

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page