经 AI Skill Hub 精选评估,Windows Copilot API 获评「强烈推荐」。这款Agent工作流在功能完整性、社区活跃度和易用性方面表现出色,AI 评分 8.5 分,适合有一定技术背景的用户使用。
逆向工程Windows Copilot,兼容OpenAI API,访问GPT-4
Windows Copilot API 是一套完整的 AI Agent 自动化工作流方案。通过可视化的节点编排,将复杂的多步骤任务拆解为清晰的自动化流程,实现全程无人值守的智能处理。支持与数百种外部服务和 API 无缝集成,适合构建数据处理管线、业务自动化和 AI 辅助决策系统。
逆向工程Windows Copilot,兼容OpenAI API,访问GPT-4
Windows Copilot API 是一套完整的 AI Agent 自动化工作流方案。通过可视化的节点编排,将复杂的多步骤任务拆解为清晰的自动化流程,实现全程无人值守的智能处理。支持与数百种外部服务和 API 无缝集成,适合构建数据处理管线、业务自动化和 AI 辅助决策系统。
# 方式一:pip 安装(推荐)
pip install windows-copilot-api
# 方式二:虚拟环境安装(推荐生产环境)
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install windows-copilot-api
# 方式三:从源码安装(获取最新功能)
git clone https://github.com/sums001/Windows-Copilot-API
cd Windows-Copilot-API
pip install -e .
# 验证安装
python -c "import windows_copilot_api; print('安装成功')"
# 命令行使用
windows-copilot-api --help
# 基本用法
windows-copilot-api input_file -o output_file
# Python 代码中调用
import windows_copilot_api
# 示例
result = windows_copilot_api.process("input")
print(result)
# windows-copilot-api 配置文件示例(config.yml) app: name: "windows-copilot-api" debug: false log_level: "INFO" # 运行时指定配置文件 windows-copilot-api --config config.yml # 或通过环境变量配置 export WINDOWS_COPILOT_API_API_KEY="your-key" export WINDOWS_COPILOT_API_OUTPUT_DIR="./output"
---
pip install -r requirements.txt
```bash
playwright install chromium
Prefer a container? You can run the OpenAI-compatible server in Docker once you've signed in.
Sign in on the host first. The login step above opens a visible browser, which can't run inside the headless container — so runpython -m copilot loginon your host to populatesession/. The container mounts that folder and reuses the Cloudflare clearance earned on the host. It refreshes the chat token headlessly, but it can't earn fresh clearance without a visible browser, so when clearance expires (~30 min) it returns a503— re-runpython -m copilot loginon the host to refreshsession/.
```bash docker compose up --build
The simplest way if your code is already Python.
```python from copilot import CopilotClient
client = CopilotClient() # loads your signed-in session
Start a local server that speaks the OpenAI API, so existing OpenAI tools and SDKs work unchanged.
```bash python app.py

Using your own Microsoft Copilot account. No API key, no credits, no paid plan: it turns the free chat at copilot.microsoft.com into an API you can call from code.
You can use it in two ways:
client.chat("Hi"). Supports streaming and multi-turn conversations.http://localhost:8000/v1 that speaks the OpenAI format, so the official openai SDK (and any OpenAI-compatible app) works as a drop-in, with localhost in place of OpenAI.You sign in once in a browser with your Microsoft or Google account; your session is saved and refreshed automatically after that.
Unofficial project. Not affiliated with or endorsed by Microsoft. It automates the consumer Copilot web experience for personal use, so use it responsibly and within Microsoft's terms.
---
The [docker-compose.yml](docker-compose.yml) maps port `8000` and bind-mounts your `session/` so the login persists across restarts. Tune `RATE_LIMIT_RPM` / `RATE_LIMIT_BURST` there. To run without Compose, build and pass the same bindings by hand:
bash docker build -t windows-copilot-api . docker run --rm -p 8000:8000 -v "$(pwd)/session:/app/session" windows-copilot-api ```
---
Then point any OpenAI client at it (the API key is required by the SDK but ignored):
python from openai import OpenAI
client = OpenAI(base_url="http://localhost:8000/v1", api_key="unused")
resp = client.chat.completions.create( model="copilot", messages=[{"role": "user", "content": "Hello!"}], ) print(resp.choices[0].message.content)
Or call it with plain HTTP / `curl`:
bash curl http://localhost:8000/v1/chat/completions \ -H "Content-Type: application/json" \ -d '{"messages": [{"role": "user", "content": "Hello!"}]}' ```
Endpoints
| Method | Path | Description |
|---|---|---|
POST | /v1/chat/completions | Chat (supports "stream": true and an optional "conversation_id") |
GET | /v1/models | Lists the single copilot model |
Change the address with env vars:HOST=0.0.0.0 PORT=8080 python app.py, or runuvicorn server.api:app --host 0.0.0.0 --port 8080.
👉 More: examples/04_server_http.py, 05_server_stream.py, 06_server_openai_sdk.py
---
Cloudflare clearance is handled automatically (see above), so most "verify you're human" issues clear themselves. If a request still fails, run the diagnostic — it refreshes the session and writes a shareable report.
python tests/diagnostic.py # browser capture + report
python tests/diagnostic.py --report-only # headless/VPS: report only, no browser
The default run opens your signed-in browser and asks you to send one short message. That single action:
- Refreshes clearance: it drives a real browser on the same session/profile/ the bridge uses, so passing any "verify you're human" check earns a fresh cf_clearance cookie, then snapshots the session (cookies + token) into session/token.json for the pure-HTTP driver to adopt. - Captures the protocol to session/ws_capture.log. A clean turn goes setOptions → send → appendText… → done; a `{"event":"challenge", "method":"cloudflare",…}` frame means Cloudflare gated the turn.
It also writes session/diagnostic_report.txt — environment, the shape of your session (cookie names + token length, never the values), a live chat probe, and redacted log tails. Both files are safe to share: access tokens, cookies, OAuth codes, and emails are redacted before anything is written. Attach diagnostic_report.txt to a GitHub issue (skim it first) and the cause is usually obvious.
On a headless server/VPS you can't open a browser, so clearance can't be earned there — pass --report-only, and do the clearance step on a machine with a display (or route traffic through a residential connection, e.g. a home-PC exit node), since datacenter IPs are where Cloudflare is strictest.
---
高质量开源AI项目,兼容OpenAI API
AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。
建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。
✅ MIT 协议 — 最宽松的开源协议之一,可自由商用、修改、分发,仅需保留版权声明。
AI Skill Hub 点评:Windows Copilot API 的核心功能完整,质量优秀。对于自动化工程师和运维人员来说,这是一个值得纳入个人工具库的选择。建议先在非生产环境试用,再逐步推广。
| 原始名称 | Windows-Copilot-API |
| Topics | aiapicopilotllmpython |
| GitHub | https://github.com/sums001/Windows-Copilot-API |
| License | MIT |
| 语言 | Python |
收录时间:2026-06-27 · 更新时间:2026-06-27 · License:MIT · AI Skill Hub 不对第三方内容的准确性作法律背书。
选择 Agent 类型,复制安装指令后粘贴到对应客户端