I kept seeing the same problem — agents get stuck calling the same
tool 50 times, wander off-task, or burn through token budgets before
anyone notices. The big observability platforms exist but they're
heavy for solo devs and small teams.
So I built DriftShield Mini — a lightweight Python library that wraps
your existing LangChain/CrewAI agent, learns what "normal" looks like,
and fires Slack/Discord alerts when something drifts.
3 detectors:
- Action loops (repeated tool calls, A→B→A→B cycles)
- Goal drift (agent wandering from its objective, using local embeddings)
- Resource spikes (abnormal token/time usage vs baseline)
4 lines to integrate:
from driftshield import DriftMonitor
monitor = DriftMonitor(agent_id="my-agent", alert_webhook="https://hooks.slack.com/...")
agent = monitor.wrap(existing_agent)
result = agent.invoke({"input": "your task"})
100% local — SQLite + CPU embeddings. Nothing leaves your machine
except the alerts you configure.
dev_developer•1h ago
So I built DriftShield Mini — a lightweight Python library that wraps your existing LangChain/CrewAI agent, learns what "normal" looks like, and fires Slack/Discord alerts when something drifts.
3 detectors: - Action loops (repeated tool calls, A→B→A→B cycles) - Goal drift (agent wandering from its objective, using local embeddings) - Resource spikes (abnormal token/time usage vs baseline)
4 lines to integrate:
100% local — SQLite + CPU embeddings. Nothing leaves your machine except the alerts you configure.pip install driftshield-mini GitHub: https://github.com/ThirumaranAsokan/Driftshield-mini
v0.1 — built this solo. Would genuinely love feedback on what agent reliability problems you're hitting. What should I build next?