1. EACCES on /home/app: Dockerfile templates now create home dir for
non-root user before USER app (langgraph-ts, claude-sdk-ts, mastra)
2. IndexError Path.parents[4]: search_flights.py schema fallback now
guards against shallow Docker paths (agno, claude-sdk-py, ms-agent-py)
3. Wrong import path: rewritePythonImports() now converts
from agents.X to relative imports in starter agent dirs (langroid, crewai)
Python starters were trying to run uvicorn with agent.<module>:app but
those modules don't export a FastAPI app. The demo packages use
agent_server.py as the FastAPI wrapper, so starters need it too.
Changes:
- Copy agent_server.py from each demo package into starter root,
rewriting "from agents." to "from agent." for the starter layout
- Update all non-langgraph Python devScripts to use agent_server:app
- Update Dockerfile.python to COPY agent_server.py for non-langgraph
- Update getEntrypointBlock() generic Python to use agent_server:app
- Make langgraph-fastapi use langgraph_cli dev like langgraph-python
(it was incorrectly configured as a uvicorn-based starter)
- Regenerate all starters
## Summary
- The langgraph-python starter crashes on Railway because `langgraph_cli
dev --config agent/langgraph.json` can't resolve module paths when
agents live in `agent/` with `dependencies: ["."]` pointing to `/app`
- Restructured starter to match the demo package's **proven working
layout**: agents in `src/agents/`, `langgraph.json` at project root,
entrypoint referencing root config
- Templatized `Dockerfile.python` with `{{AGENT_DIR}}` and
`{{DOCKER_EXTRA_COPY}}` variables so the generator handles different
agent directory structures
- Updated tests to use framework `agentDir` instead of hardcoding
`"agent"`
- All 17 starters regenerated, 518 tests passing
## Test plan
- [ ] Deploy langgraph-python starter to Railway — should return 200
like the demo package
- [ ] Verify other Python starters still build/deploy (Dockerfile
template changed for all)
- [ ] `npx tsx generate-starters.ts --check` passes
- [ ] All vitest suites pass: generate-starters.test.ts (248) +
starter-consistency.test.ts (270)
The langgraph-python starter crashes on Railway because of a directory
structure mismatch: agents were in agent/ with langgraph.json inside
agent/, causing langgraph_cli to fail resolving module paths.
Match the demo package's working layout:
- Move agents from agent/ to src/agents/ (same as demo)
- Put langgraph.json at project root (same as demo)
- Point entrypoint at root langgraph.json instead of agent/langgraph.json
- Templatize Dockerfile.python with AGENT_DIR and DOCKER_EXTRA_COPY vars
- Skip langgraph.json path rewriting when agentDir matches agentSourceDir
- Update tests to use framework agentDir instead of hardcoding "agent"
Regenerate all 17 starters.
spring-ai: Use maven:3-eclipse-temurin-21 image with mvn instead of
missing ./mvnw wrapper.
ms-agent-dotnet: Replace addgroup/adduser (not available on aspnet:9.0)
with groupadd/useradd. Applied same fix to all four Dockerfile templates
for consistency.
mastra: Make Dockerfile.typescript template use {{AGENT_DIR}} variable
so mastra correctly gets src/mastra/ instead of hardcoded agent/.
Updated generate-starters.ts to substitute variables in Dockerfiles.
Generated from template via showcase/scripts/generate-starters.ts.
Each starter is fully self-contained with Sales Dashboard + 5 renderers,
self-contained agent backend, per-language Dockerfile (non-root user),
and deterministic entrypoint with agent health checks.
Marked linguist-generated=true in .gitattributes.