mirror of
https://github.com/langchain-ai/langgraph.git
synced 2026-08-20 14:42:28 +02:00
Add a `langgraph deploy logs` subcommand to fetch build and deploy/server logs from LangSmith deployments. ## Changes - **`host_backend.py`**: Add `get_build_logs()` and `get_deploy_logs()` methods, plus `langsmith_url` support. - **`helpers.py`** (new): Log formatting (`format_log_entry`, `format_timestamp`, `level_fg`) and resolution helpers (`resolve_deployment_id`). ## Usage ```bash # Deploy logs (latest 10) langgraph deploy logs --deployment-id <id> --limit 10 # Error logs by name langgraph deploy logs --name gtm-agent --level ERROR # Build logs langgraph deploy logs --deployment-id <id> --type build # Tail logs (Ctrl+C to stop) langgraph deploy logs --name gtm-agent --follow ``` ## Tests 56 unit tests passing covering host backend methods, log formatting, and helper functions. --------- Co-authored-by: hari-dhanushkodi <hari@langchain.dev>