AI Agents with LangGraph

Nov 12 2024 · Python 3.12, LangGraph 0.2.x, JupyterLab 4.2.4

Lesson 05: Evaluating & Optimizing AI Agents

Monitoring & Debugging Demo

Episode complete

Play next episode

Next

Heads up... You’re accessing parts of this content for free, with some sections shown as obfuscated text.

Heads up... You’re accessing parts of this content for free, with some sections shown as obfuscated text.

Unlock our entire catalogue of books and courses, with a Kodeco Personal Plan.

Unlock now

Monitoring & Debugging Demo

Open the localizer.ipynb notebook in this lesson’s Starter folder. It should be in the same state as you left it at the end of Lesson 4.

import logging

logging.basicConfig(
  level=logging.DEBUG,
  format="%(asctime)s - %(levelname)s - %(message)s"
)
logging.basicConfig(
  level=logging.INFO,
  format="%(asctime)s - %(levelname)s - %(message)s",
  filename="app.log"
)
for output in app.stream(state, thread, stream_mode="values"):
  print(output)
LANGCHAIN_API_KEY=<your LangSmith API key>
LANGCHAIN_TRACING_V2=true
See forum comments
Cinema mode Download course materials from Github
Previous: Making Improvements to AI Agents Next: Conclusion