Skip to content

feat: migrate selected templates to AgentSeek API - #14

Merged
webup merged 35 commits into
agentseek-ai:mainfrom
kic635:codex/agentseek-api-runtime
Aug 20, 2026
Merged

feat: migrate selected templates to AgentSeek API#14
webup merged 35 commits into
agentseek-ai:mainfrom
kic635:codex/agentseek-api-runtime

Conversation

@kic635

@kic635 kic635 commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Summary

This PR migrates eight selected templates from the LangGraph development server to the AgentSeek API runtime. Freshly generated projects declare the runtime themselves, launch it through agentseek dev, and are exercised against exact published artifacts.

Release coordinates:

  • AgentSeek core v0.1.2 at 900f89518c32f8570d7648897394ed96a86a647a
  • AgentSeek API 0.2.3
  • AgentSeek template catalog v0.1.3 after this PR is merged and tagged

Migrated templates

  • deepagents/content-builder
  • deepagents/mcp
  • deepagents/research
  • langchain/agentic-rag
  • langchain/agentic-rag-hybrid
  • langchain/cli-remote
  • langchain/markdown-messages
  • langchain/rubric

Every migrated template uses the exact agentseek-api[embedded]==0.2.3 release. The harness also pins AgentSeek 0.1.2, Python 3.12, uv 0.9.28, and Node 22 where needed.

Deliberately deferred

  • deepagents/sandbox remains on its reviewed LangGraph CLI runtime until it has a suitable local-provider fixture.
  • langchain/agentic-rag-openvino remains on its reviewed LangGraph CLI/OpenVINO runtime until its model-backed runtime can be proved in CI.

Regression tests keep both templates outside the migration set.

Published-runtime proof

The hosted matrix contains nine generated-runtime cases:

  • one Ubuntu/embedded row for each of the eight migrated templates;
  • one additional native Windows/SQLite row for deepagents/mcp.

Each row fresh-renders the template, installs only declared dependencies from exact public artifacts, starts through agentseek dev, verifies health and the contract graph, then creates an assistant/thread/run for the template's real graph and requires a successful result. The proof records artifact/import provenance, exact API lock resolution, runtime ports, graph results, and bounded process cleanup while rejecting checkout shadowing and secret-bearing diagnostics.

Validation before push

  • exact API-pin and runtime-proof selection: 34 passed
  • deterministic repository suite: 228 passed, 2 network-backed child-install tests deselected
  • lock, Ruff, format, and diff checks passed
  • AgentSeek API 0.2.3 release workflow passed; a fresh public-wheel smoke proved health, a real run, SSE completion, and SQLite snapshot persistence on Python 3.12

The final merge gate is the complete nine-case hosted proof matrix on this exact head.

Tracking

Related: ob-labs/agentseek#170

@webup webup left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Requesting changes at ada42c5a21903891070efa21e810a9b4b6172f93.

The render-only checks are green, but fresh generated projects still have blocking runtime/dependency regressions:

  1. Make a generated AgentSeek API project start with its declared setup. A fresh langchain/markdown-messages child installs successfully, then agentseek-api dev exits while connecting to the undeclared SeekDB service at localhost:2881; /health and assistants never become reachable. Please declare/configure the required database path (embedded or external) and add a fresh-child startup/health/assistant smoke test.
  2. Fix the OpenVINO Python contract. That template still declares requires-python = ">=3.10", while every available agentseek-api release requires Python 3.12+, making the generated project unsatisfiable on 3.10 and 3.11. Raise the floor or use a compatible conditional dependency.
  3. Honor the documented shell-over-.env precedence. The templates now state that exported shell variables win, but agentseek-api reloads the config env file after inheriting the child environment and overwrites them. Please depend on a fixed runtime and cover the composed launch path.
  4. Keep LANGGRAPH_HOST functional in deepagents/mcp. The lifecycle now invokes agentseek-api dev directly, bypassing the wrapper that consumed this variable, so a configured host is ignored. Pass the host explicitly or remove the unsupported setting and documentation.
  5. Remove the duplicate mcp>=1.27.1,<2 declaration in langchain/markdown-messages and reconcile the duplicate/overlapping MCP constraint in deepagents/mcp.

Please validate at least one rendered child end to end: render, install only declared dependencies, start the backend with no undeclared local services, wait for /health, and exercise an assistant/run request.

@kic635

kic635 commented Aug 11, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for the detailed review. Addressed in ea4265c:

  1. markdown-messages now declares agentseek-api[embedded] and SEEKDB_EMBED/SEEKDB_EMBED_DIR/OCEANBASE_DB_NAME. The fresh-child smoke renders the template, installs only declared dependencies, starts the backend with embedded SeekDB, and verifies health plus assistant discovery.
  2. The OpenVINO template now requires Python >=3.12.
  3. The template and CLI propagate shell values correctly. The target agentseek-api runtime still needs the corresponding post-langgraph.json shell-precedence safeguard to merge and be released; the PR description lists that as an explicit prerequisite rather than claiming completion prematurely.
  4. deepagents/mcp now passes LANGGRAPH_HOST explicitly to agentseek-api dev, and its catalog/generated README documents root .env plus shell override behavior consistently.
  5. Removed the duplicate markdown-messages MCP declaration and the overlapping deepagents/mcp MCP constraint.

In addition to the generated-child smoke, I ran the full template set locally end to end yesterday: generated the projects, installed their declared dependencies, started their lifecycle services, and exercised the available frontend/API conversation paths. The five screenshots below are representative successful local runs from that session; they are evidence only and are not committed to this repository.

The generated-child smoke now completes an actual thread/run/wait flow against a local fake OpenAI-compatible provider, so it exercises an assistant run without external credentials or an undeclared service.

Validation: 105 template render tests passed with declared Git dependencies available; ruff and git diff --check also passed.

Local template E2E run 1 Local template E2E run 2 Local template E2E run 3 Local template E2E run 4 Local template E2E run 5

@webup webup left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Requesting changes at ea4265c7710ecc122f6d60461005b5d1e9abb8ff.

Thanks for fixing markdown-messages embedded startup, the OpenVINO Python floor, and the duplicate MCP declarations. The new markdown assistant/thread/run smoke is useful and green. Three blockers remain:

  1. [P1] Give every migrated local API template a declared, startable persistence path. A fresh langchain/rubric render installed only its generated dependencies, copied .env.example, and then agentseek-api dev exited with OperationalError (2003, "Can't connect to MySQL server on 'localhost'"); /health never became ready. The new E2E covers only markdown-messages, while the same undeclared/missing persistence contract remains in deepagents/{content-builder,mcp,research,sandbox} and langchain/{agentic-rag-hybrid,cli-remote,rubric}. Configure embedded persistence or declare and start the external database for each local runtime.
  2. [P1] Depend on a tested release that actually preserves shell precedence. All migrated dependency declarations are unversioned, and a fresh resolve still selects published agentseek-api==0.2.1. With shell OPENAI_API_KEY=shell-wins, its build_runtime_env() returns the value from .env. API PR #69 fixes the ordering but is open, unchecked, unreleased, and its current internal pydantic-settings import also fails at the declared dependency floor. Release a corrected runtime, require a reviewed compatible range from every migrated template, and test the composed launch rather than only direct agentseek-api dev.
  3. [P2] Keep deepagents/mcp native-Windows compatible. The new sh -lc command forwards LANGGRAPH_HOST on POSIX but fails on native Windows, and sh is not declared in [tools]. Reuse the retained Python argv wrapper (or another cross-platform argv path) and run the lifecycle smoke on Windows as well as Linux/macOS.

Suggested pre-commit gate:

set -euo pipefail
export UV_CACHE_DIR="$(mktemp -d)/uv-cache"

uv sync --frozen --dev
make check
git diff --check

# Fresh-child proof: do not reuse the repository environment or a pre-running DB.
render_root="$(mktemp -d)"
uv run cookiecutter templates/langchain/rubric --no-input --output-dir "$render_root"
cd "$render_root/rubric_lab"
cp .env.example .env
uv sync --group test
uv run agentseek-api version

uv run agentseek-api dev --port 2026 --no-browser --no-reload >"$render_root/rubric-api.log" 2>&1 &
api_pid=$!
trap 'kill "$api_pid" 2>/dev/null || true' EXIT
for _ in $(seq 1 30); do
  curl --fail --silent http://127.0.0.1:2026/health >/dev/null && break
  kill -0 "$api_pid"
  sleep 1
done
curl --fail --silent http://127.0.0.1:2026/health >/dev/null

Expected results: repository checks pass; the installed version is the new fixed release, not 0.2.1; Rubric reaches /health without anything pre-running on port 2881.

Please turn the fresh-child proof into a CI matrix over every migrated local-runtime template. For each row: render into a new directory, install only the generated manifest, copy the documented default env, start the complete lifecycle, wait for /health, then complete assistant -> thread -> run -> wait and assert status=success. Add these two matrix assertions:

  • Put SENTINEL=from-dotenv in the generated .env, export SENTINEL=from-shell, launch through agentseek dev, and have the backend assert the final runtime value is from-shell.
  • Run the deepagents/mcp row on native Windows with a non-default LANGGRAPH_HOST; no undeclared POSIX shell may be required.

Finally, floor-test the runtime version before pinning it: importing its CLI in a clean environment with the exact declared minimum pydantic-settings must exit 0. This catches the internal-module import that current lockfiles hide.

@kic635

kic635 commented Aug 12, 2026

Copy link
Copy Markdown
Contributor Author

已推送中间提交 3ae3a4dcatest: harden migrated runtime template proofs)。本次补强范围严格限定在模板侧已完成/部分完成内容:

  • 为 reviewer 点名的 7 个 local API 模板补齐并验证生成结果中的 agentseek-api[embedded].env.example persistence 配置和 lifecycle 默认值一致性;同时检查 requirements.txt(如存在)、Cookiecutter 占位符和 RAG/API 数据目录冲突。
  • deepagents/mcp 使用 Python argv wrapper,不再依赖 sh -lc/bash -lc;新增 monkeypatch argv 单元测试,验证 LANGGRAPH_HOST、端口、无 shell 和退出码传递。
  • 补强 fresh-child smoke 的依赖安装错误、API/provider 提前退出日志、超时诊断、Linux/macOS process-group 清理、Windows taskkill 清理和仓库 .venv 隔离。
  • 增加 reviewer 模板 matrix 集合一致性测试,并保留 Linux/Windows 的 deepagents/mcp matrix row。
  • 修正 runtime floor smoke 的公开 import 为 agentseek_api.main:app,增加空参数校验和临时环境清理。

验证:针对性测试 12 passed,ruff、format、git diff --check 和两个 smoke 脚本的 --help 均通过。完整渲染测试仍有既有 GitHub 固定依赖下载失败,未将网络失败误报为代码通过。

以下事项仍明确未完成,等待 AgentSeek API PR #69 合并并发布:新 runtime release、版本范围 pin、排除 0.2.1、shell precedence、runtime floor 实际通过、SENTINEL backend 最终断言,以及完整 fresh-child runtime matrix 的通过证明。这个提交不是最终提交,API release 后还会继续更新并再次提交。

@kic635
kic635 force-pushed the codex/agentseek-api-runtime branch from 8641c8f to ea4265c Compare August 12, 2026 07:28

@webup webup left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved at exact head 9bcb3a8. All 16 hosted checks are green, including the native Windows SQLite lifecycle and proof upload. I audited all nine published-runtime artifacts: exact AgentSeek 0.1.2 and agentseek-api 0.2.3 wheel hashes, external import roots, successful contract and template graphs, valid runtime ports, and no secret, sentinel, userinfo, or checkout-path leakage.

@webup
webup merged commit 2a5e57f into agentseek-ai:main Aug 20, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants