aicortex(Python daemon)
用已批准的 python.exe 跑本地 agent runtime(跨 Windows / macOS / Linux),无需 Docker。
PyPI 包名是 aicortex-daemon(aicortex 与已有包 ai-cortex 过近被拒);模块名仍是 aicortex。命令行用模块方式,避免与 Go CLI 二进制抢 PATH:
pip install aicortex-daemon
python -m aicortex --help
安装
从 PyPI
pip install -U aicortex-daemon
从源码(本仓库)
cd python-daemon
pip install -e .
# 或带发布工具:
pip install -e ".[dev]"
运行
# 方式 A:经 Go aicortex CLI(推荐;需已 pip 安装本包)
$env:AICORTEX_DAEMON_BACKEND = "python"
aicortex daemon start
aicortex daemon status
aicortex daemon stop
# 方式 B:直接启动
python -m aicortex start --foreground
python -m aicortex capabilities
python -m aicortex --version
需要 ~/.aicortex/config.json(token + server_url)以及 PATH 上的 agent CLI。
Health 默认端口 19514(与 Go / aicortex daemon status 一致)。不要与 Go daemon 同时跑在同一端口。
发布到 PyPI(对齐 aicorkit / aicortex-bridge)
在 python-daemon/ 目录:
python -m pip install -U build twine
python -m build
python -m twine upload dist/*
版本号改 pyproject.toml 的 version 与 aicortex/__init__.py 的 __version__(保持一致),再重新 build / upload。
已对齐能力(相对 Go daemon)
- 注册/心跳/wakeup/claim/cancel、agentEnv、prior_work_dir 复用
- Claude(stream-json + MCP
--mcp-config)、Codex(+ semantic inactivity) - Cursor/Gemini/OpenCode/Copilot stream-json/json 事件流
- Cursor/Kiro chat ACP 池;Kiro/Hermes/Kimi/Dsh ACP oneshot
- OpenClaw / pi 启动参数;OpenClaw config fail-closed
- Repo:allowlist + per-workspace bare + worktree 锁 + co-authored hook
- Design:handoff zip + example seed
- Model list:ACP discovery + 60s cache
- GC:
.gc_meta.json+ active-root 保护 - Wakeup 侧带:tunnel、artifact browse/chunk upload、terminal(pipe MVP,需
AICORTEX_DAEMON_TERMINAL_PTY=true)
仍偏薄 / partial:真正的 ConPTY/unix PTY(现为 pipe shell)、OS sandbox wrapper(bwrap/Seatbelt)、Go 式 auto-update(用 pip install -U aicortex-daemon)。
环境变量(节选)
| 变量 | 含义 |
|---|---|
AICORTEX_DAEMON_BACKEND |
python 时 aicortex daemon start 启 Python daemon |
AICORTEX_DAEMON_HEALTH_PORT |
默认 19514 |
AICORTEX_DAEMON_TERMINAL_PTY |
true 启用远程终端(pipe MVP) |
AICORTEX_AGENT_IDLE_WATCHDOG |
无活动强停秒数(默认 300;0 关闭) |
AICORTEX_CODEX_SEMANTIC_INACTIVITY_TIMEOUT |
Codex 无输出强停(默认 600;0 关闭) |
AICORTEX_CODEX_MULTI_AGENT |
1 保留 Codex native multi_agent |
AICORTEX_INJECT_TENCENT_DOCS |
1 注入完整 tencent-docs 包 |
AICORTEX_GC_* |
GC 开关与 TTL |
Metadata
Release files for aicortex-daemon 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| aicortex_daemon-0.1.0.tar.gz | 110.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| aicortex_daemon-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 240.6 kB
Release files / aicortex_daemon-0.1.0.tar.gz
| Download URL | aicortex_daemon-0.1.0.tar.gz |
|---|---|
| Size | 110.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f4d2673989a9a9ef913b59f73d4c98c1c8ddf2eb61a4f99ca26026920a2a4da9
|
|
BLAKE2b-256 checksum How to use checksums |
fac50d96c1721fb585dcff9b016008d43d5fd7536af479c8c88d95d8103bb182
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.10
|
Release files / aicortex_daemon-0.1.0-py3-none-any.whl
| Download URL | aicortex_daemon-0.1.0-py3-none-any.whl |
|---|---|
| Size | 129.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b0d9515a8a31b79c6229fee91bf27b52720b50e5f2e442f5aae46237fcd016db
|
|
BLAKE2b-256 checksum How to use checksums |
7e3a168e9f15fa9b739236b9c330ac899806642dc4409c194500e352b466f25b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.10
|