cognitedata avatar

Setup Python Tools

Adds client-side Python tool execution to Flows apps via Pyodide. This is the follow-up to integrate-atlas-chat when your agent has Python tools defined in its CDF config. It installs Pyodide 0.29.3, sets up the usePyodideRuntime hook with loading states, and wires pythonRuntime into useAtlasChat. No manual tool configs needed since the library fetches Python code directly from the agent's config. First load is slow (30MB download), but it caches. The skill is opinionated about UI placement: loading indicators go above the input, not in the message list, and the entire input area should be disabled while Python initializes.

skills.sh installs
1.9K
GitHub stars
6
last updated
Aug 21, 2026

Install

$ npx -y skills add cognitedata/builder-skills --skill setup-python-tools --agent claude-code

Installs into .claude/skills of the current project.

Files

Set Up Python Tool Execution

Add client-side Pyodide execution for $ARGUMENTS. Skip this if the app uses the Atlas / EOS sidebar (integrate-fusion-agent).

Prerequisite: src/atlas-agent/ from integrate-atlas-chat, plus @sinclair/typebox. Copy python.ts, pyodide.ts, pyodide-react.ts, pyodide-runtime.ts from integrate-atlas-chat/code/ into src/atlas-agent/.

CDF runPythonCode tools arrive as toolConfirmation + clientTool. Wire usePyodideRuntime and pass pythonRuntime to useAtlasChat — no PythonToolConfig entries. Pyodide is ~30MB, cached after first load.


Step 1 — Understand the app

Read these files before touching anything:

  • package.json — detect package manager and existing deps
  • The component that calls useAtlasChat — understand current tools/config

Step 2 — Install Pyodide

Install exactly pyodide@0.29.3 using the app's package manager. This version must match the CDN artifacts loaded at runtime — installing a different version will cause errors.

  • pnpm → pnpm add pyodide@0.29.3
  • npm → npm install pyodide@0.29.3
  • yarn → yarn add pyodide@0.29.3

Sponsors

Details

Repository
github.com/cognitedata/builder-skills
Categories
AI & Agent Building, Python
First seen
Jun 3, 2026

More from cognitedata/builder-skills

All 26
1sfkislev avatarAdobesfkislev/flueControl Adobe desktop apps - Photoshop, Illustrator, Premiere, After Effects, InDesign, Audition - from the shell via Flue, without an MCP server.1.9Kskills.sh installs
2cognitedata avatargraph-viewercognitedata/builder-skillsIntegrate the reusable CDF graph viewer (useGraphViewer) into a Flows app by copying the local code bundle. Use when embedding a graph visualization, adding a k1.9Kskills.sh installs
3cognitedata avatarcreate-client-toolcognitedata/builder-skillsMUST be used whenever creating an AtlasTool (client-side tool) for an Atlas agent. Do NOT manually write AtlasTool definitions or wire them into useAtlasChat — 1.9Kskills.sh installs
4phuryn avatarintended-vs-implementedphuryn/pm-skillsThe method for finding the gap between what a system is supposed to do and what the code actually does — the class of bug generic scanners miss because they hav1.9Kskills.sh installs
5buildgreatproducts avatardesign-systembuildgreatproducts/builder-osTranslates an image (or a set of image references — screenshots, mockups, Figma URLs, live websites) into two mirrored design-system artifacts: `docs/design.md`1.9Kskills.sh installs
6mindrally avatardeep-learning-pytorchmindrally/skillsExpert guidance for deep learning, transformers, diffusion models, and LLM development with PyTorch, Transformers, Diffusers, and Gradio.1.9Kskills.sh installs