5 Commits

Author SHA1 Message Date
Jordan Ritter 49ab706614 perf(showcase): cap langgraph integration backend memory
Set MALLOC_ARENA_MAX=2 and MALLOC_TRIM_THRESHOLD_ on the langgraph-python and
langgraph-fastapi entrypoints to curb glibc arena fragmentation on the many-core
Railway host, and NODE_OPTIONS --max-old-space-size=1536 scoped to the
langgraph-typescript agent process (not the sibling Next.js server) to cap the
V8 heap. All values use ${VAR:-default} so explicit Railway overrides win.
2026-08-15 11:10:30 -07:00
Jordan Ritter b4adfc6296 fix(showcase/langgraph): disable watchfiles reload and file persistence in entrypoints
--no-reload stops the watchfiles log flood that tripped Railway's 500-logs/sec replica kill; LANGGRAPH_DISABLE_FILE_PERSISTENCE=true stops unbounded pickle-state growth (OOM). Applies to langgraph-python and langgraph-fastapi.
2026-07-06 12:15:04 -07:00
Tyler Slaton a3d93266e9 fix(showcase/langgraph-python): correctness fixes for demos
Real demo-time bugs in the langgraph-python integration:

- `interrupt-headless` was rendering hardcoded stale slot dates from a
  `DEFAULT_SLOTS` constant instead of reading `payload.slots` that the
  backend `interrupt(...)` already supplies. Sibling `gen-ui-interrupt`
  does this correctly. Headless variant now matches.
- `_shared/interrupt-fallback-slots.ts` (new) — the JS fallback for
  when the backend returns no `slots` array. Generates relative to
  Date.now() so the picker never shows past dates. Used by both
  `interrupt-headless` and `gen-ui-interrupt`. Deletes the old stale-
  literal `gen-ui-interrupt/fallback-slots.ts` (dates from April that
  had already decayed).
- `interrupt_agent.py` — replaced hardcoded `timezone(timedelta(-7))`
  PDT with `zoneinfo.ZoneInfo("America/Los_Angeles")` so the demo
  doesn't lie about offsets in winter. Also fixed a Sunday edge case
  where `next_monday` collapsed to the same date as `tomorrow` (both
  Python and the JS fallback) — added a `<= 1` skip-a-week guard.
- `package.json#dev` ran `uvicorn agent_server:app --port 8000` but
  `src/agent_server.py` was a 3-line stub with no `app` symbol AND the
  API route pointed at port 8123. Replaced with the canonical
  `langgraph_cli dev --port 8123` invocation; deleted the dead stub.
- `entrypoint.sh:47` smoke-checked `src/agents/tools.py` (a file that
  never existed) so every Railway boot logged a phantom ERROR. Dropped.
- `reasoning_agent.py` and `tool_rendering_reasoning_chain_agent.py`
  intentionally omit `CopilotKitMiddleware` (they exercise only
  reasoning-token streaming, no frontend tools / app context). Added a
  one-line comment so a future maintainer doesn't cargo-cult it back in.
- `subagents._invoke_sub_agent` text-block walker had a regression
  where a `{"type":"text","text":null}` payload (a known provider
  quirk) would crash `"".join(parts)` with `TypeError: sequence item
  N: expected str instance, NoneType found`. Restored the
  `isinstance(block.get("text"), str)` guard.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-10 15:14:43 -07:00
Jordan Ritter e9a2e143de fix(showcase): add shared-tools symlinks and refactor imports
Replace sys.path.insert hacks in Python agent files with direct
imports via symlinks to shared/{python,typescript}/tools.
Update Dockerfiles, entrypoints, and configs to support the new
symlink-based tool resolution. Add PARITY_NOTES for frameworks
that have known gaps.
2026-04-28 07:50:03 -07:00
Jordan Ritter dd06dd89d1 refactor(showcase): rename packages/ to integrations/
The showcase framework directories better reflect their role as
integration examples rather than distributable packages.
Renames showcase/packages/ -> showcase/integrations/ and updates
the test docker-compose file reference accordingly.
2026-04-28 07:47:35 -07:00