The integration of GraphOS safety infrastructure into the agents-from-scratch-ts benchmark from LangChain offers significant improvements in agent behavior monitoring and control. Here's a summary of what was achieved:
Key Components
- LoopGuard: Ensures that the agent does not get stuck in an infinite loop by detecting repeated node visits.
- BudgetGuard: Caps cumulative spend per session to prevent excessive costs during testing or production runs.
- Telemetry Streaming: Provides real-time visibility into the agent's decision-making process through a local dashboard.
Setup and Verification
-
Installation:
- Install the workspace dependencies using
pnpm install. - Build the GraphOS SDK with
pnpm --filter @graphos-io/sdk build.
- Install the workspace dependencies using
-
Running the Benchmark:
- Navigate to the benchmark directory:
cd benchmarks/agents-from-scratch-ts. - Run the benchmark normally with
pnpm agentor use a mock API key for reproducibility.
- Navigate to the benchmark directory:
-
GraphOS Dashboard:
- Start the GraphOS dashboard with
npx @graphos-io/dashboard graphos dashboard. - Execute the wrapped benchmark using `OPENAI_API_KEY=sk-mock pnpm
- Start the GraphOS dashboard with
Read the full article at DEV Community
Want to create content about this topic? Use Nemati AI tools to generate articles, social posts, and more.

![[AINews] The Unreasonable Effectiveness of Closing the Loop](/_next/image?url=https%3A%2F%2Fmedia.nemati.ai%2Fmedia%2Fblog%2Fimages%2Farticles%2F600e22851bc7453b.webp&w=3840&q=75)



