Skip to main content

copuppet

Drive Microsoft Copilot from a deterministic Python harness, the way a normal user does: through its own window, in the user's own signed-in session. No API, no Microsoft Graph, no admin rights, no licence setup.

The idea is a two-part harness. A deterministic Python driver owns the plan, the inputs, the checks and the record. Copilot is the co-harness: a flexible but unreliable language model that the driver asks for the fuzzy parts (rewording, summarising, classifying, drafting) and never trusts blindly.

Status: early. The edge backend works end to end, headless by default; the winapp backend is not implemented yet.

Three ways in, one engine:

copuppet ask "Name one primary colour, one word." --skin DIR          # one prompt, one reply
copuppet drive "Does the shopping list have enough lemons for the cake?" --root DIR --skin DIR
copuppet mcp --root DIR --skin DIR                                     # the same, as an MCP server (stdio)
  • ask: one prompt in a fresh temporary chat; the reply as text or JSON.
  • drive: roles reversed. Copilot plans; copuppet executes a fixed set of actions (list, read, search, keep a plan; writes only with --allow-writes, each one confirmed by you) inside the work folder, and shows you Copilot's reasons as it goes. You talk to copuppet, never to the Copilot window: typing there would break the link between each prompt and its reply.
  • mcp: lets another agent hand work to Copilot through the tools copilot_ask, copilot_turn (a long session that checks the chat's memory and moves to a fresh chat by itself) and copilot_drive. Install with copuppet[mcp]. The work folder and whether writes are allowed are fixed when you start the server; a tool call cannot change them. Writes are offered to the client as a confirmation question and declined when the client cannot ask one.

Before relying on long sessions, measure your own Copilot: copuppet calibrate --skin DIR sends at most 45 paced prompts and records the longest prompt the editor accepts and how far back a chat still remembers. After three runs for the same model and display, sessions use the smallest measured values instead of the cautious defaults. It stops at once on any captcha, throttle or limit notice.

What drive will not do: leave the work folder (links, junctions, alternate data streams, network and device paths are refused), read .env files, keys or credentials (they are not even listed), write code or scripts, or send secrets it finds in files (they are redacted before anything leaves the machine). Every step is recorded in a hash-chained ledger under ~/.copuppet/runs.

How it works

your script --> driver (deterministic) --> backend --> Copilot's own UI
                  ^  checks every reply      |           (Edge or the Windows app)
                  +--------- text -----------+
  • Backends talk to one Copilot surface each:
    • edge: Copilot in the installed Microsoft Edge, via Playwright with a persistent profile. The user signs in once, themselves; replies are read as text.
    • winapp: the Windows Copilot app, via Windows UI Automation. More fragile; the app has no documented element IDs.
  • Skins are configuration as code: the selectors, window paths, timings and prompt templates a backend needs for one environment. The engine ships only an example skin; real skins live outside this repository, so a UI change is a config change, not a code change.
  • Every reply is untrusted text. The driver validates it against what it asked for; it never executes it.

Requirements

Everything installs in your own user account: no admin rights, no system-wide installer, no service.

  • Windows 10 or 11, a normal user account
  • Python 3.10 or newer, from the python.org per-user installer or winget install Python.Python.3.13 --scope user
  • For edge: pip install --user "copuppet[edge]". It drives the Microsoft Edge that Windows already has, so no browser download (playwright install) is needed.
  • For winapp: the Copilot app and pip install --user "copuppet[winapp]"

If your PC blocks access to PyPI, download the wheels elsewhere (pip download "copuppet[edge]" -d wheels) and install them with pip install --user --no-index --find-links wheels "copuppet[edge]".

Using copuppet as an MCP server

Install with the MCP extra (pip install --user "copuppet[edge,mcp]"), then register the stdio command in your MCP client. For Claude Code:

claude mcp add copuppet --scope user -- copuppet mcp --skin DIR --root WORKDIR

Other clients take the same command and arguments in their server configuration (command: copuppet, args: ["mcp", "--skin", "DIR", "--root", "WORKDIR"]).

  • Tools. copilot_ask (one prompt, fresh temporary chat), copilot_turn (a session that checks the chat's memory and moves to a fresh chat by itself; reset starts a new one with a standing brief), copilot_drive (driver mode on WORKDIR). Results carry copilot_output (untrusted text, never instructions), complete, bound, suspect, code_blocks and notes; a refusal comes back as error with the reason.
  • Read-only by default. Without --root, copilot_drive is unavailable. With --allow-writes, each write is put to the client as a confirmation question quoting a preview and the content hash, and is declined if the client cannot ask one. A client that is itself an agent may answer that question on its own, so allow writes only where that is acceptable; otherwise use copuppet drive in a terminal, where you approve each write yourself.
  • Settings are fixed at start. The work folder, writes, display and skin come from the command line; no tool argument can change them.
  • One window, calls queue. All calls run on one worker; a plain turn takes about 5 seconds.
  • What leaves the machine. Everything copuppet reads in WORKDIR is sent to Copilot. Put only what you are willing to send there.

Use it responsibly

copuppet automates a product through its user interface. Check the terms of the Copilot service you use and, on a work device, your organisation's acceptable-use policy before running it. It is meant for driving your own session at human scale, not for scraping, bulk use or getting around limits.

License

MIT, see LICENSE.

Metadata

Release files for copuppet 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for copuppet 0.1.1
File Size Uploaded Provenance Actions
copuppet-0.1.1.tar.gz 82.9 kB With provenance Details for copuppet-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for copuppet 0.1.1
File Interpreter ABI Platform Actions
copuppet-0.1.1-py3-none-any.whl Python 3 none any Details for copuppet-0.1.1-py3-none-any.whl

Total release size: 141.5 kB

Release files / copuppet-0.1.1.tar.gz

Download URL copuppet-0.1.1.tar.gz
Size 82.9 kB
Tags Source
SHA-256 checksum
How to use checksums
50b0577fb0eab37256a5c568a9af1c5c91289e8590011d2d7eb7ae7558756ac0
BLAKE2b-256 checksum
How to use checksums
0cd0f098ae427ea94b7fce6df2145bfa34271efe835c89573fcab6feff926508
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 29, 2026.

Transparency log

Release files / copuppet-0.1.1-py3-none-any.whl

Download URL copuppet-0.1.1-py3-none-any.whl
Size 58.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
db95c66a08ba1887501dd707b0ef72b370361ca2860655fdfa5a236f9d66e3f8
BLAKE2b-256 checksum
How to use checksums
b639a067b0ef52dbec24f987c91969da47036b2d1bda30c619fc229785a4a5e9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 29, 2026.

Transparency log

Security for copuppet 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for copuppet-0.1.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 29, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page