GraphOS – AI 에이전트용 시각적 런타임 및 디버거(로컬 우선 실행 포함)

hackernews | | 🔧 개발도구
#anthropic #openai #프레임워크
원문 출처: hackernews · Genesis Park에서 요약 및 분석

요약

GraphOS는 LangGraph.js를 위한 오픈 소스 거버넌스 및 관측 가능성 레이어로, 별도의 SaaS나 가입 없이 로컬 우선 방식으로 작동합니다. AI 에이전트가 프로덕션 환경에서 겪는 무한 루프나 비용 폭주 문제를 정책 기반 인터셉터로 방지하고, 모든 과정을 실시간 대시보드로 시각화합니다. 이를 통해 블랙박스 문제를 해결하여 실행 중인 에이전트의 상태를 투명하게 파악하고 디버깅할 수 있습니다.

본문

The Service Mesh for AI Agents. GraphOS is an open-source governance and observability layer for LangGraph.js. Wrap your compiled graph in one line, get policy enforcement (loops, budgets) and a local-first live dashboard with time-travel replay. No SaaS, no signup, no telemetry leaving your machine. As agents move from demos to production, three things bite: - Infinite loops — the agent ping-pongs between nodes, burning tokens silently. - Runaway cost — one bad prompt eats your monthly OpenAI budget before you notice. - The black-box problem — no way to see what happened inside a 20-step run until it's finished. GraphOS fixes this by wrapping your CompiledGraph with a policy-driven interceptor and streaming every step to a local dashboard. LoopGuard — halt when a node revisits with identical state (mode: "state" ) or simply visits N times (mode: "node" , for agents whose state grows on every iteration).BudgetGuard — kill the run when cumulative cost exceeds your USD ceiling.MCPGuard — allow-list / deny-list MCP servers and tools, and cap MCP call volume before an agent drifts into unsafe tool usage.tokenCost() — drop-in cost extractor that readsusage_metadata off LangChain messages and applies a built-in price table for OpenAI + Anthropic models. - Live graph — nodes glow as the agent traverses; halted nodes flash red. - Per-step detail panel — click a step or scrub the timeline to see messages, tool calls, token usage, and the policy halt reason. - Session switcher + time-travel — every run persists to SQLite ( ~/.graphos/traces.db ); replay any past session step-by-step. TypeScript / Node: npm install @graphos-io/sdk # or pnpm add @graphos-io/sdk Python: pip install graphos-io TypeScript: import { GraphOS, LoopGuard, BudgetGuard, tokenCost, createWebSocketTransport, PolicyViolationError, } from "@graphos-io/sdk"; import { myLangGraphApp } from "./agent"; const managed = GraphOS.wrap(myLangGraphApp, { projectId: "my-agent", policies: [ new LoopGuard({ mode: "node", maxRepeats: 10 }), new BudgetGuard({ usdLimit: 2.0, cost: tokenCost() }), ], onTrace: createWebSocketTransport(), }); try { const result = await managed.invoke({ messages: [{ role: "user", content: "Analyze the market." }], }); console.log(result); } catch (err) { if (err instanceof PolicyViolationError) { console.log(`halted by ${err.policy}: ${err.reason}`); } else { throw err; } } Python: import asyncio from graphos_io import ( wrap, LoopGuard, BudgetGuard, token_cost, create_websocket_transport, PolicyViolationError, ) from my_agent import build_graph # your compiled LangGraph async def main(): managed = wrap( build_graph(), project_id="my-agent", policies=[ LoopGuard(mode="node", max_repeats=10), BudgetGuard(usd_limit=2.0, cost=token_cost()), ], on_trace=create_websocket_transport(), ) try: result = await managed.invoke({"messages": [{"role": "user", "content": "Analyze the market."}]}) print(result) except PolicyViolationError as err: print(f"halted by {err.policy}: {err.reason}") asyncio.run(main()) invoke() returns the merged final state. stream() is also available if you want to consume per-step updates yourself. Both SDKs ship into the same dashboard over the same JSON-over-WebSocket protocol — point a Python agent and a TypeScript agent at it and watch both in one UI. npx @graphos-io/dashboard graphos dashboard Open http://localhost:4000. Run anything that calls createWebSocketTransport() and watch the graph execute live. The dashboard persists every event to ~/.graphos/traces.db . By default it keeps the 200 most-recent sessions and prunes older ones; tune via GRAPHOS_RETENTION_SESSIONS . | Package | Language | What it does | |---|---|---| @graphos-io/core | TS | Shared types (Policy , NodeExecution , TraceEvent ) | @graphos-io/sdk | TS | GraphOS.wrap() , LoopGuard , BudgetGuard , tokenCost , transports | @graphos-io/dashboard | TS | Next.js + React Flow dashboard with graphos CLI | @graphos-io/mcp-proxy | TS | Proxy MCP tool calls, emit GraphOS traces, redact payloads, and enforce MCP allow/deny rules | graphos-io | Python | wrap() , LoopGuard , BudgetGuard , MCPGuard , token_cost , async-first transport | The SDK runs in your process — zero network calls unless you point a transport at one. The dashboard is a separate local process started with graphos dashboard . pnpm install pnpm dev # dashboard + WS telemetry pnpm demo:loop # LoopGuard halts an A↔B cycle pnpm demo:budget # BudgetGuard halts a 4-node pipeline Open http://localhost:4000. - LoopGuard (state + node modes) - BudgetGuard + tokenCost() price-table cost extractor - WebSocket telemetry transport - Live graph view with active / halted node states - SQLite persistence + retention - Session switcher + time-travel scrubber - Per-step detail panel (messages, tool calls, usage) - graphos dashboard CLI - MCPGuard + MCP proxy - Python SDK parity ( graphos-io ) Bug reports and PRs welcome at github.com/ahmedbutt2015/graphos. MIT — © Ahmed Butt

Genesis Park 편집팀이 AI를 활용하여 작성한 분석입니다. 원문은 출처 링크를 통해 확인할 수 있습니다.

공유

관련 저널 읽기

전체 보기 →