Skip to content

Instantly share code, notes, and snippets.

@lovemycodesnippets
Created January 19, 2026 20:33
Show Gist options
  • Select an option

  • Save lovemycodesnippets/a5600c7c5002f779a868b987013de989 to your computer and use it in GitHub Desktop.

Select an option

Save lovemycodesnippets/a5600c7c5002f779a868b987013de989 to your computer and use it in GitHub Desktop.
How to Build Production-Ready AI Agents with RAG and FastAPI
# telemetry.py
import time, json, logging
logging.basicConfig(filename="agent.log", level=logging.INFO)
def log_event(kind: str, **kwargs):
logging.info(json.dumps({"ts": time.time(), "kind": kind, **kwargs}))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment