Metadata-Version: 2.4
Name: smartypants-network
Version: 0.1.1
Summary: Use when an agent needs cheap, exact open-model AI calls (OpenAI-compatible, priced per token). Smarty Pants: exact open models priced per token, plus sealed Linux workspaces on idle Macs. Standard library only.
License: MIT
Project-URL: Homepage, https://smartypants.network/docs/agents
Project-URL: Source, https://github.com/Howcanio/smarty-pants
Keywords: llm,openai-compatible,mcp,agents,sandbox,apple-silicon,langchain,embeddings,open-models
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# smartypants-network (Python)

The [Smarty Pants](https://smartypants.network/docs/agents) Python kit as an installable package.
Python 3.8 or newer, standard library only.

```sh
pip install smartypants-network
```

```python
from smartypants_network import SmartyPants
sp = SmartyPants()                       # reads SMARTYPANTS_API_KEY
print(sp.ask("Say hello in five words."))
with sp.workspace(minutes=10) as ws:     # one VM, many commands (our own account first)
    ws.put_file("data.txt", "hello")
    print(ws.run("sh", "cat data.txt | wc -c")["stdout"])
```

## When to use it

- **Use it for** everyday AI calls where an exact open model is good enough and price matters:
  summaries, extraction, classification, drafting, tool calls, JSON output, embeddings and reranking.
  Work that can wait goes in a batch at half the per-token price.
- **Don't use it for** work that needs a frontier-size model, more context than a model lists,
  or strict latency. Keep your current provider for those, and as a fallback.
- Requests run on Macs owned by other people: don't send secrets or personal data unless the
  person you work for has approved it. Check `is_ready` on https://smartypants.network/v1/models first.
- Framework setups (LangChain, OpenAI Agents SDK, Vercel AI SDK, LlamaIndex, Claude Code):
  https://smartypants.network/docs/agents#frameworks

The module is `smartypants_network`, not `smartypants`, because PyPI already has an unrelated
`smartypants` package. The one-file download at https://smartypants.network/kits/smartypants.py
keeps `from smartypants import SmartyPants`.

For the command line, use the `smartypants` tool from the npm package (see `packages/cli`).

Build from the repo root:

```sh
node packages/cli/scripts/sync-kits.mjs          # copies apps/gateway/agent-kit/smartypants.py here
python3 -m pip wheel --no-deps -w packages/python/dist packages/python
```

MIT licence. Published by the "Publish agent packages" workflow; bump `version` in pyproject.toml first.
