Production Guide
Morning Signal is a reference implementation, not a complete production system.
Use this checklist when hardening the pattern for real users.
Storage
The local app uses SQLite for simple persistence. On serverless platforms, use a
durable managed store instead:
- Postgres for generated briefs, users, and runs
- Redis or a runtime cache for short-lived source and profile caching
- object storage for raw evidence packets if they become large
In demo mode, the hosted version skips SQLite writes so it can run safely on
serverless infrastructure.
Long-Running Work
Live web workflows can be slow or bursty. For production:
- move long crawls into background jobs
- persist run state
- expose run IDs
- support resume/retry
- stream status events to the client
- store partial results when a source fails
Reliability
Add source-level resilience:
- retry transient network/provider errors
- use exponential backoff
- dedupe URLs before extraction
- continue when non-critical extracts fail
- record failed URLs and reasons
- cap per-run searches and extracts
Cost Control
Every run should have an explicit retrieval budget.
Track:
- number of searches
- number of extracted URLs
- selected driver mode
- model tokens
- total estimated cost
- cache hit rate
Start with cheaper access modes and escalate only when the page requires it.
Source Quality
Add scoring before synthesis:
- relevance to approved context
- freshness
- source authority
- content depth
- duplicate detection
- source diversity
- whether extract succeeded
Low-confidence sources should be excluded or labeled clearly.
Grounding And Citations
The model should only make claims supported by the evidence packet.
Recommended checks:
- require source IDs in structured output
- reject sections with missing citations
- validate cited URLs exist in the evidence packet
- flag unsupported recommendations
- keep raw evidence available for audit
Security
For multi-user deployments:
- add authentication
- isolate tenants
- encrypt secrets
- never expose provider keys to the browser
- rate-limit API routes
- validate public URLs
- reject local/private network targets
- sanitize rendered content
Observability
Useful traces include:
- approved context
- planned queries
- Nimble Search requests and result counts
- extraction success/failure
- source scoring decisions
- synthesis prompt version
- output validation status
- latency and cost per run
LangSmith or another tracing system is useful because it shows the agent as a
workflow rather than a hidden prompt.