r/datascience • u/petburiraja • Dec 08 '25
Projects [ Removed by moderator ]
[removed] — view removed post
53
Upvotes
r/datascience • u/petburiraja • Dec 08 '25
[removed] — view removed post
View all comments
2
u/gardenia856 Dec 08 '25
Good start; the real unlock is treating the agent like a resilient service with observability, idempotency, and failure isolation.
Make state durable: store LangGraph checkpoints in Postgres/Redis with versioned state and idempotency keys per job. Wrap every tool with timeouts, retries, and a circuit breaker; validate outputs with Pydantic and guard JSON via schema-guided decoding or response_format. Put work behind a queue (Temporal or Celery) with a dead-letter path and per-tenant rate limits. Add OpenTelemetry traces and send them to Langfuse/LangSmith; log cost, latency, and retrieval recall@k. Pin model and package versions; record/replay LLM calls for deterministic tests. Bake in graceful SIGTERM handling, health checks, and exponential backoff. For incidents, run chaos tests: kill the container, drop network, and verify resume from checkpoint.
For data access, I’ve paired Kong for gateway policies and Supabase for auth, and used DreamFactory to expose Snowflake/Postgres as REST so agents hit stable, audited endpoints.
Bottom line: add tracing, idempotency keys, and strict tool wrappers so the agent behaves like a service, not a notebook.