[PR #399] [MERGED] chore: set up self hosted async subagent example #424

Closed
opened 2026-06-05 17:23:01 -04:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/langchain-ai/deepagentsjs/pull/399
Author: @colifran
Created: 3/31/2026
Status: Merged
Merged: 3/31/2026
Merged by: @colifran

Base: alphaHead: colifran/self-hosted


📝 Commits (6)

📊 Changes

8 files changed (+832 additions, -7 deletions)

View changed files

examples/async-subagent-server/.env.example (+8 -0)
examples/async-subagent-server/Dockerfile (+37 -0)
examples/async-subagent-server/README.md (+109 -0)
examples/async-subagent-server/docker-compose.yml (+29 -0)
examples/async-subagent-server/server.ts (+358 -0)
examples/async-subagent-server/supervisor.ts (+135 -0)
📝 examples/package.json (+6 -1)
📝 pnpm-lock.yaml (+150 -6)

📄 Description

Description

Adds examples/async-subagent-server/ which is a complete end-to-end example showing how to self-host an async subagent on your own infrastructure using the Agent Protocol.

Changes

  • server.ts: a Hono server implementing the Agent Protocol endpoints (POST /threads, POST
    /threads/:id/runs, GET .../runs/:id, GET .../state, POST .../cancel) backed by Postgres. Swap in any createDeepAgent agent with no changes to the HTTP layer.
  • supervisor.ts: an interactive REPL demonstrating all five async subagent operations (launch, check,
    update, cancel, list) against the server.
  • docker-compose.yml: one-command local setup (server + Postgres).

Why this matters: The existing async subagent examples require LangGraph Platform. This shows that the same AsyncSubAgent config works against any server that speaks Agent Protocol. This is useful for teams that want to self-host or run on custom infra.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/langchain-ai/deepagentsjs/pull/399 **Author:** [@colifran](https://github.com/colifran) **Created:** 3/31/2026 **Status:** ✅ Merged **Merged:** 3/31/2026 **Merged by:** [@colifran](https://github.com/colifran) **Base:** `alpha` ← **Head:** `colifran/self-hosted` --- ### 📝 Commits (6) - [`314b272`](https://github.com/langchain-ai/deepagentsjs/commit/314b27203929b7647521dd4f4b44fb66a194adb6) self hosted async subagent example - [`1fea975`](https://github.com/langchain-ai/deepagentsjs/commit/1fea9754c0724b97b402c7bbcfca936e9b398c9a) with postgres - [`c738952`](https://github.com/langchain-ai/deepagentsjs/commit/c73895286fa0f217d5e9ff821a9d3b95891e9d64) formatting - [`4bcab30`](https://github.com/langchain-ai/deepagentsjs/commit/4bcab3041e4a25289c6a0879e8f397b48ef5b5a7) eslint disable no console - [`fd65408`](https://github.com/langchain-ai/deepagentsjs/commit/fd65408627a735af3f7282aa20f12d7ec8c5bf39) fix dockerfile and readme - [`030107e`](https://github.com/langchain-ai/deepagentsjs/commit/030107ec2403afc2f3202eed467c5df51dec4cae) Update examples/async-subagent-server/server.ts ### 📊 Changes **8 files changed** (+832 additions, -7 deletions) <details> <summary>View changed files</summary> ➕ `examples/async-subagent-server/.env.example` (+8 -0) ➕ `examples/async-subagent-server/Dockerfile` (+37 -0) ➕ `examples/async-subagent-server/README.md` (+109 -0) ➕ `examples/async-subagent-server/docker-compose.yml` (+29 -0) ➕ `examples/async-subagent-server/server.ts` (+358 -0) ➕ `examples/async-subagent-server/supervisor.ts` (+135 -0) 📝 `examples/package.json` (+6 -1) 📝 `pnpm-lock.yaml` (+150 -6) </details> ### 📄 Description ### Description Adds examples/async-subagent-server/ which is a complete end-to-end example showing how to self-host an async subagent on your own infrastructure using the Agent Protocol. ### Changes - server.ts: a Hono server implementing the Agent Protocol endpoints (POST /threads, POST /threads/:id/runs, GET .../runs/:id, GET .../state, POST .../cancel) backed by Postgres. Swap in any createDeepAgent agent with no changes to the HTTP layer. - supervisor.ts: an interactive REPL demonstrating all five async subagent operations (launch, check, update, cancel, list) against the server. - docker-compose.yml: one-command local setup (server + Postgres). _Why this matters_: The existing async subagent examples require LangGraph Platform. This shows that the same AsyncSubAgent config works against any server that speaks Agent Protocol. This is useful for teams that want to self-host or run on custom infra. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-06-05 17:23:01 -04:00
yindo closed this issue 2026-06-05 17:23:02 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langchain-ai/deepagentsjs#424