[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-2293":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":13,"contributorsCount":13,"subscribersCount":13,"size":13,"stars1d":13,"stars7d":13,"stars30d":15,"stars90d":13,"forks30d":13,"starsTrendScore":13,"compositeScore":16,"rankGlobal":10,"rankLanguage":10,"license":10,"archived":17,"fork":17,"defaultBranch":18,"hasWiki":19,"hasPages":17,"topics":20,"createdAt":10,"pushedAt":10,"updatedAt":29,"readmeContent":30,"aiSummary":31,"trendingCount":13,"starSnapshotCount":13,"syncStatus":32,"lastSyncTime":33,"discoverSource":34},2293,"paragents","FrankHui\u002Fparagents","FrankHui","Parallel ai-agent sessions in one panel, with permission-aware tools, preflight conflict checks.","",null,"Python",292,0,102,87,45.7,false,"main",true,[21,22,23,24,25,26,27,28],"agent-runtime","ai-agent","asyncio","llm","multi-agent","parallel-agents","python","tui","2026-06-12 04:00:14","\u003Cp align=\"center\">\n  \u003Cimg src=\"assets\u002Flogo.png\" alt=\"Paragents Logo\"\u002F>\n\u003C\u002Fp>\n\n\u003Cp align=\"center\">\u003Cstrong>\nParallel agent sessions in one panel, with permission-aware tools, preflight conflict checks.\n\u003C\u002Fstrong>\u003C\u002Fp>\n\n\u003Cp align=\"center\">\nRemembers context across turns. Asks before risky actions. Runs parallel sessions with conflict-safe execution.\n\u003Cbr \u002F>\nTUI-first workflow, extensible tools, and explicit policy gates.\n\u003C\u002Fp>\n\n\u003Cp align=\"center\">\n  Inspired by 4 other agent repos:\n  \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fanthropics\u002Fclaude-code\">claude-code\u003C\u002Fa>,\n  \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fcosmicstack-labs\u002Fmercury-agent\">mercury-agent\u003C\u002Fa>,\n  \u003Ca href=\"https:\u002F\u002Fgithub.com\u002FNousResearch\u002Fhermes-agent\">hermes-agent\u003C\u002Fa>,\n  \u003Ca href=\"https:\u002F\u002Fgithub.com\u002FHKUDS\u002Fnanobot\">nanobot\u003C\u002Fa>.\n\u003C\u002Fp>\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fpython-3.11%2B-blue\" alt=\"Python 3.11+\" \u002F>\n  \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Flicense-MIT-green\" alt=\"MIT License\" \u002F>\n\u003C\u002Fp>\n\n\u003Cp align=\"center\">\n  \u003Ca href=\".\u002FREADME.md\">English\u003C\u002Fa> | \u003Ca href=\".\u002FREADME.zh-CN.md\">简体中文\u003C\u002Fa>\n\u003C\u002Fp>\n\n## Demo\n\n![Paragents demo](assets\u002Fparagent_demo.gif)\n\n\n## Quick Start (TUI Only)\n\n1. Install dependencies\n\n```bash\nuv sync\n```\n\n2. Start TUI\n\n```bash\nuv run python main.py\n```\n\n3. First run setup\n\n- If `runtime_config.json` is missing, startup enters interactive setup.\n- You can reconfigure in TUI with:\n  - `\u002Fsetup`\n  - `\u002Fshow-config`\n\n4. Command reference\n\n| Command | Purpose |\n|---|---|\n| `\u002Fnew \u003Ctext>` | Create a new foreground session with the initial prompt |\n| `\u002Fprompt \u003Ctext>` | Continue current foreground session with a new prompt |\n| `\u002Fsubmit \u003Ctext>` | Submit a new background session |\n| `\u002Flist` | List current sessions and their status |\n| `\u002Fswitch \u003Csession_ref>` | Switch foreground focus to a target session |\n| `\u002Fclose \u003Csession_ref>` | Close a session and release its slot |\n| `\u002Fapprovals` | Show pending approval requests |\n| `\u002Fapprove \u003Crequest_ref> [always]` | Approve a pending request (optional persistent allow) |\n| `\u002Fdeny \u003Crequest_ref>` | Deny a pending request |\n| `\u002Fpause \u003Cprompt_ref>` | Pause a running prompt |\n| `\u002Fresume \u003Csession_ref>` | Resume paused prompt in target session |\n| `\u002Fcancel \u003Cprompt_ref>` | Cancel target prompt |\n| `\u002Fpermissions` | Print current effective permission config |\n| `\u002Fsetup` | Re-run runtime\u002Fprovider setup |\n| `\u002Fshow-config` | Show runtime config file path and provider info |\n| `\u002Fquit` | Exit TUI |\n\n\n## Why Parallel-Agent\n\nThe current design focuses on **multi-session parallelism** with per-session continuity:\n\n- Session-based scheduler and worker model\n- Single active agent instance per session (reused across turns)\n- Session-level context + memory persistence\n- Preflight conflict checks (especially output conflicts) and approval flow\n- TUI-first operations for observing multiple sessions\n\n```mermaid\nflowchart LR\n  UserInput[UserInput] --> Scheduler[Scheduler]\n  Scheduler --> SessionQueue[SessionPromptQueue]\n  SessionQueue --> SessionWorker[SessionWorker]\n  SessionWorker --> AgentInstance[AgentInstance]\n  AgentInstance --> Tools[ToolsAndPermissions]\n  AgentInstance --> ContextState[SessionRuntimeState]\n  ContextState --> Scheduler\n```\n\nKey implementation files:\n\n- `main.py`\n- `scheduler.py`\n- `agent_instance.py`\n- `session_runtime.py`\n- `tui_app.py`\n\n\n## Cross-Repo Learning Notes (inlined)\n\nLegend:\n\n- **Code verified**: implementation or interface is directly confirmed in code.\n- **Docs\u002Fchangelog signal**: mainly inferred from README\u002Fchangelog\u002Fconfig examples; full core implementation may not be fully open.\n\n### 1) Permission and Capability Governance\n\n| Dimension | Paragents | claude-code | mercury-agent | hermes-agent | nanobot |\n|---|---|---|---|---|---|\n| Capability switches | `PermissionsConfig.capabilities` (**Code verified**) | Tool-level permission governance in settings (**Docs\u002Fchangelog signal**) | `permissions.yaml` + capability registry (**Code verified**) | Governance via toolset\u002Fgateway composition (**Code verified**) | `ToolsConfig` level toggles (**Code verified**) |\n| ask\u002Fdeny semantics | `needs_approval \u002F blocked \u002F auto_approved` (**Code verified**) | Explicit `ask\u002Fdeny` (**Code verified**) | Command pattern-based approvals (**Code verified**) | Approval is more runtime-pipeline oriented (**Code verified**) | Primarily `enable\u002Fsandbox\u002Frestrict` style (**Code verified**) |\n| File scope control | `fs_scopes` (**Code verified**) | Combined through tool permissions + policy layering (**Docs\u002Fchangelog signal**) | File scopes (**Code verified**) | Mostly enforced in tool runtime (**Code verified**) | `restrict_to_workspace` (**Code verified**) |\n| Sandbox\u002Fnetwork policy | Relatively lightweight currently (**Code verified**) | `sandbox.network.*` (**Code verified**) | Basic shell constraints (e.g., cwd) (**Code verified**) | More gateway\u002Fruntime governance oriented (**Code verified**) | `exec.sandbox` + SSRF allowlist (**Code verified**) |\n\n### 2) Context, Compaction, and Recovery\n\n| Dimension | Paragents | claude-code | mercury-agent | hermes-agent | nanobot |\n|---|---|---|---|---|---|\n| Session continuity | Session worker + one reused agent per session (**Code verified**) | Strong `--resume\u002F--continue` semantics (**Docs\u002Fchangelog signal**) | conversationId-scoped short-term memory (**Code verified**) | Session + `contextvars` isolation (**Code verified**) | `SessionManager` persistence (**Code verified**) |\n| Prompt construction | `PromptAssembler` abstraction (**Code verified**) | Core internals not fully public (**Docs\u002Fchangelog signal**) | `system + relevantFacts + recentMemory + user` (**Code verified**) | Unified through ContextEngine (**Code verified**) | Layered assembly via ContextBuilder (**Code verified**) |\n| Compaction strategy | `should_compact()\u002Fcompact()` (**Code verified**) | auto-compact + pre-compact hook (**Docs\u002Fchangelog signal**) | Mainly recent-N control (**Code verified**) | ContextEngine + Compressor (**Code verified**) | online consolidate + idle auto-compact (**Code verified**) |\n| Interruption\u002Frecovery | `CheckpointRecovery + SessionStateStore` (**Code verified**) | Ongoing long-session recovery hardening (**Docs\u002Fchangelog signal**) | Persistent memory resume (**Code verified**) | checkpoint manager (**Code verified**) | runtime checkpoint + keep-context on stop (**Code verified**) |\n\n### 3) Current Paragents Conclusions\n\n- The \"policy config + ask\u002Fdeny semantics\" model is **partially in place** with `permissions.json` + `blocked\u002Fneeds_approval\u002Fauto_approved`.\n- Compared with `claude-code`, current gaps are mainly:\n  - ask\u002Fdeny logic is still fragmented across capability\u002Fpolicy domains instead of one unified rule layer;\n  - missing a stronger hierarchical policy model (managed\u002Fuser\u002Fproject) and tool-level unified rule interpretation.\n\n## Requirements\n\nFrom `pyproject.toml`:\n\n- Python `>=3.11`\n- Runtime dependencies:\n  - `httpx`\n  - `prompt-toolkit`\n- Dev dependency group:\n  - `pytest`\n\nSystem\u002Fruntime prerequisites:\n\n- [`uv`](https:\u002F\u002Fdocs.astral.sh\u002Fuv\u002F) installed\n- An OpenAI-compatible endpoint configured in `runtime_config.json` (interactive setup on first run)\n\n## TODO Roadmap\n\nThe detailed roadmap is in a dedicated file for readability:\n\n- [TODO.md](.\u002FTODO.md)\n\nAt a glance:\n\n- `P0`: IM integration, multi-session usability, and recovery hardening\n- `P1`: context quality, policy unification, conflict UX, session invariants\n- `P2`: observability, regression suites, and UI state-machine consistency\n\n## Non-Goals \u002F Caveats\n\n- Not production-ready\n- No stability guarantees on internal APIs\n- Behavior may prioritize experimentation over strict backward compatibility\n\n## Testing\n\nRun core TUI regressions:\n\n```bash\nuv run pytest -q tests\u002Ftest_tui_layout.py tests\u002Ftest_tui_commands.py tests\u002Ftest_run_approval_flow.py\n```\n\n## License\n\nMIT.\n\nNote: this README declares MIT intent. If a top-level `LICENSE` file is missing, add one before public distribution.\n\n## Contributing\n\nSmall, focused PRs are preferred.\n\n- Keep changes easy to review and easy to hack on.\n- Add or update tests for behavioral changes.\n- Prefer readability over cleverness.\n","Paragents 是一个支持在同一面板中并行运行多个AI代理会话的工具，具备权限感知工具和预执行冲突检查功能。该项目使用Python编写，核心特性包括跨轮次的记忆上下文、在执行风险操作前询问用户以及通过冲突安全执行来并行管理会话。它采用TUI优先的工作流程设计，提供了可扩展的工具集和明确的策略门控机制。适用于需要同时监控或控制多个AI代理执行任务的场景，如多线程对话系统开发、复杂决策支持等，能够有效提高开发者在处理并发AI会话时的安全性和效率。",2,"2026-06-11 02:49:17","CREATED_QUERY"]