pygwalker AGENTS.md

A contributor guide for PyGWalker, a Python tool that turns pandas, Polars, or PyArrow tables into interactive charts in notebooks, Streamlit, and web apps. It maps the Python package, React frontend, setup, and development workflow.

In plain words
What is it for?
Use it to find the right files, run PyGWalker in development mode, understand how frontend builds are loaded by Python, and locate logs and deeper project documentation.
Why use it?
It gives coding agents the repository’s architecture and startup steps in one place, so they do not have to reconstruct how the Python and frontend parts connect.

Instructions file for CodexOpenCode

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/kanaries/pygwalker/agents-md
Clone the repo
git clone --depth 1 https://github.com/Kanaries/pygwalker

Made for: Codex, OpenCode.

Per session 2,990 This file is loaded in full into every session.
When invoked 2,990 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.02990 $0.02990
Opus 5 $0.01495 $0.01495
Sonnet 5 $0.00598 $0.00598
Haiku 4.5 $0.00299 $0.00299

Measured 2d ago against content hash a084b376225d, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

pygwalker AGENTS.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

AGENTS.md · 216 lines

How it starts

The opening of the file, as written. The whole thing — 216 lines — stays where its author put it; the contents beside it link to each section on GitHub.

AGENTS.md — PyGWalker contributor & agent guide

This is the fast-start map of the PyGWalker repo for both human contributors and coding agents. It explains how the project is put together, how to run it in dev mode with live frontend reload, and where all the logs go. Read this first — it is written to save you from re-deriving the architecture by grepping.

Deeper references: docs/ARCHITECTURE.md (how it is built), docs/DEVELOPMENT.md (dev workflow + troubleshooting), docs/CONTRIBUTING.md (validation & CI).


1. What PyGWalker is (30-second model)

PyGWalker turns a pandas / polars / pyarrow dataframe into an interactive Graphic Walker UI inside notebooks, Streamlit, and plain web servers. It has two halves that ship together:

  • Python package (pygwalker/) — public API (walk, render, table, Walker, to_html), data parsing, and the transports that talk to the UI.
  • Frontend app (app/, React + Vite) — the UI. It is compiled into JavaScript bundles that are checked into the wheel under pygwalker/templates/dist/ and loaded by the Python side at render time.

The Python side never renders charts itself; it hands built JS + serialized data to a notebook/browser and then answers data/spec requests over a message channel.


2. Repo map

Path What lives here
pygwalker/api/ Public entry points. adapter.py picks jupyter vs webserver; jupyter.py = notebook dispatch; walker.py = the reusable Walker; pygwalker.py = the core PygWalker.
pygwalker/services/ Rendering + display. anywidget_widget.py (default transport), render.py + templates/*.html (iframe transport), global_var.py (runtime globals), jupyter_display.py.
pygwalker/communications/ Kernel⇄frontend transports: anywidget_comm.py (default), hacker_comm.py (iframe), streamlit_comm.py, gradio_comm.py, reflex_comm.py. protocol.py is the shared message schema.
pygwalker/data_parsers/ Dataframe/connector adapters (pandas, polars, pyarrow, SQL, spark…).
pygwalker/templates/dist/ Build output (git-ignored). The JS bundles the Python side loads.
pygwalker/utils/ Helpers: frontend_assets.py (locate/load bundles), log.py (logging), encoders.
app/src/ Frontend source. index.tsx = entry; utils/communication.tsx = transports; dataSource/ = data ingest; interfaces/comm.generated.ts = generated protocol types; store/ = MobX state.
scripts/ dev.py (dev orchestrator), compile.sh (build frontend), local_ci.py (mirror CI), generate_comm_protocol_ts.py (regenerate protocol types).
tests/ Python tests + *.ipynb notebooks run by nbmake. app/tests/ holds Playwright smoke tests.

Read the full file on GitHub · 216 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 216 lines · 2,990 tokens per session scan A a084b376225d

Subscribe to this mod's changes

pygwalker AGENTS.md is an instructions file published in the GitHub repository Kanaries/pygwalker (15,953 stars, last pushed 22d ago), licensed Apache-2.0. It adds 2,990 tokens to every session, about $0.0149 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.