# python-sdk

python-sdk teaches your coding assistant how to use the inference.sh Python package to run generative apps and assemble agents.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode, Windsurf (Devin Desktop), Claude.ai · 241 installs · ★ 31 repo stars
- Author: 101-skills
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/101-skills/superpowers/tree/HEAD/sdk/python-sdk/SKILL.md
- Updated: 2026-08-31
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/skills/python-sdk

## What it does

This skill supplies coding agents with ready patterns for the `inferencesh` library. It covers calling hosted models synchronously or via streaming logs, launching tasks without blocking, and maintaining warm workers using sessions with timeouts up to 3600 seconds. File paths passed into app inputs upload automatically.

The reference includes patterns for building ad-hoc agents on top of core models such as Claude Sonnet 4 or GPT-4o. You can register custom tools, attach sub-agents, trigger external webhooks, and enforce human approval before sensitive actions run.

Running the resulting code requires Python 3.8 or newer and an `INFERENCE_API_KEY` token set in your environment.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add 101-skills/superpowers --skill python-sdk -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/python-sdk/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/python-sdk/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add 101-skills/superpowers --skill python-sdk -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/python-sdk/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add 101-skills/superpowers --skill python-sdk -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/python-sdk/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install 101-skills/superpowers sdk/python-sdk/SKILL.md
```

2. **Manually: put the files in place**
- File: `.github/skills/python-sdk/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add 101-skills/superpowers --skill python-sdk -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/101-skills/superpowers --path sdk/python-sdk
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/python-sdk/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add 101-skills/superpowers --skill python-sdk -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/101-skills/superpowers/tree/HEAD/sdk/python-sdk/SKILL.md

## When to use it
- execute hosted AI models through the inference.sh Python client
- stream execution logs and task progress directly in terminal apps
- create multi-turn agents with tool calling and human confirmation steps
- handle automatic file uploads and stateful worker sessions

## Example prompts
- Write a Python script using inferencesh to run infsh/flux-1-dev with streaming progress.
- Create an ad-hoc agent backed by infsh/gpt-4o that calls a custom Slack webhook tool.
- Show how to start a stateful inference.sh session with a 300-second idle timeout.

## Similar
- [sap-cloud-sdk-ai-python](https://affpapa.org/en/nevibecode/skills/sap-cloud-sdk-ai-python.md) — skill · 727 installs
- [azure-sdk-python](https://affpapa.org/en/nevibecode/plugins/azure-sdk-python.md) — plugin · ★ 3232 repo stars
- [aws-sdk-python-usage](https://affpapa.org/en/nevibecode/skills/aws-sdk-python-usage.md) — skill · 8800 installs
- [copilot-sdk-python](https://affpapa.org/en/nevibecode/rules/copilot-sdk-python.md) — rule · ★ 41430 repo stars
- [dataverse-sdk-for-python](https://affpapa.org/en/nevibecode/plugins/dataverse-sdk-for-python.md) — plugin · ★ 41430 repo stars
- [sentry-python-sdk](https://affpapa.org/en/nevibecode/skills/sentry-python-sdk.md) — skill · 2700 installs

From the same set: [101-skills/superpowers](https://affpapa.org/en/nevibecode/by/101-skills/superpowers.md) — 81 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
