# Build Python AI Apps with inference.sh

Python teams need clear SDK guidance for AI apps, agents, streaming, files, and sessions. This skill gives Codex, Claude, and Claude Code practical patterns for inference.sh.

## Install

```bash
npx skillstore add inferen-sh/python-sdk
```

## Metadata

- Status: approved
- Slug: inferen-sh-python-sdk
- Skillstore revision: r1
- Version status: missing
- Tree hash: b315bc4f6d0f4363fa2ec3ff76dd651ece17b71b4f869f54e9a05ccf71c91a53
- Author: inferen-sh
- GitHub username: inferen-sh
- License: MIT
- Repository: https://github.com/inferen-sh/skills/tree/main/sdk/python-sdk/
- Ref: a06681402992ceae98ba04d54cfd4ab004862696
- Supported tools: Claude, Codex, Claude Code
- Audit status: complete
- Agent install advisory: confirmation\_required
- Manual install advisory: allowed
- Artifact signature: available
- Audit attestation: unavailable
- Human verification: not\_verified
- Risk factors: filesystem, env\_access, network, scripts, external\_commands
- Quality score: 38
- Quality tier: warning
- Public page: https://skillstore.pages.dev/skills/inferen-sh-python-sdk
- Manifest: https://skillstore.pages.dev/api/skills/inferen-sh-python-sdk/manifest

## Capabilities

- Explains how to install and authenticate the inferencesh Python package.
- Shows sync and async calls for running inference.sh apps.
- Documents streaming progress, task updates, and agent message callbacks.
- Covers file uploads, downloads, attachments, and temporary file cleanup.
- Guides agent creation with tools, skills, sessions, and human approval.
- Provides patterns for batching, retries, concurrency limits, and warm sessions.

## Use Cases

- Integrate AI Apps: Add inference.sh app calls to a Python backend with authentication, inputs, outputs, and error handling.
- Build Agent Workflows: Create agents with tools, sub-agents, skills, streaming callbacks, and human approval steps.
- Automate Batch Jobs: Process many prompts or files with async requests, concurrency limits, retries, and progress tracking.

## Prompt Templates

### Start a Python Client

```
Show me the shortest safe Python setup for running one inference.sh app with an environment API key.
```

### Add Streaming Updates

```
Help me add streaming progress updates for a long inference.sh task in a Python command line tool.
```

### Design an Agent Workflow

```
Design an inference.sh Python agent with one approved client tool, one app tool, and a clear tool result flow.
```

### Plan Production Integration

```
Review my planned Python integration for async requests, file uploads, retries, sessions, observability, and secret handling.
```

## Limitations

- It is documentation only and does not include the SDK source code.
- Examples require a valid inference.sh API key and account access.
- Some examples use placeholder app names that users must replace.
- Users must secure tool handlers, webhooks, and file paths in their own code.

## Best Practices

- Store API keys in environment variables or managed secrets, not source files.
- Require human approval for tools that send messages, write files, or call webhooks.
- Use concurrency limits, timeouts, and retries for long async or streaming workloads.

## Anti Patterns

- Do not evaluate agent supplied strings as Python code.
- Do not make uploaded files public unless the workflow requires public access.
- Do not keep sessions alive longer than the workload needs.

## Security Audit

- Audited at: 2026-07-06T15:03:59.259\+00:00
- Summary: Most static findings are false positives from Markdown code fences, placeholder API keys, documentation links, session IDs, and file handling examples. I confirmed two unsafe eval examples that evaluate agent supplied expressions, and added one semantic finding for the broad Bash allowlist. No prompt injection evidence was found in the reviewed files.

## Stats

- Views: 157
- Downloads: 8
- Favorites: 0
- Popularity score: 0
