From bbf7f9893c09567ce24832f9b28df9a06c307617 Mon Sep 17 00:00:00 2001 From: "zhansheng.lzs" Date: Thu, 19 Nov 2026 16:38:54 +0800 Subject: [PATCH] docs: add bilingual documentation site and bump to 1.0.2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Build a MkDocs Material site (English + 中文) covering quickstart, configuration, CLI/slash commands, migration, topic guides, developer guide, and source-generated API reference. Add GitHub Actions to build with --strict on PRs and deploy to GitHub Pages on main pushes. Bump the runtime version to 1.0.2 across source, tests, release checks, and root guides; record the release in CHANGELOG and release notes. Accept the remote DashScope logo URL in the doc-consistency guard and fix browser tool docstring indentation for clean --strict parsing. --- .github/workflows/docs.yml | 64 +++++ .gitignore | 6 + .pre-commit-config.yaml | 3 + CHANGELOG.md | 23 ++ README.md | 7 +- README_zh.md | 7 +- RELEASE.md | 4 +- SECURITY.md | 2 +- docs/assets/favicon.png | Bin 0 -> 37094 bytes docs/assets/logo.svg | 7 + docs/en/about.md | 76 +++++ docs/en/cli.md | 133 +++++++++ docs/en/configuration.md | 135 +++++++++ docs/en/develop.md | 94 +++++++ docs/en/guides/agent-patterns.md | 234 ++++++++++++++++ docs/en/guides/sdk.md | 180 ++++++++++++ docs/en/guides/security-and-platform.md | 201 +++++++++++++ docs/en/guides/tools-and-skills.md | 326 ++++++++++++++++++++++ docs/en/index.md | 143 ++++++++++ docs/en/migration.md | 75 +++++ docs/en/quickstart.md | 117 ++++++++ docs/en/reference/agent.md | 86 ++++++ docs/en/reference/eval.md | 37 +++ docs/en/reference/governance.md | 125 +++++++++ docs/en/reference/memory.md | 65 +++++ docs/en/reference/platforms.md | 74 +++++ docs/en/reference/providers.md | 74 +++++ docs/en/reference/sdk.md | 83 ++++++ docs/en/reference/tools.md | 118 ++++++++ docs/en/release-notes.md | 108 +++++++ docs/hooks.py | 141 ++++++++++ docs/overrides/404.html | 38 +++ docs/overrides/main.html | 64 +++++ docs/overrides/partials/alternate.html | 19 ++ docs/overrides/partials/header.html | 92 ++++++ docs/overrides/partials/languages/en.html | 63 +++++ docs/overrides/partials/languages/zh.html | 60 ++++ docs/overrides/partials/logo.html | 10 + docs/overrides/partials/search.html | 45 +++ docs/overrides/partials/toc.html | 37 +++ docs/stylesheets/extra.css | 251 +++++++++++++++++ docs/zh/404.md | 13 + docs/zh/about.md | 73 +++++ docs/zh/cli.md | 130 +++++++++ docs/zh/configuration.md | 132 +++++++++ docs/zh/develop.md | 88 ++++++ docs/zh/guides/agent-patterns.md | 221 +++++++++++++++ docs/zh/guides/sdk.md | 175 ++++++++++++ docs/zh/guides/security-and-platform.md | 189 +++++++++++++ docs/zh/guides/tools-and-skills.md | 313 +++++++++++++++++++++ docs/zh/index.md | 140 ++++++++++ docs/zh/migration.md | 70 +++++ docs/zh/quickstart.md | 116 ++++++++ docs/zh/reference/agent.md | 84 ++++++ docs/zh/reference/eval.md | 35 +++ docs/zh/reference/governance.md | 124 ++++++++ docs/zh/reference/memory.md | 64 +++++ docs/zh/reference/platforms.md | 72 +++++ docs/zh/reference/providers.md | 72 +++++ docs/zh/reference/sdk.md | 80 ++++++ docs/zh/reference/tools.md | 116 ++++++++ docs/zh/release-notes.md | 96 +++++++ migration-to-1.0.md | 4 +- mkdocs.yml | 209 ++++++++++++++ requirements-doc.txt | 13 + scripts/release_check.py | 2 +- src/dashscope_agenticx/_version.py | 2 +- src/dashscope_agenticx/tools/browser.py | 6 +- tests/e2e/test_smoke_repl.py | 2 +- tests/ut/test_docs_consistency.py | 3 +- tests/ut/test_packaging_contract.py | 4 +- user-guide.md | 2 +- user-guide_zh.md | 2 +- 73 files changed, 6061 insertions(+), 18 deletions(-) create mode 100644 .github/workflows/docs.yml create mode 100644 docs/assets/favicon.png create mode 100644 docs/assets/logo.svg create mode 100644 docs/en/about.md create mode 100644 docs/en/cli.md create mode 100644 docs/en/configuration.md create mode 100644 docs/en/develop.md create mode 100644 docs/en/guides/agent-patterns.md create mode 100644 docs/en/guides/sdk.md create mode 100644 docs/en/guides/security-and-platform.md create mode 100644 docs/en/guides/tools-and-skills.md create mode 100644 docs/en/index.md create mode 100644 docs/en/migration.md create mode 100644 docs/en/quickstart.md create mode 100644 docs/en/reference/agent.md create mode 100644 docs/en/reference/eval.md create mode 100644 docs/en/reference/governance.md create mode 100644 docs/en/reference/memory.md create mode 100644 docs/en/reference/platforms.md create mode 100644 docs/en/reference/providers.md create mode 100644 docs/en/reference/sdk.md create mode 100644 docs/en/reference/tools.md create mode 100644 docs/en/release-notes.md create mode 100644 docs/hooks.py create mode 100644 docs/overrides/404.html create mode 100644 docs/overrides/main.html create mode 100644 docs/overrides/partials/alternate.html create mode 100644 docs/overrides/partials/header.html create mode 100644 docs/overrides/partials/languages/en.html create mode 100644 docs/overrides/partials/languages/zh.html create mode 100644 docs/overrides/partials/logo.html create mode 100644 docs/overrides/partials/search.html create mode 100644 docs/overrides/partials/toc.html create mode 100644 docs/stylesheets/extra.css create mode 100644 docs/zh/404.md create mode 100644 docs/zh/about.md create mode 100644 docs/zh/cli.md create mode 100644 docs/zh/configuration.md create mode 100644 docs/zh/develop.md create mode 100644 docs/zh/guides/agent-patterns.md create mode 100644 docs/zh/guides/sdk.md create mode 100644 docs/zh/guides/security-and-platform.md create mode 100644 docs/zh/guides/tools-and-skills.md create mode 100644 docs/zh/index.md create mode 100644 docs/zh/migration.md create mode 100644 docs/zh/quickstart.md create mode 100644 docs/zh/reference/agent.md create mode 100644 docs/zh/reference/eval.md create mode 100644 docs/zh/reference/governance.md create mode 100644 docs/zh/reference/memory.md create mode 100644 docs/zh/reference/platforms.md create mode 100644 docs/zh/reference/providers.md create mode 100644 docs/zh/reference/sdk.md create mode 100644 docs/zh/reference/tools.md create mode 100644 docs/zh/release-notes.md create mode 100644 mkdocs.yml create mode 100644 requirements-doc.txt diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 0000000..409cc12 --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,64 @@ +name: Docs + +# Every PR and main push builds the MkDocs Material site to validate it; +# pushes to main additionally deploy the HTML to GitHub Pages. Docs track +# main (latest), independent of the tag-driven release.yml flow. +on: + push: + branches: [main] + paths: + - 'docs/**' + - 'src/dashscope_agenticx/**' + - 'mkdocs.yml' + - 'requirements-doc.txt' + - '.github/workflows/docs.yml' + pull_request: + paths: + - 'docs/**' + - 'src/dashscope_agenticx/**' + - 'mkdocs.yml' + - 'requirements-doc.txt' + - '.github/workflows/docs.yml' + workflow_dispatch: + +permissions: + contents: read + +concurrency: + group: pages-${{ github.ref }} + cancel-in-progress: true + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: '3.12' + # mkdocstrings imports the real package, so install it alongside the + # doc toolchain. Core dependencies suffice: every Reference target + # guards optional imports (textual/playwright/etc.) lazily. + - run: python -m pip install -r requirements-doc.txt . + - name: Build HTML + run: mkdocs build --strict + - name: Upload site artifact + if: github.event_name == 'push' && github.ref == 'refs/heads/main' + uses: actions/upload-pages-artifact@v3 + with: + path: site + + deploy: + needs: build + if: github.event_name == 'push' && github.ref == 'refs/heads/main' + runs-on: ubuntu-latest + permissions: + pages: write + id-token: write + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 \ No newline at end of file diff --git a/.gitignore b/.gitignore index 88712d7..200d356 100644 --- a/.gitignore +++ b/.gitignore @@ -34,6 +34,8 @@ Thumbs.db *.webm *.wav *.mp3 +# Docs site assets are intentional, not test artifacts +!docs/assets/*.png # npm side products (agenticx isn't a Node project; ignore stray init artifacts) node_modules/ @@ -49,3 +51,7 @@ package-lock.json /md/ /.aoneci/ /.gitlab-ci.yml + +# MkDocs build output and local docs virtualenv +/site +.venv-docs/ diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 32b2ff8..fec7ab6 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -15,6 +15,9 @@ repos: - id: check-ast - id: sort-simple-yaml - id: check-yaml + # mkdocs.yml uses !!python/name: tags for the Material emoji + # extension; the safe loader rejects them. + args: [--unsafe] exclude: | (?x)^( meta.yaml diff --git a/CHANGELOG.md b/CHANGELOG.md index e097ee6..2fe9ed6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,29 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [1.0.2] - 2026-11-19 + +### Added + +- Bilingual (English / 中文) MkDocs Material documentation site under `docs/`: + quickstart, configuration, CLI and slash-command reference, migration, + embedding SDK / tools & skills / subagents & memory / security & platform + guides, developer guide, about, release notes, and an API reference built + from source with mkdocstrings. +- GitHub Actions workflow building the site with `mkdocs build --strict` on + pull requests and deploying to GitHub Pages on pushes to `main`. +- README documentation-site links pointing to the published bilingual docs. + +### Changed + +- The doc-code consistency guard accepts the remote DashScope logo URL used + by the READMEs. + +### Fixed + +- Browser tool docstring argument indentation so the API reference parses + cleanly under `mkdocs build --strict`. + ## [1.0.1] - 2026-11-11 ### Added diff --git a/README.md b/README.md index 7278bc2..6ff9147 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # DashScope AgenticX -![DashScope AgenticX](logo.svg) +![DashScope AgenticX](https://raw.githubusercontent.com/dashscope/dashscope-agenticx/main/logo.svg) [English](README.md) | [中文](README_zh.md) @@ -264,8 +264,13 @@ tests alone does not publish or certify a final 1.0 release. ## Documentation +The bilingual documentation site (English / 中文) is published at + — guides, configuration, +CLI reference, and API reference. Source pages live under [`docs/`](docs/). + | Document | Contents | |---|---| +| [Documentation site](https://dashscope.github.io/dashscope-agenticx/) / [中文文档](https://dashscope.github.io/dashscope-agenticx/zh/) | Bilingual guides, configuration, CLI, and API reference | | [User guide](user-guide.md) / [中文手册](user-guide_zh.md) | Full commands, configuration, tools, modules, and development reference | | [Migration](migration-to-1.0.md) | Legacy naming, directories, credentials, and compatibility | | [Changelog](CHANGELOG.md) | 1.0 release notes, upcoming changes, and archived release history | diff --git a/README_zh.md b/README_zh.md index de736bc..f7726f0 100644 --- a/README_zh.md +++ b/README_zh.md @@ -1,6 +1,6 @@ # DashScope AgenticX -![DashScope AgenticX](logo.svg) +![DashScope AgenticX](https://raw.githubusercontent.com/dashscope/dashscope-agenticx/main/logo.svg) [English](README.md) | [中文](README_zh.md) @@ -242,8 +242,13 @@ App 校验和供应链检查是独立发布要求;本地单测通过不等于 ## 文档 +双语文档站(English / 中文)发布于 +,包含专题指南、配置、 +命令行参考与 API 参考。源码页面位于 [`docs/`](docs/)。 + | 文档 | 内容 | |---|---| +| [文档站](https://dashscope.github.io/dashscope-agenticx/) / [English docs](https://dashscope.github.io/dashscope-agenticx/) | 双语指南、配置、命令行与 API 参考 | | [中文使用手册](user-guide_zh.md) / [English guide](user-guide.md) | 完整命令、配置、工具、模块和开发参考 | | [迁移指南](migration-to-1.0.md) | 旧命名、目录、凭据和兼容处理 | | [Changelog](CHANGELOG.md) | 1.0 发布说明、后续改动和归档的历史版本 | diff --git a/RELEASE.md b/RELEASE.md index dc0c378..f62f389 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -1,6 +1,6 @@ # Release Process -The release version is `1.0.1`. Updating the version and pushing or merging +The release version is `1.0.2`. Updating the version and pushing or merging Git branches does not publish packages or create release tags. External publication requires the checks and explicit approval below. @@ -15,7 +15,7 @@ publication requires the checks and explicit approval below. metadata, and `agenticx --version` agree. 6. Only when external publication is explicitly approved, tag `v` and publish the `dashscope-agenticx` wheel/sdist plus checksums and SBOM. -7. Archive the migration guide and final benchmark/eval reports for `1.0.1`. +7. Archive the migration guide and final benchmark/eval reports for `1.0.2`. Main-branch pushes and pull requests run unit tests and pre-commit checks. Before pushing a release tag, confirm the tagged source passed those checks. diff --git a/SECURITY.md b/SECURITY.md index 8171960..34b12e0 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -2,7 +2,7 @@ ## Supported versions -Security fixes target the active `1.0.1` release line. +Security fixes target the active `1.0.2` release line. ## Reporting diff --git a/docs/assets/favicon.png b/docs/assets/favicon.png new file mode 100644 index 0000000000000000000000000000000000000000..c8de9199a3c3982a3ba96f2da1c5c63c7c4f6a00 GIT binary patch literal 37094 zcmb4K<9a0wudS`!PHo$Er?$0g+qR~*rnYU{wrxyp>wC{7oF7SUVC6~HT1kYWyaXZ~ z4jc#w2%?mvsPccc>Hh)->c7lC4aEWi5??JP`dif_>&h3}2YvbehkDaaq4~Mh;i9+IvKKe8APEeNwK};{6)_)WB?3dpvW9g6jmk*qK z0Pc61vx%5owho3ADvg;(#!`AEBm;edZ;Bt~e_2jFeir#gaJ* z_dRs%S(lK${jTEaNzgwp7F;pUFe-BdFkmofDFW^1)lPRRPbBGP7>p2W`!|MpAlx~m z(F4d=e|m*DX`iDOsUC7A)A5H$)km=o7gtOySRr$Sc?7T7?n>ahe-y5%tLq`6qL~~k z6VDONaSGc!I9)tMujggjRDu6a{j5OD&@gt(5&HKq^vOGc5ZJWiZ%`6)a!rc>;x9oy zE#-#Ul(HYiV2dp0kzf?wq)`5N=P9NUmV*)#&3*O~rSFl0<5HhM6r+|F@p0(Gy?}mh z24NUXV{c5{yL)Y89r}ApmDUf%==fNe6@WyVqgh}b>kNGmvuReP8C}OjMTM7VKM*o^ zFriNtZ~>1z49bQ?6xbq>d#&(%@9mvSJGnk;NEe8R?|S(U$FSyw(E=yRxroJ%$WEQH zyyE+5*%Y_toqZS~P)sln0 zA{b+A43=s)sOd@DKzV6_5d>0MfRWu~^mXJ#r`e^B=(JJ+S(H6fSx;CxUP@BXd9|P+Pwkbp-m1L7_22YC{&wzE8M_xD;r@LQ*dct(VBX%V zD4|Ve%o#2YrV*M`g!K8_#Jw3?M#i4kgTMaG*d$+4r~NSK#bZW@kxJ$$krAfY>Rn4N zlf=!rS(Po#pC{6bONYS#AXi9p&=m}8E$!5;Aj3`x7J`VV3-I10sZN>AXY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O%r0*IcQ`c#o8KB*p|hnM7*BWK)8jB>i*5Y1|C1 z4kdQI|K4h+L~IkJ|Nkqas2+Zu+oRuPH9PwRs>nVBS=Kh|jW#9FKuv`Xg$NU$8H;U; zmX^J`@%ble@Z?6bSN@L*baIe0dcAm5Ky5XiVyzR#IPS!A8wj>T9%4=)K{d?SuBcft zZ`sOo7OVntOHHx4|GR=*Z`2KAzw+ilS8nbU$?YCODDe5Y4j6@q&raKxVK_4ig!)j?V{d zbnY^FJQ&q0KVQA$i;tF8POtu-hvEL{!D|aL!k@=H|MD1b+qM@{m!~(u#IQ5yF-FXC z^fh%^hJh2I$fEGZbQ)PrTQO-tr% zv|EnZ=0&=!se_}rk!mt@IQ#PKc7yx%Rs7x#P+q{OtXT8Sjn{%kj;B^kZT6rCNBSXh z7n>L$$hO8lIDUV&Oe4fD2ZsBdCpb9jX=?&MNddM6{h%Q4_rW;?W(Wwk_yLW4VDIDy z$H8%M92^J7!EtaL90$k2ac~?Q2gkv2a2y;5$H8%M92^J7!EtaL90$k2ac~?Q2gkv2 ha2y;52Rbmv{{vUlT?XCm643wv002ovPDHLkV1oRifUE!j literal 0 HcmV?d00001 diff --git a/docs/assets/logo.svg b/docs/assets/logo.svg new file mode 100644 index 0000000..689c875 --- /dev/null +++ b/docs/assets/logo.svg @@ -0,0 +1,7 @@ + + + + + + diff --git a/docs/en/about.md b/docs/en/about.md new file mode 100644 index 0000000..507c5b0 --- /dev/null +++ b/docs/en/about.md @@ -0,0 +1,76 @@ +--- +description: "About DashScope AgenticX: identity, requirements, scope, and project boundaries." +--- +# About AgenticX + +**DashScope AgenticX** is a Python Agent Runtime for building and running +domain experts. It connects models, tools, Skills, permissions, and +persistent sessions through one runtime, with a terminal interface and APIs +for embedded applications. + +Current version: **{{ agenticx_version }}**. + +## Identity + +| Aspect | Value | +|---|---| +| Product | AgenticX / DashScope AgenticX | +| Distribution | [`dashscope-agenticx`](https://pypi.org/project/dashscope-agenticx/) | +| Import namespace | `dashscope_agenticx` | +| Command | `agenticx` (no official short alias) | +| Workspace | `.agenticx/` | +| Environment | `AGENTICX_*` | +| Global app name | `AgenticX` (platform-standard directory via `platformdirs`) | +| License | MIT | +| Source | [github.com/dashscope/dashscope-agenticx](https://github.com/dashscope/dashscope-agenticx) | + +The bare `agenticx` PyPI distribution is a **different, unrelated project**. +Install `dashscope-agenticx`. + +## Requirements + +- **Python 3.10+** for the core Runtime, CLI, and SDK. +- The Pillow-backed `vision` and `media` extras require **Python 3.11+**; + the `all` extra omits Pillow on Python 3.10. +- A model provider API key for cloud providers (e.g. `DASHSCOPE_API_KEY` + for the default Tongyi/DashScope provider), or a local provider such as + `ollama` for fully offline use. +- Optional capabilities (TUI, provider SDKs, web, browser, voice, camera) + are installed as extras and are not prerequisites for the core Runtime. + +CI tests Python 3.10–3.13 with Ubuntu/macOS/Windows smoke checks. Those +checks are not a guarantee that every optional device or sandbox backend +works on every OS. + +## What AgenticX is + +- A local assistant you run directly in a terminal. +- An embeddable Python runtime (`run_once`, `run_events`, `create_agent`, + `RuntimeBuilder`) for application integration. +- A packaging layer for domain experts as versioned App Bundles, with + DashScope SDK Expert and Bailian Expert as bundled templates. + +## What AgenticX is not + +- **Not a hosted service.** It runs in your process; the localhost Server + is a token-authenticated local API, not an Internet-facing deployment. +- **Not a hardened OS sandbox.** OS sandbox support (Seatbelt/bubblewrap) + is defense in depth; availability and limitations depend on the backend. +- **Not a complete workflow platform.** Voice, camera, browser, web search, + scheduler, and experimental features are optional. + +A checksum proves content identity, not publisher authenticity; a local +trust flag is not a verified digital signature. Read the +[security guide](guides/security-and-platform.md) and the repository +`SECURITY.md` before installing third-party applications. + +## Dependencies + +The core install stays small. Optional packs add provider SDKs, the Textual +TUI, web/browser tooling, and media (voice/camera/vision) dependencies. +Installing dependencies does not grant an App permissions. See +[Quickstart](quickstart.md#optional-extras) for the extras table. + +## License + +MIT, as declared in `pyproject.toml`. \ No newline at end of file diff --git a/docs/en/cli.md b/docs/en/cli.md new file mode 100644 index 0000000..c7a69b8 --- /dev/null +++ b/docs/en/cli.md @@ -0,0 +1,133 @@ +--- +description: "AgenticX CLI options, subcommands, and the complete slash command reference." +--- +# CLI & Commands + +## Startup options + +```shell +agenticx # interactive session (TUI if installed) +agenticx --cli # inline REPL with native scrollback +agenticx --tui # force the Textual interface +agenticx -c "Summarize this project" # one prompt, then exit +agenticx --dry-run # preview loaded configuration +agenticx --protocol anthropic # startup protocol: openai (default) / anthropic +agenticx --max-turns 20 # override the conversation turn limit +agenticx --version +``` + +## Subcommands + +```shell +agenticx app list # versioned App Bundles +agenticx app install # install + permission diff preview +agenticx app info # publisher, permissions, runtime range, checksum +agenticx app verify # checksum + runtime compatibility +agenticx app update # reinstall from the recorded source + +agenticx expert # list expert templates +agenticx expert download # merge an expert profile into ./.agenticx/ +agenticx expert restore # undo the most recent merge + +agenticx mcp-server # expose tools over MCP stdio (trusted clients only) +agenticx serve --token # localhost Client API (default 127.0.0.1:8765) +``` + +`app install` registers the bundle under `.agenticx/apps/` but does not +activate its profile; expert downloads are role/configuration data, not +registered Apps. See +[Tools, Skills & Experts](guides/tools-and-skills.md#experts) and +[Security, Platform & MCP](guides/security-and-platform.md#local-http-api). + +## Slash commands + +Commands are organized in four tiers: Session → Configuration → +Capability → Development. `/help` lists them in this order. + +### Session + +| Command | Description | +|---|---| +| `/help` | Show help, grouped by category | +| `/clear` | Clear conversation history (persists the empty history) | +| `/info` | Runtime info: provider/model/protocol/base URL/capabilities/privacy | +| `/copy` | Copy the last reply to the clipboard | +| `/save [path]` | Save the last reply to a file | +| `/json on\|off` | Force JSON replies (`response_format` passthrough) | +| `/compress` | Replace history with an LLM summary to save tokens | +| `/summarize` | Summarize the current task into experience memory | +| `/stats` | Token usage, prompt composition, API/tool counts, duration | +| `/report` | Trace performance report (calls, success rate, latency) | +| `/feedback good\|bad` | Mark task satisfaction (experience memory) | +| `/history [subcmd]` | History stats/list/search/export/clear | +| `/undo` | Undo the last file write/delete (checkpoint snapshots) | +| `/session [subcmd]` | Topics: new/list/switch/rename/fork/remove/scene | +| `/privacy [on\|off\|status]` | Privacy mode | +| `/audit [subcmd]` | Audit log: recent/query/clear | +| `/voice [subcmd]` | Voice input: on/off/model/silence/max/threshold | +| `/tts [subcmd]` | Voice output: on/off/model/voice/speed/say/last | +| `/camera capture\|record` | Camera photo / video (media extras) | +| `/log [subcmd]` | Full prompts recorded under `/debug on`: tail/search/clear | +| `/trace [subcmd]` | Execution trace: tail/search/clear | +| `/exit` | Exit (aliases `/quit`, `/q`) | + +`/v` is the voice-input shortcut (`Ctrl+T`): record → ASR → send. + +### Configuration + +| Command | Description | +|---|---| +| `/setup` | Interactive workspace initialization wizard | +| `/provider` | Wizard: provider → model → connection → API key | +| `/model [name]` | Switch model within the current provider | +| `/capability [subcmd]` | list/enable/disable/reload/config | +| `/subagents [subcmd]` | list/reload/enable/disable/config | +| `/trust [subcmd]` | This turn's tool trust cache: list/clear/allow/deny | +| `/rule [subcmd]` | Long-lived operation rules: list/add/remove/edit/enable/disable/clear | +| `/theme [subcmd]` | list/set/custom colors (dark/light/monokai/dracula/nord/solarized) | +| `/debug [on\|off\|status]` | Record full sanitized prompts to the session trace | +| `/directives [subcmd]` | Custom directives + auto-learning proposals/accept/reject | + +### Capability + +| Command | Description | +|---|---| +| `/profile [subcmd]` | User profile: list/search/add/remove/clear | +| `/memory [subcmd]` | Conversation history memory: list/search/remove/clear | +| `/mcp [subcmd]` | MCP services: add/remove/list (requires `bailian.mcp`) | +| `/skill [name] [args]` | List or invoke skills | +| `/skill install\|link\|update\|uninstall` | Skill package lifecycle | +| `/skill search\|publish\|reload` | Registry search, packaging, rescan | +| `/skill enable\|disable ` | Force skill package state | +| `/app list\|info\|install\|update\|verify` | Versioned App Bundle management | +| `/cron [subcmd]` | Scheduled tasks: add/list/remove/pause/resume | + +Commands for disabled capabilities are intercepted with an enable hint +instead of failing on credentials. + +### Development + +| Command | Description | +|---|---| +| `/dev model add\|rm\|list` | Register models at runtime | +| `/dev provider add\|list\|rm` | Extend providers | +| `/dev capability add\|list\|rm` | Extend HTTP tool groups | +| `/dev skill add\|list\|rm` | Extend skills | +| `/dev tool add\|list\|rm` | Extend shell tools | +| `/dev debug tools\|schema\|call\|prompt` | Debugging helpers | +| `/dev test provider ` | Test provider connectivity | +| `/dev reload` | Hot-reload `custom-extensions.toml` | +| `/dev log` | Tool registration statistics | +| `/expert [list]` | List expert templates | +| `/expert download ` | Merge an expert into `./.agenticx/` (backup on conflict) | +| `/expert restore` | Undo the most recent merge | + +## Terminal output + +- Markdown replies with numbered turns; tool details collapse by + default (`Ctrl+O` toggles), failures stay expanded. +- `Ctrl+G` expands token/API/tool/prompt-composition statistics. Prompt + sizes are characters, not exact token counts. +- Selection copying: `Cmd+C` on macOS, `Ctrl+C` on Windows/Linux; on + macOS `Ctrl+C` clears/cancels/quits instead. `/copy` copies the latest + reply source; `--cli` gives native scrollback. \ No newline at end of file diff --git a/docs/en/configuration.md b/docs/en/configuration.md new file mode 100644 index 0000000..add93d7 --- /dev/null +++ b/docs/en/configuration.md @@ -0,0 +1,135 @@ +--- +description: "AgenticX layered configuration: global and workspace config.toml, environment variables, providers, and API key management." +--- +# Configuration + +AgenticX uses **layered configuration**: + +- **Global** — the platform-standard `AgenticX` app directory + (`~/.config/AgenticX` on Linux; `AGENTICX_HOME` overrides it on any + platform): per-provider API key slots, voice/TTS settings, shared + across projects. +- **Workspace** — `./.agenticx/config.toml`: provider, model, platform + capabilities, MCP services, username. + +Priority: **workspace config > global config > environment variables +(fill empty slots only) > interactive input**. `AGENTICX_PROVIDER` and +`AGENTICX_MODEL` always force-override. The same resolution is exposed +programmatically as [`Config.load()`](reference/sdk.md#config). + +## Workspace config + +```toml +# ./.agenticx/config.toml +user_name = "agenticx" +provider = "tongyi" +model = "qwen3.8-flash" +fallback_providers = "openai,anthropic" # tried in order on primary failure +enabled_capabilities = "bailian.mcp,bailian.cli" +max_turns = 100 # tool-call turns per conversation (default 50) +session_persist = true # cross-session history persistence +tui = false # false = inline CLI REPL instead of TUI +user_directives = ["Don't push after each commit"] # written by /rule +delegation = { max_concurrent = 5, default_timeout = 120 } + +[[mcp_servers]] +service = "time" +``` + +The full field list with types and defaults is in the +[Config reference](reference/sdk.md#config). + +## Global config & API keys + +Each provider has an independent key slot, so switching providers never +overwrites another key. New secrets are stored in the OS keyring under +the `dashscope-agenticx` service; TOML holds only references: + +```toml +# ~/.config/AgenticX/config.toml +tongyi_api_key = "KEYRING:v1:..." +anthropic_api_key = "KEYRING:v1:..." +openai_api_key = "KEYRING:v1:..." +``` + +The `/provider` wizard enters keys without terminal echo and offers +three sources: OS keyring, environment variable, or configure later. +Legacy single `api_key` lines are migrated to the current provider's +slot on first launch; legacy `ENC:` values remain readable for +migration but are never written for new secrets. + +## Environment variables + +API-key variables only fill empty slots; `AGENTICX_PROVIDER` / +`AGENTICX_MODEL` always override. + +| Variable | Description | +|---|---| +| `DASHSCOPE_API_KEY` | Tongyi / Bailian API key | +| `ANTHROPIC_API_KEY` | Claude API key | +| `OPENAI_API_KEY` | OpenAI API key | +| `OPENAI_BASE_URL` | Custom OpenAI-compatible endpoint (highest priority) | +| `AGENTICX_PROVIDER` | Force the provider | +| `AGENTICX_MODEL` | Force the model | +| `AGENTICX_MCP_SERVERS` | Pre-connect MCP services (comma-separated) | +| `AGENTICX_MEMORY_USER_ID` | User identifier for profile isolation | +| `AGENTICX_MEMORY_LIBRARY_ID` | Bailian profile library ID | +| `AGENTICX_COMMAND_TIMEOUT` | `run_command` timeout seconds (default 600) | +| `AGENTICX_HOME` | Override the global config directory | + +## Built-in providers + +| Provider | Protocol | Default model | +|---|---|---| +| `tongyi` | DashScope native | `qwen3.8-flash` | +| `anthropic` | Anthropic Messages | `claude-sonnet-4-20250514` | +| `openai` | OpenAI | `gpt-4o` | + +Switch with `/provider` (wizard) or `/model ` (model-only). +Reasoning models (`reasoning_content`) are supported; the reasoning +content is passed back on the next request to avoid provider 400s. + +## Custom providers + +DeepSeek, Kimi, Ollama, and any OpenAI/Anthropic-compatible endpoint are +declared in `custom-extensions.toml` (workspace overrides global by +`name`) — no code required: + +```toml +# ./.agenticx/custom-extensions.toml +[[providers]] +name = "moonshot" +base_url = "https://api.moonshot.cn/v1" +api_key_env = "MOONSHOT_API_KEY" # env var name; no plaintext on disk +default_model = "kimi-k2" +protocol = "openai" # openai / anthropic / dashscope + +[[providers]] +name = "ollama" +base_url = "http://localhost:11434/v1" +default_model = "llama3" +protocol = "openai" +auth = false # local, no key needed +``` + +Plaintext `api_key = "sk-..."` is rejected by the loader; use +`api_key_env` or a `KEYRING:v1:` reference. `/dev provider add` writes +these blocks interactively. See +[Tools, Skills & Experts](guides/tools-and-skills.md#custom-tools) +for HTTP tool groups, shell tools, and skills in the same file. + +**base_url precedence** (primary provider): `OPENAI_BASE_URL` env > +`base_url` in `config.toml` > matching `[[providers]]` entry > built-in +default. Fallback providers always use their own declared endpoint. + +## Workspace file map + +| File | Purpose | +|---|---| +| `.agenticx/config.toml` | Models, capabilities, interaction settings | +| `.agenticx/system-prompt.md` | Domain role and behavioral instructions | +| `.agenticx/skills/` | Markdown skills and skill packages | +| `.agenticx/custom-extensions.toml` | Declarative providers and HTTP/shell tools | +| `.agenticx/permissions.toml` | Tool/command allow-deny-confirm policy | +| `.agenticx/hooks.toml` | Event hooks under trust and permission controls | +| `.agenticx/session/` | Persistent conversations and run records | \ No newline at end of file diff --git a/docs/en/develop.md b/docs/en/develop.md new file mode 100644 index 0000000..d618d84 --- /dev/null +++ b/docs/en/develop.md @@ -0,0 +1,94 @@ +--- +description: "Develop and contribute to DashScope AgenticX: environment setup, tests, lint, and the release contract." +--- +# Developer Guide + +## Environment + +Use Python **3.10–3.13**. Install the package editable with the development +and optional-feature extras: + +```bash +python -m venv .venv +source .venv/bin/activate # Windows: .venv\Scripts\Activate.ps1 +python -m pip install -e ".[dev,all]" +python -m pip install pre-commit +``` + +`all` omits Pillow on Python 3.10 (the Pillow-backed `vision`/`media` extras +require 3.11+). Core dependencies are intentionally small; new heavy +dependencies belong in extras. + +## Tests and lint + +```bash +python -m pytest tests/ -q # unit + e2e suite +pre-commit run --all-files # Black, isort, flake8, encoding pragmas, … +``` + +Run Black, isort, and flake8 before submitting. The pre-commit config also +enforces UTF-8 encoding pragmas, docstring-first ordering, and trailing- +whitespace cleanup. `mkdocs.yml` uses `!!python/name:` tags, so the +`check-yaml` hook runs with `--unsafe`. + +### Test layout + +- `tests/ut/` — unit tests, including `test_docs_consistency.py`, which + guards the root README/user-guide/migration/CHANGELOG contracts. +- `tests/e2e/` — end-to-end runs against a fake provider + (`tests/e2e/fake_provider.py`), so the suite exercises the agent loop + offline without real cloud model calls. + +## Documentation site + +The bilingual docs site (this site) builds with MkDocs Material: + +```bash +python -m venv .venv-docs +source .venv-docs/bin/activate +python -m pip install -r requirements-doc.txt -e . +mkdocs serve # live preview at http://127.0.0.1:8000 +mkdocs build --strict # CI-equivalent build (warnings are errors) +``` + +English pages live at `docs/en/` (site root), Chinese at `docs/zh/` +(`/zh/`). Reference pages use mkdocstrings `:::` identifiers resolved +against `src/`; keep the en/zh `:::` blocks identical and translate only +headings and prose. The version placeholder `{{ agenticx_version }}` is +injected from `src/dashscope_agenticx/_version.py` by `docs/hooks.py`. + +CI (`.github/workflows/docs.yml`) builds with `--strict` on pull requests +and deploys to GitHub Pages on pushes to `main`. + +## Contribution rules + +1. Use Python 3.10–3.13. +2. Create focused changes with tests. +3. Run `pytest -q`, Black, isort, and flake8 before submitting. +4. Keep Core dependencies small; new heavy dependencies belong in extras. +5. Preserve the typed Event, Runtime, App Manifest, and Session contracts. +6. Security-sensitive changes require negative tests for untrusted input. + +## Identity contract + +The canonical distribution and protocol/package identity is +`dashscope-agenticx`, the import namespace is `dashscope_agenticx`, and the +only official command is `agenticx` (no official short alias). Workspaces +use `.agenticx/`, environment variables use `AGENTICX_*`, and the global app +name is `AgenticX`. Do not introduce the unrelated bare `agenticx` PyPI +distribution. + +## Release contract + +```bash +python scripts/release_check.py +``` + +The release check validates package identity, version, imports, CLI, and +bundled Apps. Coverage gates, cross-platform CI (Python 3.10–3.13; +Ubuntu/macOS/Windows smoke checks), App validation, and supply-chain checks +are separate release requirements — passing local unit tests alone does not +publish or certify a release. Tag builds prepare wheel/source distributions +and platform binaries with SHA-256 checksums in a draft GitHub Release for +final review. See the repository `RELEASE.md` for packaging, checksums, +SBOM, and publication gates. \ No newline at end of file diff --git a/docs/en/guides/agent-patterns.md b/docs/en/guides/agent-patterns.md new file mode 100644 index 0000000..c58d031 --- /dev/null +++ b/docs/en/guides/agent-patterns.md @@ -0,0 +1,234 @@ +--- +description: "AgenticX agent patterns: subagents and delegation, lifecycle hooks, scheduled tasks, memory, rules, and prompt composition." +--- +# Subagents, Hooks & Memory + +## Subagents and delegation + +### `subagent_invoke` (capability `local.subagent`) + +The model can spin up a second-level agent with an **isolated context** to +run a subtask; only a summary comes back, so intermediate tool calls do not +pollute the main conversation. + +| Parameter | Default | Description | +|---|---|---| +| `prompt` | required | The subtask, as a single user message | +| `system_prompt` | empty | Override the subagent's role (reviewer / researcher / …) | +| `max_turns` | 10 (cap 50) | Sub-loop turn limit to prevent runaway execution | + +The subagent **shares** the main agent's provider, executor, tool table, +MemoryManager (plan progress, reflection hints), `/rule` rules, and +capability notices — but **not** `session_path`: subagents are disposable +and never write session history. + +Enabling `local.subagent` also registers three expert tools with fixed +system prompts: `review_code` (bugs/security/performance/style), +`write_tests` (pytest generation), `generate_docs` (API docs and examples). + +### `delegate` / `delegate_parallel` (capability `local.delegate`) + +Split complex tasks across multiple isolated subagents and aggregate: + +- `delegate` — sequential: one large prompt to a single subagent, full + result returned. +- `delegate_parallel` — parallel: multiple `(name, prompt)` tasks at once; + results are joined as `name: result` for the main agent. + +| Parameter | Required | Description | +|---|---|---| +| `task` | yes | Task description | +| `system_prompt` | no | Role override | +| `tools` | no | Tool whitelist (e.g. `["read_file", "search_files"]`); empty inherits the main tool table | +| `context_files` | no | File paths whose contents are prepended to the subtask | +| `max_turns` | no | Default 10, cap 50 | +| `timeout` | no | Per-subtask seconds, default 120 | +| `model` | no | Subagent model; inherits by default | + +```toml +# config.toml +delegation = { max_concurrent = 5, default_timeout = 120 } +``` + +Subagents are **always forbidden from delegating further** (created with +`allow_delegate=False`), preventing infinite cascades. The `allow_nested` +config field is parsed and stored but currently has no effect. + +## Event hooks + +`.agenticx/hooks.toml` inserts custom behavior at lifecycle points: +intercept dangerous tools, print warnings, run audit scripts, or ask for +confirmation. + +| Event | Fires when | +|---|---| +| `before_tool_call` | Just before a tool executes | +| `after_tool_call` | After a tool execution completes | +| `on_error` | A tool raises or a subagent fails | +| `on_message` | A user message is received | +| `on_response` | An LLM response is received | + +Governance actions dispatch first; a `block` hit short-circuits all +subsequent hooks: + +| Category | Action | Behavior | +|---|---|---| +| Governance | `block` | Block the operation, return a custom message to the agent | +| Governance | `confirm` | Continue only after user confirmation | +| Governance | `alert` | Red alert; escalates on tool failure | +| Extension | `run` | Execute a shell command (`run = "..."` or argument array) | +| Extension | `warn` | Yellow warning | +| Extension | `log` | Write to the log, not the terminal | + +```toml +# .agenticx/hooks.toml +[[hooks.before_tool_call]] +match = "write_file" +condition = "*.py" +action = "confirm" +message = "About to write {filename}, confirm?" + +[[hooks.before_tool_call]] +match = "run_command" +content_pattern = "*rm -rf*" +action = "block" +message = "Dangerous command detected, blocked" + +[[hooks.after_tool_call]] +match = "write_file" +condition = "*.py" +action = "run" +run = ["python", "-m", "py_compile", "{path}"] +on_fail = "warn" +silent = true +``` + +Matching fields: `match` (tool-name glob, default `"*"`), `condition` +(file-path glob extracted from arguments), `content_pattern` (content glob +over arguments JSON or results). Other fields: `message` (template), +`on_fail` (`warn` default / `alert` / `block`), `silent`. + +Template variables include `{tool_name}`, `{args}`, `{result}`, `{error}`, +`{path}`, `{filename}`, `{filename_stem}`, `{content}`, `{exit_code}`, +`{timestamp}`. + +!!! warning "Run-hook argument boundary" + Run hooks pass template values as **literal process arguments**, without + a shell. Command strings containing variables are parsed before + substitution; pipes and redirections are rejected. The executable cannot + be templated; templated hooks cannot invoke shell interpreters or + interpolate Python code/module names; Windows targets must not be + `.bat`/`.cmd`. Only constant command strings keep shell execution. This + boundary does not sandbox a script that evaluates its arguments as code. + +Skill packages can scope hooks to themselves via +`.agenticx/skills//hooks.toml`, mounted on the same HookBus. Hooks are +subject to trust and permission controls — see +[Security](security-and-platform.md). + +## Scheduled tasks (`/cron`) + +Run Skills on a schedule; each run defaults to its own isolated subagent. +Tasks persist across sessions in `~/.config/AgenticX/cron_jobs.json`. + +```text +/cron add every 5m skill weather Hangzhou +/cron add at 14:30 skill search AI morning briefing # one-shot +/cron add cron "0 9 * * 1-5" skill search morning briefing +/cron add every 1h skill weather Beijing skill search tech news +/cron add every 10m skill search service alerts condition "curl -sf http://health" +/cron add every 5m skill weather Hangzhou no-subagent # main conversation +``` + +Management: `/cron list|pause |resume |remove `. + +`at` tasks auto-disable after execution; each run has a 300-second timeout; +cron tasks do not run while privacy mode is enabled. + +## System prompt and project instructions + +`.agenticx/system-prompt.md` (workspace) or +`~/.config/AgenticX/system-prompt.md` (global) replaces the **base** prompt; +workspace wins. The `PromptPipeline` then appends its sections — you do not +need to redeclare tool usage, rules, or identity: + +```text +[base prompt / system-prompt.md] +[Project instructions] +─── stable prefix: byte-identical for the whole session (prompt-cache friendly) ─── +[Skills templates] [Skill package rules] [Disabled-capability notice] +[Long-lived operation rules] [Current plan] [Experience recall] +[Tool-chain context] [Directive proposals] [Environment info] +─── ephemeral suffix: recomputed every turn ─── +``` + +Project instruction files are auto-discovered upward from the CWD, +first match wins: `.agenticx/rules.jsonl` > `.agenticx/prompt.md` > +`.agenticx/prompt` > `.agenticx/instructions.md` > `.cursorrules` > +`.claude.md` > `CLAUDE.md`. YAML frontmatter is stripped; long files are +truncated 60/40 head/tail at 8000 characters. + +## Rules vs profile + +Two complementary memory forms: + +| Dimension | `/profile` | `/rule` | +|---|---|---| +| Content | Identity, preferences, tech stack (facts) | Operation rules, process constraints | +| Injection | Keyword recall — only relevant turns | Enabled rules — every turn | +| Storage | `.agenticx/memory/.json` | `.agenticx/rules.jsonl` | +| Example | "I'm a backend developer" | "Don't push after commit" | + +Rule of thumb: **`/profile` for "who I am"; `/rule` for "how things should +be done".** + +```text +/rule add "Do not push after each commit; wait until the user says push" +/rule list | edit | enable | disable | remove | clear +/profile list | search | add | remove | clear +``` + +More than 15 enabled rules triggers a trimming hint (tokens keep growing). + +**Directives auto-learning**: tool-call sequences are recorded to +`.agenticx/memory/behavior_patterns.json`; after 5+ turns, adjacent tool +pairs seen 3+ times become rule proposals (confidence = +`min(count / 10, 1.0)`, at most 2 pending at a time). Review with +`/directives proposals`, then `/directives accept ` or `reject `. +Core does not learn directives or generate skills in the background by +default beyond this proposal mechanism; experimental skill evolution +requires the experimental pack and `AGENTICX_EXPERIMENTAL=1`. + +## Memory tiers and sessions + +| Tier | Content | Lifecycle | +|---|---|---| +| Working | Conversation messages; token-budget compression against the model context window (soft threshold → LLM summarization of old messages, hard threshold → truncation) | Within session | +| Mid-term | Plan progress (TTL expiry), reflection hints, tool-chain patterns | Within session | +| Long-term | Cross-session experience learning (`experiences.jsonl`, CJK-aware retrieval) | Across sessions | + +Sessions (topics) isolate working memory: +`.agenticx/session//history.json`. Long-term memories (profile, +skills, rules, experience) are shared across topics. Each topic can carry +**scene memory** (`scene.md`) injected whenever you switch back: + +```text +/session new|list|switch|rename|fork|remove +/session scene Context: data platform, Python 3.11, pytest only +/session scene set # replace +/session scene clear +``` + +Experience memory records task outcomes and tool patterns; long tasks +(6+ messages) are summarized automatically, `/summarize` triggers manually, +and `/feedback good|bad` labels satisfaction. After 3+ consecutive tool +failures, a reflection hint nudges the model to change strategy. + +Conversation history summaries live in `.agenticx/memory/history.json` +(`/memory list|search|remove|clear`). Every LLM call and tool execution is +traced to `.agenticx/traces/.jsonl` for debugging and evaluation +(`/trace`, `/report`, `/stats`). + +Context management commands: `/compress` replaces history with an LLM +summary; `/undo` reverts the last file write/delete via checkpoint +snapshots. \ No newline at end of file diff --git a/docs/en/guides/sdk.md b/docs/en/guides/sdk.md new file mode 100644 index 0000000..412657d --- /dev/null +++ b/docs/en/guides/sdk.md @@ -0,0 +1,180 @@ +--- +description: "Embed AgenticX in Python applications: run_once, streaming, typed events, sessions, and the interactive loop." +--- +# Embedding the SDK + +AgenticX exposes a small public SDK in `dashscope_agenticx.sdk`. Every entry +point runs a **complete agent turn** — model invocation plus tool execution — +not a bare chat completion. + +```python +from dashscope_agenticx.sdk import ( + load_config, + create_agent, + run_once, + run_once_sync, + run_stream, + run_events, + run_interactive, +) +``` + +## One-shot turns + +`run_once_sync` is the easiest entry point for scripts and CI: it streams the +full turn, executes any tool calls, and returns the final assistant text. + +```python +from dashscope_agenticx.sdk import run_once_sync + +reply = run_once_sync("Inspect this project's structure without changing files") +print(reply) +``` + +The async equivalent is `run_once`. Both enable one-shot guards and +acceptance behavior internally; tool execution still respects your +permission policy (default `confirm_mode = "all"` — see +[Security](security-and-platform.md#permissions)). + +## Configuration overrides + +`load_config` reads the normal layered configuration (global → workspace → +environment); explicit arguments only fill in missing values, they do not +override what configuration or environment already set: + +```python +from dashscope_agenticx.sdk import load_config, run_once_sync + +config = load_config(provider="tongyi", model="qwen-plus") +reply = run_once_sync("Summarize this directory", config=config) +``` + +To force a provider/model regardless of configuration, set +`AGENTICX_PROVIDER` / `AGENTICX_MODEL` in the environment. See +[Configuration](../configuration.md). + +## Streaming text + +`run_stream` yields response text chunks as an async iterator. Tool display +text is interleaved with model output, exactly as the terminal shows it: + +```python +import asyncio +from dashscope_agenticx.sdk import run_stream + +async def main(): + async for chunk in run_stream("Write a haiku about the sea"): + print(chunk, end="", flush=True) + +asyncio.run(main()) +``` + +If you stop consuming early, close the generator so the agent's runtime is +released: + +```python +import contextlib + +async with contextlib.aclosing(run_stream("Long task")) as chunks: + async for chunk in chunks: + if "STOP" in chunk: + break +``` + +The convenience wrappers (`run_once`, `run_stream`, `run_events`) create and +close their own agent. When you manage an agent yourself, use `async with` +or call `await agent.aclose()`. + +## Typed events + +`run_events` is the canonical execution API. It yields +`AgentEventEnvelope` objects (alias `AgentEvent`) with a `type`, a `payload` +dict, and correlation fields (`session_id`, `run_id`, `turn_id`, `sequence`, +`event_id`, `timestamp`). Consume events instead of parsing terminal output: + +```python +import asyncio +from dashscope_agenticx.sdk import run_events, AgentEventType + +async def main(): + async for event in run_events("Summarize the project"): + if event.type == AgentEventType.MESSAGE_DELTA: + print(event.payload["text"], end="", flush=True) + elif event.type == AgentEventType.TOOL_STARTED: + print(f"\n[tool] {event.payload.get('name', '')}") + elif event.type == AgentEventType.TURN_FINISHED: + print("\n[done]") + +asyncio.run(main()) +``` + +Notes on the event contract: + +- `MESSAGE_DELTA` payloads carry `text`; tool display deltas additionally + carry `kind="tool"`, `tool_call_id`, and `name`. Filter on `kind` if you + want model text only. +- `TURN_FINISHED` carries the final `output` text and the `tools` used. +- Failures emit an `ERROR` event (`error_type`, `message`) **and then + re-raise** the exception — handle both if you need graceful degradation. + There is no unified exception tree; catch standard exceptions around the + iterator. +- An `Agent` runs one event stream at a time; a second concurrent + `run_events` on the same agent raises `RuntimeError`. + +The full 15-event table is in the +[Agent & Events reference](../reference/agent.md#event-types). + +## Sessions and custom agents + +`create_agent` gives you an explicit `Agent` with a system prompt override +and optional persistent session: + +```python +import asyncio +from dashscope_agenticx.sdk import create_agent + +async def main(): + async with create_agent( + system_prompt="You are a careful code reviewer.", + session_id="review-2026-11", + ) as agent: + async for chunk in agent.run_stream("Review src/app.py"): + print(chunk, end="") + # A second turn continues the same conversation history. + async for chunk in agent.run_stream("Now suggest fixes."): + print(chunk, end="") + +asyncio.run(main()) +``` + +With `session_id`, history persists under +`.agenticx/session//history.json` and survives process restarts. Without +it, the conversation lives only in memory. + +## Embedding the interactive loop + +`run_interactive` launches the full AgenticX interactive experience (REPL or +TUI) under your own product identity — this is how the DashScope SDK Expert +is packaged: + +```python +from dashscope_agenticx.sdk import run_interactive + +run_interactive( + system_prompt="You are an expert on myproduct.", + app_name="MyProduct Expert", + prompt_symbol="myproduct> ", + command="myproduct", +) +``` + +It accepts provider/model defaults, `api_key`/`base_url`, an `sdk_index` +for documentation lookup, and `tui=True/False` to force the interface. + +## Lower-level integration + +For full control, construct a Runtime directly with `RuntimeBuilder` and +create agents from it; see the +[Agent, Runtime & Events reference](../reference/agent.md). The localhost +[Server](security-and-platform.md#local-http-api) exposes the same event +stream over HTTP for non-Python clients. \ No newline at end of file diff --git a/docs/en/guides/security-and-platform.md b/docs/en/guides/security-and-platform.md new file mode 100644 index 0000000..c253b49 --- /dev/null +++ b/docs/en/guides/security-and-platform.md @@ -0,0 +1,201 @@ +--- +description: "AgenticX security model: permissions, privacy, audit, OS sandbox, MCP integration, Bailian CLI, and the localhost Server." +--- +# Security, Platform & MCP + +## Permissions + +The default is `confirm_mode = "all"`: writes and CONFIRM tools require +approval. Explicit `deny` rules always win — including AUTO tools and +`auto_approve` runs. Parallel delegates receive a read-only tool allowlist +enforced during execution, not merely hidden from the model; children do +not inherit the parent's cached approvals. + +Confirmation choices: + +- `y` — allow once. +- `n` — deny once; the agent receives "operation cancelled" and moves on. +- `a` — trust this tool name for **the current turn only** (one + `run_stream` call); cleared automatically at turn end. Inspect with + `/trust`, clear with `/trust clear`. +- `s` — raises `UserAbortedTurn`; the loop ends and control returns to the + prompt. + +DANGEROUS tools (`delete_file`, `delete_directory`) accept only `y`/`n` — +never cached. + +### Always-active protection layers + +Independent of permission level: + +- **Sensitive paths**: reads/writes of `.ssh`, `.aws`, `.gnupg`, `.env`, + `.npmrc`, `shadow`, etc. are always rejected. +- **Hard-blocked commands**: `rm -rf /`, `mkfs`, `dd if=`, `> /dev/sd`, + `chmod -R 777 /` and similar are rejected outright, without confirmation. +- **Read-only classification**: `run_command` auto-allows known read-only + commands (`grep`, `ls`, `find`, `cat`, `git status`, `git log`, + `git diff`, `pip list`, `docker ps`, …). Any write signal (`rm`, `mv`, + `cp`, `chmod`, `sudo`, `pip install`, `make`, redirection `>`, command + substitution `$(…)`) falls back to the confirmation flow. + +### Policy engine + +Preset per-tool / per-command-prefix rules in `permissions.toml` (workspace +`./.agenticx/` overrides global `~/.config/AgenticX/` on the same key). +Policy takes precedence over interactive confirmation; command rules match +by longest prefix: + +```toml +# .agenticx/permissions.toml +[tools] +delete_file = "deny" + +[commands] +"git status" = "allow" +"git push" = "deny" # longest prefix wins over git = allow +``` + +App install/update previews new permissions before copying files. Expert +templates cannot install `skills/**/tools.py`, shell tools, or executable +run hooks — even with `--force`; use trusted App Bundles for executable +extensions. Permission metadata and checksums are **not** OS/filesystem/ +network isolation or a publisher signature. + +## OS sandbox + +`sandbox = true` in config runs shell commands inside an OS sandbox when a +backend is available: + +| Platform | Backend | Notes | +|---|---|---| +| macOS | Seatbelt (`sandbox-exec`, built in) | Profile confines writes to the workspace | +| Linux | bubblewrap (`bwrap`, if installed) | Read-only root with workspace bind | +| Windows | — | No backend; commands run unsandboxed | + +Sandbox support is defense in depth, not a hardened isolation contract. +Availability and limitations depend on the backend; review the reported +execution boundary (`SANDBOX_STATUS` events, `/info`) before automation. + +## Privacy mode + +```text +/privacy on | off | status +``` + +| Effect | Description | +|---|---| +| Cloud capabilities disabled | `bailian.*` treated as not enabled (`/mcp` intercepted); local memory/storage unaffected | +| Scheduled tasks paused | cron runs skipped, marked "skipped due to privacy mode" | +| Audit sanitization | Tool arguments and user input truncated to 20 characters | + +!!! note + Privacy mode does **not** block LLM API calls — conversation content is + still sent to the model provider. For fully offline use, switch to a + local provider such as `ollama`. + +## Audit log + +Key operations append as JSONL to `./.agenticx/audit.log` (per workspace): + +```jsonc +{ + "timestamp": "2026-11-19T10:00:00Z", + "source": "agent", // user / agent / scheduler / system + "action": "tool_call", // input / tool_call / permission / cron / mcp + "subject": "run_command", + "decision": "approved", // approved / denied / executed / skipped / auto + "reason": "", + "details": { "args": { "command": "git status" } } +} +``` + +```text +/audit recent [n] # latest records (default 20) +/audit query tool_call # filter by action +/audit clear +``` + +Under privacy mode, parameter values (`content`, `command`, `query`, +`text`, `prompt`, `url`, `path`, `file`) are truncated to 20 characters +with `…(redacted)`; tool names and decisions are always preserved. + +## MCP integration + +AgenticX is both an MCP **client** and **server**. + +### Client (`/mcp`, capability `bailian.mcp`) + +Connects over **SSE transport**, registering tools as +`mcp__`. Works with the Bailian MCP marketplace and any +SSE-compatible third-party/local service: + +```text +/capability enable bailian.mcp # requires DASHSCOPE_API_KEY for Bailian +/mcp list # marketplace services +/mcp add time # Bailian default endpoint +/mcp add my-server http://localhost:3000/sse # custom SSE URL +/mcp # connected services + tools +/mcp remove my-server +``` + +Connections persist to `[[mcp_servers]]` in workspace `config.toml` and +reconnect on startup. Third-party services that need no Bailian key can +leave `tongyi_api_key` empty; service-side auth is handled at the SSE +endpoint (e.g. token in URL). + +!!! note "Transport limitation" + The MCP client supports SSE over HTTP only — not stdio. Wrap a local + stdio MCP server as a tool via `[[shell_tools]]` / + `[[capabilities.tools]]` instead. + +### Server (`agenticx mcp-server`) + +Exposes registered tools to other MCP-compatible agents over stdio +(JSON-RPC), protocol version `2024-11-05`, methods `tools/list` and +`tools/call`. + +!!! warning + The MCP server executes tools in `auto_approve` mode (no interactive + confirmation). Only expose it to trusted clients. + +## Bailian CLI + +With the `bailian.cli` capability enabled, `bl` on PATH and authenticated +(`bl auth login`), AgenticX registers the full Bailian command set as native +function-call tools (`bailian_text_chat`, `bailian_image_generate`, …). Schemas come from +`bl config export-schema`, cached 24h in +`~/.config/AgenticX/bl-schemas.json`; camelCase parameters convert to +`--kebab-case` flags automatically. Permissions tier by verb: read verbs +Auto, quota/file-producing verbs Confirm. AgenticX passes the configured +DashScope key through as `--api-key`, so authentication is configured once. +`bailian.cli` and `bailian.mcp` can coexist without tool-name collisions. + +## Local HTTP API + +`agenticx serve` starts a token-authenticated localhost Client API for +Runs, Sessions, Artifacts, and Traces: + +```bash +agenticx serve --token # default 127.0.0.1:8765 +# token omitted → generated and printed at startup +``` + +| Route | Method | Purpose | +|---|---|---| +| `/health` | GET | Liveness | +| `/v1/sessions`, `/v1/sessions/` | GET | Session list / state | +| `/v1/artifacts?session_id=…` | GET | Artifacts | +| `/v1/traces` | GET | Trace file names | +| `/v1/runs` | POST | Run a turn (`input`, optional `session_id`, `system_prompt`); returns the typed event list | +| `/v1/permissions*` | POST | Always **403** — permission decisions are local-runtime only | + +Requests need `Authorization: Bearer ` (constant-time comparison). +The server binds only to `127.0.0.1` / `localhost` / `::1`; other hosts are +rejected. Runs force `auto_approve = False` and `confirm_mode = "all"`, and +any action requiring approval is **denied** even when local CLI config +enables automatic execution. This is not an Internet-facing deployment +contract. + +For Python clients, embed the [SDK](sdk.md) directly instead; for +non-Python clients, consume the same `AgentEventEnvelope` payloads from +`/v1/runs`. \ No newline at end of file diff --git a/docs/en/guides/tools-and-skills.md b/docs/en/guides/tools-and-skills.md new file mode 100644 index 0000000..41436a2 --- /dev/null +++ b/docs/en/guides/tools-and-skills.md @@ -0,0 +1,326 @@ +--- +description: "AgenticX tools, permission tiers, custom extensions, the Skills system, and Expert templates." +--- +# Tools, Skills & Experts + +## Built-in tools and permission tiers + +Every tool has a permission tier that decides how it is confirmed: + +| Tier | Behavior | +|---|---| +| **Auto** | No prompt; the model calls it directly | +| **Confirm** | Prompts `[y]es / [n]o / [a]lways (this conversation) / [s]top (abort turn)` | +| **Dangerous** | Only `y` / `n` — destructive operations are asked every time; the "always" cache cannot bypass them | + +Explicit policy denies in `permissions.toml` apply even to AUTO tools and +`auto_approve` runs. See [Permissions](security-and-platform.md#permissions). + +### Filesystem + +| Tool | Permission | Description | +|---|---|---| +| `read_file` | Auto | Read file contents (line offset/limit) | +| `write_file` | Confirm | Write a file, returns a unified diff | +| `list_directory` | Auto | List directory contents with types and sizes | +| `create_directory` | Confirm | Create directories including nested parents | +| `delete_file` | Dangerous | Delete a file (irreversible) | +| `delete_directory` | Dangerous | Delete a directory tree (irreversible) | +| `search_files` | Auto | Search files by glob pattern | +| `move_file` | Confirm | Move / rename a file or directory | + +### Shell + +`run_command` (Confirm) executes shell commands. Dangerous-mode commands are +intercepted and read-only commands are classified automatically. A `timeout` +argument (seconds, default 600, `AGENTICX_COMMAND_TIMEOUT`) caps the run; on +expiry the whole process group is killed, so a pipeline does not outlive the +timeout. + +### Network (optional `web` / `browser` extras) + +| Tool | Permission | Description | +|---|---|---| +| `web_search` | Auto | DuckDuckGo search: titles, URLs, snippets | +| `scrape_web` | Auto | Page plain text via Playwright headless browser (renders JS SPAs) | +| `scrape_web_html` | Auto | Rendered HTML source | +| `scrape_web_screenshot` | Auto | Screenshot saved as an image file | + +Browser tools need a separate Playwright runtime setup after installing the +extra. Camera tools (`camera_capture`, `camera_record`, both Confirm) need +the `camera`/`vision` media extras. + +### Session & configuration (always available) + +`switch_model`, `switch_provider`, `list_models`, `capability_list` (Auto); +`capability_enable`, `capability_disable`, `mcp_connect`, `mcp_disconnect` +(Confirm); `mcp_list_services`, `create_plan`, `complete_step`, +`get_plan_status` (Auto). + +### Subagents (after enabling `local.subagent` / `local.delegate`) + +`subagent_invoke`, `review_code`, `write_tests`, `generate_docs`, `delegate`, +`delegate_parallel` — all Auto. See +[Subagents, Hooks & Memory](agent-patterns.md#subagents-and-delegation). + +### Platform tools (after enabling `bailian.cli`) + +The full Bailian CLI command set is registered as `bailian_` +tools (e.g. `bailian_text_chat`, `bailian_image_generate`). Read verbs +(list/get/status/search) are Auto; write verbs (generate/upload/delete) are +Confirm. Schemas come from `bl config export-schema` and are cached for 24h. +See [Platform integration](security-and-platform.md#bailian-cli). + +## Capabilities + +Optional tool groups are gated by capabilities: + +```text +agenticx> /capability list +agenticx> /capability enable bailian.cli # takes effect after restart +agenticx> /capability disable local.subagent +agenticx> /capability reload +``` + +Commands for disabled capabilities are intercepted with an enable hint +instead of failing on credentials. Installing an extra never grants an App +permissions by itself. + +## Custom tools + +### Layer 1 — configuration as program (no code) + +`custom-extensions.toml` (workspace `./.agenticx/` overrides global +`~/.config/AgenticX/`; files are chmod 600) registers providers, HTTP tool +groups, and shell tools at startup. `/dev reload` hot-reloads it. + +HTTP tool group: + +```toml +[[capabilities]] +key = "moonshot.web" +display = "Moonshot web search" +auth = "bearer:$MOONSHOT_API_KEY" + +[[capabilities.tools]] +name = "web_search" +description = "Web search for real-time information" +endpoint = "https://api.moonshot.cn/v1/tools/web_search" +http_method = "POST" +permission = "auto" # auto / confirm / dangerous +params = [ + {name="query", type="string", required=true, description="Search keywords"}, + {name="count", type="integer", default=10, description="Number of results"}, +] +body_template = '{"query": {{query}}, "count": {{count}}}' +result_jsonpath = "data.results" # optional dot-path extraction +``` + +Auth formats: `bearer:$ENV`, `apikey-header:HeaderName:$ENV`, `none`. +Body templates use Mustache `{{var}}` placeholders (values are JSON-encoded +before substitution). + +Shell tool — wrap a command as an LLM-callable tool: + +```toml +[[shell_tools]] +name = "check_port" +description = "Check whether a TCP port is open" +command_template = "nc -z -w 3 {{host}} {{port}}" +params = [ + {name="host", type="string", required=true}, + {name="port", type="integer", required=true}, +] +permission = "auto" +``` + +Parameterized `{{name}}` values are passed as literal process arguments, +even when the placeholder is quoted. Parameterized pipelines, redirections, +shell interpreters, and executable Python code/module names are rejected; +for complex workflows call a trusted executable script with literal +arguments. Constant commands without parameters keep explicit shell +behavior. + +Provider declarations (`[[providers]]`) and API-key security rules are +covered in [Configuration](../configuration.md#custom-providers). + +### Layer 2 — real Python tools + +Register a `ToolDefinition` with the runtime registry, or use the `@tool` +decorator (the parameter schema is derived from type hints): + +```python +from dashscope_agenticx.tools.registry import ( + PermissionLevel, + ToolDefinition, + tool, +) + +@tool("check_complexity", "Check cyclomatic complexity of a file", + permission=PermissionLevel.AUTO) +async def check_complexity(path: str) -> str: + ... +``` + +Inside a Skill package, expose a `register(registry)` function in `tools.py`; +tool names are automatically prefixed with the package name +(`my-review_check_complexity`): + +```python +from dashscope_agenticx.tools.registry import PermissionLevel, ToolDefinition + +async def check_complexity(path: str) -> str: + ... + +def register(registry): + registry.register(ToolDefinition( + name="check_complexity", + description="Check the cyclomatic complexity of a file", + func=check_complexity, + permission=PermissionLevel.AUTO, + parameters={ + "type": "object", + "properties": {"path": {"type": "string"}}, + "required": ["path"], + }, + )) +``` + +The `/dev` command family scaffolds all of this interactively: +`/dev provider|capability|skill|tool add|list|rm`, `/dev model add`, +`/dev debug tools|schema|call|prompt`, `/dev test provider `. +The legacy `.agenticx/plugins/` auto-loading mechanism is removed — use +Layer-1 TOML, hooks, or Layer-2 modules instead. + +## Skills + +Skills are preset prompt templates invoked with `/skill`. Two forms: +single-file `.md` and directory packages. At startup +`~/.config/AgenticX/skills/` and `.agenticx/skills/` are scanned; a +same-named workspace skill overrides the global one. + +### Single-file skill + +YAML frontmatter defines metadata; the body is the prompt template with +`{arg}` placeholder substitution: + +```markdown +--- +name: review +description: Code review with improvement suggestions +arguments: [file] +--- +Please perform a code review of the following file, focusing on: +1. Potential bugs +2. Performance issues +3. Readability + +File: {file} +``` + +Invoke with `/skill review src/main.py`. Single-file skills are injected +into the system prompt as a compact catalog (args, description, MCP +dependency status). + +### Directory-package skill + +For custom Python tools or dedicated hooks: + +```text +.agenticx/skills/my-review/ +├── skill.toml # metadata, activation rules +├── prompt.md # prompt template +├── tools.py # optional: custom tools (prefixed my-review_) +└── hooks.toml # optional: hooks scoped to this skill +``` + +```toml +# skill.toml +name = "my-review" +version = "1.0.0" +description = "Custom code review with a complexity check tool" +author = "your-name" +always_active = false +triggers = ["*review*", "*audit*"] +``` + +- `always_active = true`: `prompt.md` is injected every turn. +- `triggers`: glob patterns; the skill activates when the user message + matches any pattern. + +### Lifecycle + +```text +/skill list # single files + packages +/skill reload # rescan directories +/skill enable|disable # force state (ignore triggers) +/skill install ./my-review # local path / git+URL / tar.gz URL / registry name[@version] +/skill link ./my-review # dev symlink; /skill reload picks up edits +/skill update |--all +/skill uninstall +/skill search review # installed + registry +/skill publish ./my-review # validate + package tar.gz into .dist/ +``` + +Installation records live in `.agenticx/skills/.agenticx-skills.json`. +URL packages undergo tar path-traversal validation (including link targets) +and a 50 MB size limit. + +A registry is a static TOML/JSON/YAML index — no server dependency: + +```toml +# index.toml +[[skills]] +name = "code-review" +version = "1.2.0" +description = "Code review (security+style+performance)" +source = "git+https://github.com/agenticx/skills/code-review.git" +tags = ["python", "review"] +``` + +Point `skill_registry` in `.agenticx/config.toml` at the index URL or a +local file. Without a registry, `/skill install ` requires a local +path or git URL. + +## Experts + +**Configuration is the Agent.** An Expert is a ready-to-use `.agenticx/` +profile — persona, providers, skills, knowledge index — with no bootstrap +code. Downloading one is the recommended starting point for a new Agent: + +```bash +agenticx expert # list templates +agenticx expert download basic-chat # merge into ./.agenticx/ +agenticx # already the Expert's Agent +``` + +- The Expert's `.agenticx/` tree is merged into the workspace; root-level + files (README etc.) are collected into `.agenticx/` too. +- Same-named files are backed up to `.agenticx/backup/` (single rolling + backup); `/expert restore` undoes the merge — restoring overwritten files + and removing added ones. +- Customize by plain-text editing: `system-prompt.md` (persona), + `skills/*.md` (task templates), `references/*.md` (always-on knowledge, + injected at startup), `custom-extensions.toml` (providers/tools). + +Profiles download from `apps//` in +[dashscope/dashscope-agenticx-experts](https://github.com/dashscope/dashscope-agenticx-experts) +(branch `main` by default). Only the 1.0 App Catalog layout is supported. +Override the source with `expert_repo` / `expert_branch` in global config +or `--repo`. + +Bundled examples: `basic-chat` (minimal general assistant with web search), +`dashscope-sdk-expert` (SDK Q&A with an auto-generated knowledge index and +`/skill update-sdk` refresh), and `bailian-expert`. + +### Experts vs App Bundles + +Expert downloads contain role/configuration data — not executable Python, +shell tools, or run hooks — and are **not** registered as Apps. A production +App Bundle adds a versioned `app.toml` manifest, Runtime compatibility +range, permission diffs, and checksum verification, managed with +`agenticx app list|install|info|verify|update`. `app install` previews new +permissions before writing files and registers the bundle under +`.agenticx/apps/` without activating its profile. A checksum proves content +identity, not publisher authenticity; a local trust flag is not a verified +digital signature. \ No newline at end of file diff --git a/docs/en/index.md b/docs/en/index.md new file mode 100644 index 0000000..241edd4 --- /dev/null +++ b/docs/en/index.md @@ -0,0 +1,143 @@ +--- +description: "DashScope AgenticX — Python agent runtime: terminal CLI, embeddable SDK, tools, skills, and governed execution." +--- +# DashScope AgenticX + +

+[**v{{ agenticx_version }}**](release-notes.md){ .hero-badge } +[**Python 3.10+**](about.md#requirements){ .hero-badge } +[**MIT**](https://github.com/dashscope/dashscope-agenticx/blob/main/pyproject.toml){ .hero-badge } +

+ +**Enterprise AI experts, built to act.** AgenticX is a Python agent +runtime for building and running domain experts. It connects models, +tools, skills, permissions, and persistent sessions through one runtime, +with a terminal interface and APIs for embedded applications. + +
+[Quickstart](quickstart.md){ .md-button .md-button--primary } +[Embed the SDK](guides/sdk.md){ .md-button } +
+ +Use it directly as a local assistant, embed it in a Python application, +or package a domain expert as a versioned App Bundle. DashScope SDK +Expert and Bailian Expert are bundled expert templates illustrating this +application layer. + +## Features + +
+ +- :material-robot:{ .lg .middle } **One runtime** + + --- + + Instance-owned tool, skill, hook, and session state; shared + construction through `RuntimeBuilder`. + +- :material-console:{ .lg .middle } **Terminal & TUI** + + --- + + A full interactive CLI with 40+ slash commands, plus an optional + Textual TUI with rich Markdown output. + +- :material-code-braces:{ .lg .middle } **Embeddable SDK** + + --- + + `run_once`, `run_stream`, and typed `run_events` for scripts, CI, + IDE plugins, and applications. + +- :material-toolbox:{ .lg .middle } **Tools & skills** + + --- + + Filesystem, shell, web, browser, camera, MCP services, markdown + skills, and declarative TOML extensions — no code required. + +- :material-shield-check:{ .lg .middle } **Governed execution** + + --- + + Permission tiers, policy files, OS sandbox backends, audit log, + privacy mode, and event hooks. + +- :material-package-variant:{ .lg .middle } **Apps & experts** + + --- + + Versioned App manifests with checksum verification and permission + diffs; one-command expert workspace initialization. + +
+ +## Requirements + +- Python 3.10+ (Pillow-backed `vision`/`media` extras need 3.11+). +- A model API key for your provider — for the default Tongyi/DashScope + provider: + +```shell +export DASHSCOPE_API_KEY="" +``` + +## Installation + +```shell +python -m pip install "dashscope-agenticx[tui]" +agenticx --version +``` + +For a minimal, non-TUI install use `pip install dashscope-agenticx` and +start with `agenticx --cli`. Optional extras (provider SDKs, web, +browser, media) are listed in [Quickstart](quickstart.md#optional-extras). + +## Examples + +### Run it in the terminal + +```shell +agenticx # interactive session +agenticx -c "Summarize this project" # one-shot, then exit +``` + +### Run it from Python + +```python +from dashscope_agenticx.sdk import run_once_sync + +reply = run_once_sync("Inspect this project's structure without changing files") +print(reply) +``` + +### Consume typed events + +```python +import asyncio + +from dashscope_agenticx.sdk import run_events + + +async def main(): + async for event in run_events("Summarize the project"): + print(event.type.value, event.payload) + + +asyncio.run(main()) +``` + +One-shot runs execute tools, not just generate text — start in a +suitable workspace and choose permissions appropriate to the task. + +## Where to go next + +- [Quickstart](quickstart.md) — install, first run, first SDK call. +- [Configuration](configuration.md) — config layers, providers, keys. +- [CLI & Commands](cli.md) — every slash command and CLI option. +- [Reference](reference/sdk.md) — the full API surface. + +AgenticX is not a hosted service, a hardened OS sandbox, or a complete +workflow platform. Voice, camera, browser, web search, scheduler, and +experimental features are optional, not prerequisites for the core +runtime. \ No newline at end of file diff --git a/docs/en/migration.md b/docs/en/migration.md new file mode 100644 index 0000000..13b15a8 --- /dev/null +++ b/docs/en/migration.md @@ -0,0 +1,75 @@ +--- +description: "Migrate from legacy AgenticCLI to DashScope AgenticX 1.0: naming, directories, credentials, and compatibility." +--- +# Migrating to AgenticX 1.0 + +This guide describes migration from legacy AgenticCLI versions to +DashScope AgenticX `{{ agenticx_version }}`. + +## Current identities + +| Aspect | AgenticX 1.0 | +|---|---| +| Product | AgenticX / DashScope AgenticX | +| Distribution | `pip install dashscope-agenticx` (extras as needed, e.g. `"dashscope-agenticx[all]"`) | +| Import | `dashscope_agenticx`, `dashscope_agenticx.sdk` | +| Command | `agenticx` — there is no official short alias | +| Apps | `agenticx app install`; `/expert` manages role templates | +| Workspace | `.agenticx/` | +| Environment | `AGENTICX_*` variables | +| Global config | Platform-standard directory for app name `AgenticX` (via `platformdirs`); `AGENTICX_HOME` overrides | +| Events | Consume `AgentEventEnvelope` via `run_events()` | + +!!! warning "Do not install the bare `agenticx` PyPI package" + The unrelated bare `agenticx` distribution is a different project. + The official distribution is `dashscope-agenticx`. + +Rename legacy `AGENTICCLI_*` and `ACLI_*` environment variables to their +`AGENTICX_*` equivalents. Optional packs (TUI, provider SDKs, web, browser, +media) are installed explicitly — see [Quickstart](quickstart.md#optional-extras). + +Expert downloads default to +`https://github.com/dashscope/dashscope-agenticx-experts.git` on branch `main`. +An explicit `expert_repo` setting or `--repo` flag selects another source. +The catalog uses only `apps//`; legacy top-level Expert directories are +not supported. + +## One-way directory migration + +Workspace migration prefers `.agenticcli/` and otherwise falls back to +`.acli/`. Global migration prefers the legacy platform-standard `AgenticCLI` +directory and otherwise falls back to `~/.acli/`. The selected source is +migrated once to `.agenticx/` (workspace) or the platform-standard `AgenticX` +directory (global). + +- An atomic rename is used when source and destination support it. +- Otherwise a verified copy is made. The source is preserved after copying; + remove it manually once you have verified the result. +- If the destination already exists, both directories are left untouched: + no merge, no overwrite, no migration into it. +- Writes go only to the new location. There is no dual write to legacy + directories; migration does not run repeatedly or copy changes back. + +## Credentials + +New credentials are written as OS-keyring references under the +`dashscope-agenticx` service. Reads retain fallback to the legacy `agenticcli` +keyring service so existing references continue to resolve; legacy `ENC:` +values are also read for migration. + +New saves do not dual-write secrets to legacy services and do not persist +reversible API-key ciphertext in TOML. Do not treat legacy `ENC:` values as +secure encryption — re-save keys to move them into the OS keyring. + +## What does not migrate automatically + +- Import statements (`agenticcli` → `dashscope_agenticx`) and environment + variable names need an explicit update in your code and shell profiles. +- Existing destination directories are never merged; resolve conflicts + manually. +- Expert/App installation contracts changed: role templates live under + `apps//` in the catalog; versioned App Bundles are managed with + `agenticx app …`, not `/expert`. + +See [Security & Compatibility](guides/security-and-platform.md) for the +trust and permission model that governs migrated configuration. \ No newline at end of file diff --git a/docs/en/quickstart.md b/docs/en/quickstart.md new file mode 100644 index 0000000..d9d6acf --- /dev/null +++ b/docs/en/quickstart.md @@ -0,0 +1,117 @@ +--- +description: "Install AgenticX, configure an API key, run the first terminal session and the first Python SDK call." +--- +# Quickstart + +## Install + +Python **3.10+** is required. + +=== "Package" + + ```shell + python -m pip install "dashscope-agenticx[tui]" + agenticx --version + ``` + + For a minimal, non-TUI installation: + + ```shell + python -m pip install dashscope-agenticx + agenticx --cli + ``` + +=== "From source" + + ```shell + python -m venv .venv + # macOS / Linux + source .venv/bin/activate + # Windows PowerShell: .venv\Scripts\Activate.ps1 + python -m pip install -e ".[tui]" + agenticx --version + ``` + +The distribution is **`dashscope-agenticx`**, the import namespace is +**`dashscope_agenticx`**, and the only official command is **`agenticx`**. +The bare `agenticx` PyPI distribution is a different project. + +### Optional extras + +| Extra | Purpose | +|---|---| +| `tui` | Textual interface with fixed input panel and rich output | +| `provider-openai`, `provider-anthropic` | Provider-specific SDK routes | +| `web`, `browser` | Search and browser tools (browser runtime setup is separate) | +| `voice`, `camera`, `vision` (or `media`) | Audio, camera, and image dependencies | +| `dev`, `all` | Test/build tooling and all optional features | + +```shell +python -m pip install "dashscope-agenticx[web,browser]" +``` + +Installing dependencies does not grant an App permissions. + +## Set an API key + +For the default Tongyi/DashScope provider: + +```shell +export DASHSCOPE_API_KEY="" +# Windows PowerShell: $env:DASHSCOPE_API_KEY="" +``` + +Other providers use `ANTHROPIC_API_KEY` / `OPENAI_API_KEY`, or the +per-provider key slots managed by `/provider` (stored in the OS +keyring). See [Configuration](configuration.md#global-config-api-keys). Do not paste +real keys into tracked configuration files. + +## First terminal run + +```shell +agenticx +``` + +A new workspace without `.agenticx/config.toml` starts the `/setup` +wizard: username, configuration mode (Default — Alibaba/Bailian, or +Custom), provider/model, API key, capabilities, and an optional expert +template. Existing configured workspaces skip straight to the prompt. + +```text +agenticx> Summarize this project's structure before making any edits +agenticx> /help +agenticx> /provider +agenticx> /session +``` + +Other entry modes: + +```shell +agenticx --cli # inline REPL with native scrollback +agenticx --tui # Textual interface (tui extra) +agenticx -c "List the files here and summarize the project" +agenticx --dry-run # preview loaded configuration +``` + +One-shot runs can execute tools. Start in a suitable workspace and keep +the default `confirm_mode = "all"` until you trust the task. + +## First SDK call + +```python +from dashscope_agenticx.sdk import run_once_sync + +reply = run_once_sync("Summarize the key points of README.md") +print(reply) +``` + +`run_once_sync` runs a complete turn — including tool calls — and +returns the final assistant text. For streaming and typed events see +[Embedding the SDK](guides/sdk.md). + +## Next steps + +- [Configuration](configuration.md) — config files, providers, keys. +- [CLI & Commands](cli.md) — the full command surface. +- [Tools, Skills & Experts](guides/tools-and-skills.md) — extend the agent. +- [Security, Platform & MCP](guides/security-and-platform.md) — permissions and platform capabilities. \ No newline at end of file diff --git a/docs/en/reference/agent.md b/docs/en/reference/agent.md new file mode 100644 index 0000000..30396db --- /dev/null +++ b/docs/en/reference/agent.md @@ -0,0 +1,86 @@ +--- +description: "Agent, Runtime, and typed event stream API reference for AgenticX." +--- +# Agent, Runtime & Events + +An `Agent` runs one conversation turn at a time and emits typed events. +The `Runtime` wires configuration, providers, tools, and platforms +together; `RuntimeBuilder` is the composition entry point used by both +the CLI and the [SDK](sdk.md). + +## Lifecycle + +`Agent` supports `async with` and explicit `await agent.aclose()`. The +SDK helpers (`run_once`, `run_stream`, `run_events`) close the agent for +you; when you drive `Agent` directly, close it yourself: + +```python +import asyncio + +from dashscope_agenticx.sdk import create_agent + + +async def main(): + async with create_agent(session_id="demo") as agent: + async for chunk in agent.run_stream("Hello!"): + print(chunk, end="", flush=True) + + +asyncio.run(main()) +``` + +Both `run_events()` and `run_stream()` are single-pass async generators. +To stop early, close the generator (`contextlib.aclosing`) — see +[Embedding the SDK](../guides/sdk.md). + +## Event types + +Every event is an `AgentEventEnvelope` with a type from `AgentEventType`: + +| Type | Meaning | +|---|---| +| `run.started` | A turn began | +| `message.delta` | Incremental assistant text | +| `reasoning.delta` | Incremental reasoning/thinking text | +| `plan.updated` | The agent's plan changed | +| `tool.started` / `tool.finished` | Tool execution boundaries | +| `permission.requested` / `permission.resolved` | Approval flow | +| `usage.updated` | Token usage accounting | +| `artifact.created` | A deliverable file was produced | +| `compression.completed` | Context compression ran | +| `provider.switched` | Fallback/routing changed provider | +| `sandbox.status` | Sandbox backend state | +| `turn.finished` | The turn completed | +| `error` | A recoverable or fatal error surfaced | + +Errors are delivered as `error` events inside the stream — AgenticX has +no unified exception hierarchy for model/tool failures. See +[Eval](eval.md#exceptions) for the few control-flow exceptions. + +## Agent + +::: dashscope_agenticx.agent.Agent + +## Runtime + +::: dashscope_agenticx.runtime.Runtime + +::: dashscope_agenticx.runtime.RuntimeBuilder + +::: dashscope_agenticx.runtime.RuntimeContext + +::: dashscope_agenticx.runtime.import_builtin_tools + +::: dashscope_agenticx.runtime.create_runtime_memory + +## Events + +::: dashscope_agenticx.events.AgentEventType + +::: dashscope_agenticx.events.AgentEventEnvelope + +::: dashscope_agenticx.events.AgentEvent + +::: dashscope_agenticx.events.ToolDisplayText + +::: dashscope_agenticx.events.iter_message_deltas \ No newline at end of file diff --git a/docs/en/reference/eval.md b/docs/en/reference/eval.md new file mode 100644 index 0000000..823c105 --- /dev/null +++ b/docs/en/reference/eval.md @@ -0,0 +1,37 @@ +--- +description: "Evaluation harness and control-flow exceptions API reference." +--- +# Eval + +The eval harness runs scripted cases against the agent and compares +providers. Cases load from YAML/JSON suites; results carry per-case +scores and transcripts. + +## Harness + +::: dashscope_agenticx.eval.EvalCase + +::: dashscope_agenticx.eval.EvalResult + +::: dashscope_agenticx.eval.EvalRunner + +::: dashscope_agenticx.eval.ProviderComparator + +::: dashscope_agenticx.eval.load_eval_suite + +## Exceptions + +AgenticX surfaces model and tool failures as `error` events in the +[agent event stream](agent.md#event-types), not as a unified exception +tree. The few exceptions that do exist are control-flow signals or +platform-specific: + +- `UserAbortedTurn` / `UserSupplement` — interactive turn control. +- `BailianCLIError` / `MCPError` — Bailian platform failures + ([Platforms](platforms.md#bailian)). +- `RetriesExhausted` — provider hardening gave up + ([Providers](providers.md#hardening)). + +::: dashscope_agenticx.utils.exceptions.UserAbortedTurn + +::: dashscope_agenticx.utils.exceptions.UserSupplement \ No newline at end of file diff --git a/docs/en/reference/governance.md b/docs/en/reference/governance.md new file mode 100644 index 0000000..73cb6c4 --- /dev/null +++ b/docs/en/reference/governance.md @@ -0,0 +1,125 @@ +--- +description: "Permissions, sandbox, audit, hooks, scheduling, and the execution engine API reference." +--- +# Governance & Engine + +Governance covers permission policy, OS sandboxing, audit logging, event +hooks, and scheduled tasks. The engine layer is the turn execution +kernel: model invocation, tool coordination, prompt assembly, acceptance +gates, and deliverable collection. + +See [Security, Platform & MCP](../guides/security-and-platform.md) and +[Subagents, Hooks & Memory](../guides/agent-patterns.md) for the +user-facing flows (`permissions.toml`, `hooks.toml`, `/cron`, `/rule`). + +## Permissions + +::: dashscope_agenticx.permission.PermissionPolicy + +::: dashscope_agenticx.permission.load_permission_policy + +::: dashscope_agenticx.permission.load_permissions_file + +::: dashscope_agenticx.permission.get_permission_policy + +::: dashscope_agenticx.permission.set_permission_policy + +::: dashscope_agenticx.permission.configure_permission_policy + +## Sandbox + +::: dashscope_agenticx.sandbox.detect_backend + +::: dashscope_agenticx.sandbox.available + +::: dashscope_agenticx.sandbox.is_enabled + +::: dashscope_agenticx.sandbox.set_enabled + +::: dashscope_agenticx.sandbox.build_argv + +::: dashscope_agenticx.sandbox.seatbelt_profile + +::: dashscope_agenticx.sandbox.bwrap_argv + +::: dashscope_agenticx.sandbox.is_sandboxed_path + +## Audit + +::: dashscope_agenticx.audit.AuditEvent + +::: dashscope_agenticx.audit.AuditLogger + +::: dashscope_agenticx.audit.get_audit_logger + +::: dashscope_agenticx.audit.configure_audit_logger + +## Hooks + +::: dashscope_agenticx.hooks.Hook + +::: dashscope_agenticx.hooks.HookBus + +::: dashscope_agenticx.hooks.HookContext + +::: dashscope_agenticx.hooks.HookActionResult + +::: dashscope_agenticx.hooks.HookDispatchResult + +::: dashscope_agenticx.hooks.create_hook_bus + +## Scheduling + +::: dashscope_agenticx.scheduler.Scheduler + +::: dashscope_agenticx.scheduler.CronJob + +::: dashscope_agenticx.scheduler.ScheduleSpec + +::: dashscope_agenticx.scheduler.SkillInvocation + +::: dashscope_agenticx.scheduler.parse_cron_add + +::: dashscope_agenticx.scheduler.next_cron_fire + +## Execution kernel + +::: dashscope_agenticx.engine.ModelInvoker + +::: dashscope_agenticx.engine.RunGuards + +::: dashscope_agenticx.engine.ToolCoordinator + +::: dashscope_agenticx.engine.SessionPersistence + +::: dashscope_agenticx.executor.Executor + +::: dashscope_agenticx.executor.ToolOutcome + +::: dashscope_agenticx.executor.classify_tool_text + +::: dashscope_agenticx.prompt_pipeline.PromptContext + +::: dashscope_agenticx.prompt_pipeline.default_pipeline + +::: dashscope_agenticx.acceptance.AcceptanceGate + +::: dashscope_agenticx.acceptance.GateVerdict + +::: dashscope_agenticx.acceptance.discover_acceptance_command + +::: dashscope_agenticx.deliverable.collect_deliverables + +::: dashscope_agenticx.deliverable.surface_deliverables + +## Subagents & delegation + +::: dashscope_agenticx.agents.subagents.SubagentDef + +::: dashscope_agenticx.agents.subagents.discover_subagents + +::: dashscope_agenticx.agents.subagent.bind_subagent_context + +::: dashscope_agenticx.agents.subagent.register_subagent_tool + +::: dashscope_agenticx.agents.delegate.bind_delegate_context \ No newline at end of file diff --git a/docs/en/reference/memory.md b/docs/en/reference/memory.md new file mode 100644 index 0000000..4160837 --- /dev/null +++ b/docs/en/reference/memory.md @@ -0,0 +1,65 @@ +--- +description: "Memory managers, session persistence, local history, and context compression API reference." +--- +# Memory & Sessions + +AgenticX keeps conversation state at three levels: in-turn session +history, persistent per-session files under `.agenticx/session//`, +and long-term memory via the configured platform (Bailian by default, +local otherwise). Context compression keeps long runs inside the model +window. + +See [Subagents, Hooks & Memory](../guides/agent-patterns.md) for the +user-facing `/memory`, `/session`, and `/profile` flows. + +## Memory manager + +::: dashscope_agenticx.memory.manager.MemoryManager + +::: dashscope_agenticx.memory.manager.SessionMemory + +::: dashscope_agenticx.memory.manager.PersistentMemory + +## Sessions + +::: dashscope_agenticx.session.SessionManager + +::: dashscope_agenticx.session.SessionMeta + +::: dashscope_agenticx.session.get_session_manager + +::: dashscope_agenticx.session.set_session_manager + +## Session event log + +::: dashscope_agenticx.session_events.SessionEventLog + +::: dashscope_agenticx.session_events.project_session_state + +::: dashscope_agenticx.session_events.latest_snapshot_messages + +## Local platform storage + +::: dashscope_agenticx.platforms.local.memory.LocalMemoryClient + +::: dashscope_agenticx.platforms.local.history.store_history + +::: dashscope_agenticx.platforms.local.history.list_history + +::: dashscope_agenticx.platforms.local.history.search_history + +::: dashscope_agenticx.platforms.local.history.export_history + +## Context compression + +::: dashscope_agenticx.compression.compress_messages + +::: dashscope_agenticx.compression.should_compress + +::: dashscope_agenticx.compression.estimate_tokens + +::: dashscope_agenticx.compression.estimate_message_tokens + +::: dashscope_agenticx.compression.preserve_recent_messages + +::: dashscope_agenticx.compression.shrink_old_tool_messages \ No newline at end of file diff --git a/docs/en/reference/platforms.md b/docs/en/reference/platforms.md new file mode 100644 index 0000000..ad798e8 --- /dev/null +++ b/docs/en/reference/platforms.md @@ -0,0 +1,74 @@ +--- +description: "Platform protocols, Bailian CLI/MCP clients, MCP server mode, and the local HTTP API reference." +--- +# Platforms, MCP & Server + +Platforms supply memory, knowledge, and CLI capabilities. The default +`bailian` platform wraps the Bailian CLI and MCP services; `local` +keeps everything on disk. AgenticX can also expose its own tools to +other MCP clients (`agenticx mcp-server`) and serve a token-authenticated +localhost HTTP API (`agenticx serve`). + +See [Security, Platform & MCP](../guides/security-and-platform.md) for +setup and usage. + +## Platform protocols + +::: dashscope_agenticx.platforms.base.MemoryProvider + +::: dashscope_agenticx.platforms.base.MemoryNode + +::: dashscope_agenticx.platforms.base.MemoryLibrary + +::: dashscope_agenticx.platforms.base.SearchResult + +::: dashscope_agenticx.platforms.base.KBProvider + +::: dashscope_agenticx.platforms.base.DataProvider + +::: dashscope_agenticx.platforms.base.PromptProvider + +## Factories + +::: dashscope_agenticx.platforms.get_memory_provider + +::: dashscope_agenticx.platforms.get_cli_provider + +## Bailian + +::: dashscope_agenticx.platforms.bailian.cli.BailianCLIClient + +::: dashscope_agenticx.platforms.bailian.cli.CLIResult + +::: dashscope_agenticx.platforms.bailian.cli.BailianCLIError + +::: dashscope_agenticx.platforms.bailian.mcp.MCPClient + +::: dashscope_agenticx.platforms.bailian.mcp.MCPError + +## MCP server mode + +Expose AgenticX tools over MCP stdio (`agenticx mcp-server`): + +::: dashscope_agenticx.mcp_server.tools_to_mcp_schema + +::: dashscope_agenticx.mcp_server.handle_mcp_request + +::: dashscope_agenticx.mcp_server.run_stdio_server + +::: dashscope_agenticx.mcp_server.main + +::: dashscope_agenticx.mcp_stdio.StdioMCPClient + +## Local HTTP API + +`agenticx serve` binds to localhost only and requires a bearer token; +non-localhost bind addresses are rejected. + +::: dashscope_agenticx.server.LocalAPI + +::: dashscope_agenticx.server.create_server + +::: dashscope_agenticx.server.serve + +::: dashscope_agenticx.server.generate_server_token \ No newline at end of file diff --git a/docs/en/reference/providers.md b/docs/en/reference/providers.md new file mode 100644 index 0000000..4548ef2 --- /dev/null +++ b/docs/en/reference/providers.md @@ -0,0 +1,74 @@ +--- +description: "LLM provider protocol, built-in providers, routing, and hardening API reference." +--- +# Providers + +Providers adapt model backends to a single protocol (`LLMProvider`: +`chat`, `chat_stream`, `aclose`). The built-in Tongyi provider talks to +DashScope over httpx directly; OpenAI and Anthropic providers are +optional extras. + +| Provider | Install | Notes | +|---|---|---| +| `tongyi` (default) | core | DashScope native generation endpoints over httpx | +| `openai` | `pip install "dashscope-agenticx[provider-openai]"` | OpenAI and compatible gateways | +| `anthropic` | `pip install "dashscope-agenticx[provider-anthropic]"` | Anthropic Messages API | + +Custom providers can be declared in `.agenticx/custom-extensions.toml` +without writing Python — see +[Tools, Skills & Experts](../guides/tools-and-skills.md). + +Routing honors `Config.fallback_providers`, MaaS gateway settings +(`workspace`, `region`, `maas_api_key`), and per-provider profiles built +from config. Transient failures are retried by the hardening wrapper; +`provider.switched` events report routing changes. + +## Protocol & shared types + +::: dashscope_agenticx.providers.base.LLMProvider + +::: dashscope_agenticx.providers.base.ToolCall + +::: dashscope_agenticx.providers.base.LLMResponse + +::: dashscope_agenticx.providers.base.LLMChunk + +## Built-in providers + +::: dashscope_agenticx.providers.tongyi.TongyiProvider + +::: dashscope_agenticx.providers.openai.OpenAIProvider + +::: dashscope_agenticx.providers.anthropic.AnthropicProvider + +## Profiles & routing + +::: dashscope_agenticx.providers.profile.ProviderProfile + +::: dashscope_agenticx.providers.profile.ProviderChain + +::: dashscope_agenticx.providers.profile.build_profiles_from_config + +::: dashscope_agenticx.providers.profile.validate_key_for_profile + +::: dashscope_agenticx.providers.profile.maas_gateway + +::: dashscope_agenticx.providers.profile.warn_legacy_gateway + +## Hardening + +::: dashscope_agenticx.providers.hardening.HardenedProvider + +::: dashscope_agenticx.providers.hardening.RetriesExhausted + +::: dashscope_agenticx.providers.hardening.is_retryable_error + +::: dashscope_agenticx.providers.hardening.account_error_hint + +## Protocol adapters + +::: dashscope_agenticx.providers.adapter.anthropic_to_openai_request + +::: dashscope_agenticx.providers.adapter.openai_to_anthropic_response + +::: dashscope_agenticx.providers.adapter.anthropic_to_openai_response \ No newline at end of file diff --git a/docs/en/reference/sdk.md b/docs/en/reference/sdk.md new file mode 100644 index 0000000..db43c54 --- /dev/null +++ b/docs/en/reference/sdk.md @@ -0,0 +1,83 @@ +--- +description: "AgenticX embeddable SDK entry points and configuration API reference." +--- +# SDK & Config + +The embeddable SDK lives in `dashscope_agenticx.sdk` — a stable, typed +surface on top of the agent runtime for scripts, CI pipelines, IDE +plugins, and other Python programs. For a task-oriented walkthrough see +[Embedding the SDK](../guides/sdk.md); for config files and environment +variables see [Configuration](../configuration.md). + +```python +from dashscope_agenticx.sdk import run_once_sync + +print(run_once_sync("Summarize README.md")) +``` + +!!! note "Import path" + Import from `dashscope_agenticx.sdk`. The top-level package re-exports + the most common helpers, but the `sdk` module is the documented, + complete surface. + +## Configuration resolution + +`Config.load()` merges three layers, in increasing priority: + +1. Global config: `~/.config/AgenticX/config.toml` +2. Workspace config: `./.agenticx/config.toml` +3. Environment variables fill remaining gaps (`DASHSCOPE_API_KEY`, + `ANTHROPIC_API_KEY`, `OPENAI_API_KEY`, `AGENTICX_WORKSPACE`, + `AGENTICX_REGION`, `AGENTICX_MAAS_API_KEY`, …) + +`AGENTICX_PROVIDER`, `AGENTICX_MODEL`, `AGENTICX_OPENAI_BASE_URL` and +`AGENTICX_MCP_SERVERS` force-override the resolved values. +`load_config()` in the SDK applies caller-supplied arguments only where +the resolved config still has gaps. + +`Config.api_key` is a property that routes to the per-provider key field +(`tongyi_api_key`, `anthropic_api_key`, `openai_api_key`) based on +`Config.provider`. + +## SDK entry points + +::: dashscope_agenticx.sdk + options: + heading_level: 3 + members: + - load_config + - create_agent + - run_events + - run_stream + - run_once + - run_once_sync + - run_interactive + +## Config + +::: dashscope_agenticx.config.Config + +Key defaults: `max_turns=50`, `timeout=30` (seconds per model request), +`platform="bailian"`, `memory_enabled=True`, `session_persist=True`. + +## Nested config types + +::: dashscope_agenticx.config.MCPServerConfig + +::: dashscope_agenticx.config.SubagentConfig + +::: dashscope_agenticx.config.DelegationConfig + +## Model helpers + +::: dashscope_agenticx.config.DEFAULT_MODEL + +::: dashscope_agenticx.config.context_window_for_model + +::: dashscope_agenticx.config.normalize_model_name + +::: dashscope_agenticx.config.register_custom_model + +::: dashscope_agenticx.config.is_vision_model + +::: dashscope_agenticx.config.is_audio_model \ No newline at end of file diff --git a/docs/en/reference/tools.md b/docs/en/reference/tools.md new file mode 100644 index 0000000..298aabb --- /dev/null +++ b/docs/en/reference/tools.md @@ -0,0 +1,118 @@ +--- +description: "Built-in tools, the @tool registry, skills, apps, and runtime extensions API reference." +--- +# Tools & Skills + +Tools are plain Python functions registered with the `@tool` decorator; +the registry offers their schemas to the model and enforces permission +levels at execution time. Skills are markdown playbooks the agent can +load on demand; apps and experts package skills plus configuration. + +For walkthroughs see +[Tools, Skills & Experts](../guides/tools-and-skills.md). + +## Registry + +::: dashscope_agenticx.tools.registry.tool + +::: dashscope_agenticx.tools.registry.ToolRegistry + +::: dashscope_agenticx.tools.registry.ToolDefinition + +::: dashscope_agenticx.tools.registry.PermissionLevel + +::: dashscope_agenticx.tools.registry.RuntimeToolRegistry + +::: dashscope_agenticx.tools.registry.bind_tool_registry + +## Built-in tools + +Core tools ship with the base install: + +::: dashscope_agenticx.tools.filesystem + +::: dashscope_agenticx.tools.shell + +::: dashscope_agenticx.tools.session + +::: dashscope_agenticx.tools.checkpoint + +::: dashscope_agenticx.tools.skills + +::: dashscope_agenticx.tools.platform + +Optional tools need extras; their modules import lazily, so the +reference below is safe to browse on a core install: + +| Module | Extra | +|---|---| +| `tools.web_search` | `dashscope-agenticx[web]` | +| `tools.browser` | `dashscope-agenticx[browser]` | +| `tools.camera`, `tools.vision` | `dashscope-agenticx[media]` | + +::: dashscope_agenticx.tools.web_search + +::: dashscope_agenticx.tools.browser + +::: dashscope_agenticx.tools.camera + +::: dashscope_agenticx.tools.vision + +## Skills + +::: dashscope_agenticx.skills.base.Skill + +::: dashscope_agenticx.skills.base.register + +::: dashscope_agenticx.skills.base.load_skill_files + +::: dashscope_agenticx.skills.base.register_skill_file + +::: dashscope_agenticx.skills.base.list_skills + +::: dashscope_agenticx.skills.base.render_skill + +::: dashscope_agenticx.skills.manager.SkillManager + +::: dashscope_agenticx.skills.manager.get_skill_manager + +## Apps & experts + +::: dashscope_agenticx.apps.manifest.AppManifest + +::: dashscope_agenticx.apps.manifest.AppTrust + +::: dashscope_agenticx.apps.manifest.AppPermissions + +::: dashscope_agenticx.apps.manifest.load_app_manifest + +::: dashscope_agenticx.apps.manifest.compute_app_checksum + +::: dashscope_agenticx.apps.manifest.permission_diff + +::: dashscope_agenticx.apps.store.install + +::: dashscope_agenticx.apps.store.AppInstallResult + +::: dashscope_agenticx.apps.store.load_registry + +::: dashscope_agenticx.apps.store.runtime_compatible + +## Runtime extensions + +Declarative providers, tools, capabilities, and skills from +`.agenticx/custom-extensions.toml`: + +::: dashscope_agenticx.extensions.CustomExtensions + +::: dashscope_agenticx.extensions.CustomProvider + +::: dashscope_agenticx.extensions.CustomTool + +::: dashscope_agenticx.extensions.CustomCapability + +::: dashscope_agenticx.extensions.CustomSkill + +::: dashscope_agenticx.extensions.CustomShellTool + +::: dashscope_agenticx.extensions.load_extensions \ No newline at end of file diff --git a/docs/en/release-notes.md b/docs/en/release-notes.md new file mode 100644 index 0000000..90272cb --- /dev/null +++ b/docs/en/release-notes.md @@ -0,0 +1,108 @@ +--- +description: "DashScope AgenticX release notes for 1.0.2, 1.0.1, and 1.0.0." +--- +# Release Notes + +AgenticX follows [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +The full history lives in the repository +[`CHANGELOG.md`](https://github.com/dashscope/dashscope-agenticx/blob/main/CHANGELOG.md); +this page summarizes the stable 1.0 releases. + +## 1.0.2 — 2026-11-19 + +### Added + +- Bilingual (English / 中文) documentation site: quickstart, configuration, + CLI and slash-command reference, migration, guides (embedding the SDK, + tools & skills, subagents & memory, security & platform), developer guide, + and an API reference generated from source. +- GitHub Actions workflow building the site with `mkdocs build --strict` on + pull requests and deploying to GitHub Pages on pushes to `main`. +- README links to the published documentation site. + +### Changed + +- The doc-code consistency guard accepts the remote DashScope logo URL used + by the READMEs. + +### Fixed + +- Browser tool docstring argument indentation so the API reference parses + cleanly under `mkdocs build --strict`. + +## 1.0.1 — 2026-11-11 + +### Added + +- End-to-end App Catalog installation and verification quick starts, + including the separate Expert activation step and one-shot `agenticx -c` + usage. +- DashScope and MaaS request attribution through `x-dashscope-sdk-client` + and `x-dashscope-sdk-session-id` across Native, OpenAI-compatible, + Anthropic-compatible, MCP, ASR, and TTS requests. Third-party endpoints do + not receive these headers. + +### Changed + +- Expert management consistently uses `agenticx expert`, `/expert`, + `expert_repo`, and `expert_branch`; legacy Example command and + configuration names were removed. +- English and Chinese guides cover the current CLI, interaction, Skill, + Session, and Server commands and clarify App installation versus Expert + activation. + +## 1.0.0 — 2026-11-10 + +The first stable release of the DashScope AgenticX Runtime. + +### Added + +- TUI transcript blocks: Markdown replies, numbered turns, collapsible tool + output, and expanded per-turn/session statistics. +- Tool-result truncation metadata and prompt-composition/usage-call details. +- Full unit-test matrix and repository-wide pre-commit checks on main-branch + pushes and pull requests. +- Tag builds prepare wheel/source distributions and platform binaries with + SHA-256 checksums in a draft GitHub Release for final review. + +### Changed + +- Package, CLI, SDK, and bundled App runtime requirements use the stable + `1.0.0` version. +- Expert downloads default to the public + `dashscope/dashscope-agenticx-experts` repository on branch `main`; + explicit repository overrides remain supported. App Catalog downloads read + only `apps//`, with no fallback to legacy top-level Expert + directories. +- Public guides and migration documentation live at the repository root; + source distributions exclude the internal `md/` directory. + +### Fixed (security & runtime highlights) + +- Runtime-local MCP/session/permission/extension state, child authorization + caches, and deterministic cleanup on exceptions and early stream closure. +- Default confirmation covers write tools; explicit deny policies cannot be + bypassed through AUTO or automatic approval. Parallel delegates default to + read-only tools and do not import authorization grants. +- App bundle path validation, manifest permission types, and permission + confirmation before installation writes. Expert templates reject implicit + executable code even when overwrite is requested. +- Local Server execution refuses automatic local grants and rejects invalid + HTTP body lengths; IPv6 loopback and error-response redaction are covered. +- Run hooks and custom shell tools substitute model-controlled values as + native process arguments, not shell syntax; parameterized pipelines, shell + interpreters, and dynamic executable/code/module names are rejected. +- Credential assignments and private-key blocks are redacted from text, + event, and session payloads regardless of length or known key patterns; + TUI input history redacts credentials on save and migration. +- Expert download/restore reject path traversal, symbolic links, and + overwrite of the managed backup directory. +- Structured reasoning, plan, compression, and provider-fallback events + complement message/tool/permission events with sanitized payloads. +- Pillow-backed vision/media require Python 3.11+; Python 3.10 retains base + Runtime support and the `all` extra omits Pillow on that version. + +## Upgrading + +See [Migrating to 1.0](migration.md) for legacy naming, one-way directory +migration, and credential handling. \ No newline at end of file diff --git a/docs/hooks.py b/docs/hooks.py new file mode 100644 index 0000000..671e25c --- /dev/null +++ b/docs/hooks.py @@ -0,0 +1,141 @@ +# -*- coding: utf-8 -*- +"""MkDocs hooks: surface the package version from _version.py in pages. + +Pages opt in with the ``{{ agenticx_version }}`` placeholder; the value is +read from the source of truth at build time so docs never drift from the +package. +""" + +import re +from pathlib import Path + +from mkdocs.structure.toc import AnchorLink, TableOfContents + +# Reference pages listing dozens of API symbols: even a section+symbol +# outline floods the sidebar, so their "On this page" nav keeps only the +# h2 section titles. Applies to both locales. +_SECTION_ONLY_TOC_PAGES = { + "reference/agent.md", + "reference/providers.md", + "reference/tools.md", + "reference/memory.md", + "reference/platforms.md", + "reference/governance.md", +} + +# The theme's static 404.html template renders once per i18n pass and the +# last (zh) pass overwrites site/404.html, shipping a mixed-language shell. +# Stash the en pass render context and reuse it for every later pass. +_EN_404_CONTEXT = None + + +def _read_version(docs_dir: str) -> str: + source = ( + Path(docs_dir).parent / "src" / "dashscope_agenticx" / "_version.py" + ) + match = re.search( + r'__version__\s*=\s*["\']([^"\']+)["\']', + source.read_text(encoding="utf-8"), + ) + return match.group(1) if match else "unknown" + + +def on_config(config): + config.extra["agenticx_version"] = _read_version(config.docs_dir) + # mkdocstrings inserts its stylesheet on every per-locale on_config + # pass, so the i18n rebuild emits the link twice; keep first occurrence. + config.extra_css = list(dict.fromkeys(config.extra_css)) + return config + + +def on_page_content(html, *, page, config, files): + # i18n folder structure prefixes src_uri with the locale (en/ or zh/) + parts = page.file.src_uri.split("/") + src = ( + "/".join(parts[1:]) if parts[0] in ("en", "zh") else page.file.src_uri + ) + if src in _SECTION_ONLY_TOC_PAGES: + # toc tokens nest sections under the leading h1; Material replaces + # the nav with that h1's children, so prune from the same place. + items = list(page.toc) + if items and items[0].level == 1: + items = items[0].children + sections = [ + AnchorLink(item.title, item.id, item.level) + for item in items + if item.level == 2 + ] + if sections: + sections[0].active = True + page.toc = TableOfContents(sections) + return html + + +def on_page_markdown(markdown, *, page, config, files): + return markdown.replace( + "{{ agenticx_version }}", + config.extra.get("agenticx_version", "unknown"), + ) + + +def _snapshot_404_context(context, config): + """Snapshot a 404 render context with explicit language destinations.""" + # Plain-dict snapshot: Config/Theme are UserDict/MutableMapping whose + # internal storage copy.copy would share, and i18n mutates it per pass. + snapshot = dict(context) + cfg = dict(config) + cfg["theme"] = dict(config.theme) + cfg["extra"] = dict(config.extra) + # Static theme templates have no page context. Without this override, + # the i18n plugin leaves the last content page's alternates behind. + base_url = context.get("base_url", "/") + cfg["extra"]["alternate"] = [ + {"link": base_url, "lang": "en", "name": "English"}, + { + "link": base_url + "zh/404/", + "lang": "zh", + "name": "简体中文", + }, + ] + snapshot["config"] = cfg + return snapshot + + +def on_template_context(context, *, template_name, config): + global _EN_404_CONTEXT + if template_name != "404.html": + return context + if config.theme.get("language", "en") == "en": + _EN_404_CONTEXT = _snapshot_404_context(context, config) + return _EN_404_CONTEXT + if _EN_404_CONTEXT is None: + # mkdocs serve can rebuild only the zh pass; static destinations + # must not depend on an earlier en render having populated the + # cache. + return _snapshot_404_context(context, config) + # Fresh copy per pass: later plugin hooks may mutate the returned dict. + return dict(_EN_404_CONTEXT) + + +def on_post_build(*, config): + """Keep the localized 404 page out of the sitemap. + + mkdocs only special-cases the root ``404.html``; the zh 404 lives at + ``zh/404/`` and would otherwise be listed as a regular page. + """ + import gzip + + sitemap = Path(config.site_dir) / "sitemap.xml" + if not sitemap.exists(): + return + text = sitemap.read_text(encoding="utf-8") + pruned = text + for block in re.findall(r".*?", text, re.S): + if re.search(r"[^<]*/404/", block): + pruned = pruned.replace(block, "", 1) + if pruned == text: + return + sitemap.write_text(pruned, encoding="utf-8") + compressed = sitemap.with_suffix(".xml.gz") + if compressed.exists(): + compressed.write_bytes(gzip.compress(pruned.encode("utf-8"))) diff --git a/docs/overrides/404.html b/docs/overrides/404.html new file mode 100644 index 0000000..3c0739c --- /dev/null +++ b/docs/overrides/404.html @@ -0,0 +1,38 @@ +{% extends "base.html" %} + +{#- + Override of the theme's static 404 template. mkdocs renders it once, + without a page context and with absolute URLs, because GitHub Pages + serves it for every missing path. zh readers hop to zh/404/ via the + script below; the bilingual link covers JS-disabled clients. +-#} +{% block htmltitle %} + Page not found - {{ config.site_name }} +{% endblock %} + +{% block content %} +

Page not found

+

+ The page you requested does not exist — it may have been moved or + renamed. +

+
+

+ 页面不存在——可能已被移动或重命名。 + 查看中文页面。 +

+ +{% endblock %} \ No newline at end of file diff --git a/docs/overrides/main.html b/docs/overrides/main.html new file mode 100644 index 0000000..d0b4289 --- /dev/null +++ b/docs/overrides/main.html @@ -0,0 +1,64 @@ +{% extends "base.html" %} + +{% block htmltitle %} + {% if page and page.url == "zh/" %} + {# The i18n homepage is not marked as page.is_homepage by Material. #} + {{ config.site_name }} + {% else %} + {{ super() }} + {% endif %} +{% endblock %} + +{% block extrahead %} + {{ super() }} + {% if page and page.url == "zh/404/" %} + {# The localized 404 is a live 200 page; keep it out of search engines. #} + + {% endif %} +{% endblock %} + +{# Elastic-style per-page action block; desktop shows the sidebar copy + from partials/toc.html instead, this one serves viewports <60em. #} +{% block content %} + {{ super() }} + {% set zh = (i18n_page_locale | default("en")) == "zh" %} + +{% endblock %} + +{% block scripts %} + {{ super() }} + {# Below 60em Material renders search as a fullscreen panel that swallows + every click, and the decorative .md-search__overlay circle has + pointer-events: none -- so unlike desktop, clicking outside can never + toggle #__search and the dialog looks stuck. Restore the desktop + "click elsewhere to close" behavior on narrow viewports: a click on + the panel outside the form, suggestions and result links closes it. #} + +{% endblock %} \ No newline at end of file diff --git a/docs/overrides/partials/alternate.html b/docs/overrides/partials/alternate.html new file mode 100644 index 0000000..536f75a --- /dev/null +++ b/docs/overrides/partials/alternate.html @@ -0,0 +1,19 @@ +{#- + Segmented EN | 中 language switch instead of Material's translate-icon + dropdown (the same 文A button fastapi.tiangolo.com uses). Two locales + make a dropdown pointless: show both, highlight the active one, switch + in a single click. Overrides partials/alternate.html. +-#} +{% set current = i18n_page_locale | default("en") %} +
+ +
\ No newline at end of file diff --git a/docs/overrides/partials/header.html b/docs/overrides/partials/header.html new file mode 100644 index 0000000..64625dc --- /dev/null +++ b/docs/overrides/partials/header.html @@ -0,0 +1,92 @@ +{#- + Material header with keyboard-operable mobile drawer and search toggles. + The drawer uses a native button for Enter/Space behavior; the search toggle + must stay a