Skip to content

Your lightweight open-source personal agent.

Integrate Langsmith for conversation tracking

HuangMinlong9e9051229e63
diff --git a/nanobot/providers/litellm_provider.py b/nanobot/providers/litellm_provider.py
index b4508a47f..a9a051785 100644
--- a/nanobot/providers/litellm_provider.py
+++ b/nanobot/providers/litellm_provider.py
@@ -250,6 +250,10 @@ class LiteLLMProvider(LLMProvider):
# Apply model-specific overrides (e.g. kimi-k2.5 temperature)
self._apply_model_overrides(model, kwargs)
+ # Use langsmith to view the conversation
+ if os.getenv("LANGSMITH_API_KEY"):
+ kwargs["callbacks"] = ["langsmith"]
+
# Pass api_key directly — more reliable than env vars alone
if self.api_key:
kwargs["api_key"] = self.api_key