Lumen — Agent 가관측성 및 신뢰성 도구
Replay · Crash Recovery · Cost Tracking — Agent 올인원
Lumen이란?
Lumen은 AI Agent 개발자를 위한 3-in-1 신뢰성 도구입니다 — Replay(제로 비용 재실행) + Crash Recovery(마이크로초급 크래시 복구Checkpoint체크포인트로, 메모리의 전체 상태 스냅샷을 디스크에 기록합니다. 크래시 복구 시 가장 최근 Checkpoint부터 WAL을 재생합니다.) + Cost Tracking(실시간 비용 추적). 제공 형태: Python SDK 우선(pip install lumen-ai, LangGraph/Agent 우선) + Rust 엔진(lumen-core 성능 기반) + 선택형 CLI(lumen-cli v0.1.0). 이념: Illuminate your AI agents. Never lose a run. Never burn tokens blindly.
pip install lumen-ai
from lumen_ai import LumenTracer, LumenCheckpointer, CostTracker
# 三行代码接入 — LangGraph 原生集成
graph = workflow.compile(
checkpointer=LumenCheckpointer(), # 崩溃恢复
callbacks=[LumenTracer()] # 执行追踪 + 成本追踪
)하단의 Rust 엔진(lumen-core)이 구동하고, Python SDK가 친숙한 인터페이스를 제공하며, Kova Agent 엔진과 Python 생태계를 연결합니다.
3-in-1 신뢰성
재실행, 복구, 비용 — 한 번 연동하면 모두 준비됩니다.
Replay — 제로 비용 결정적 재실행
trace JSON에서 임의의 실행을 재실행하며, LLM을 호출하지 않아 비용이 들지 않고, 지정한 단계부터 시작해 문제를 정밀하게 특정할 수 있습니다. lumen replay TRACE_ID(전체) / --from 5(5번째 단계부터).
Crash Recovery — 마이크로초급 크래시 복구
LangGraph CheckpointSaver를 완전히 구현하여 네이티브 SQLite/Redis Checkpointer를 그대로 대체합니다. 메모리+디스크 2계층, 원자적 쓰기, 복구는 엔진 레벨 WAL 재실행을 거치며 외부 서비스 의존성이 없습니다.
Cost Tracking — 실시간 비용 추적
30+ 모델 가격표(Claude / GPT-4o / Gemini / Llama / DeepSeek)를 내장하여, LLM이 비용을 반환하지 않아도 추정할 수 있습니다. 단일 호출이 평균값의 2배를 초과하면 자동으로 경고합니다. lumen cost --last 24h / lumen traces.
추가 기능
| 기능 | 설명 |
|---|---|
| Agent 관리 | Agent 생성, 시작, 중지, 삭제 |
| 워크플로 디버깅 | 로컬에서 워크플로 실행, 단계별 디버깅 |
| 로그 조회 | Agent 실행 로그 실시간 조회 |
| 배포 | Agent를 Kova 클라우드 인스턴스에 배포 |
| MCP 관리 | MCP 도구 서비스 설치 및 구성 |
| 인터랙티브 REPL | 터미널에서 Agent와 직접 대화 |
설치
pip install lumen-ai # Python SDK(推荐)
curl -fsSL https://get.lurus.cn/lumen | sh # CLI macOS/Linux
# Windows (PowerShell): irm https://get.lurus.cn/lumen.ps1 | iex
# 从源码(Rust 1.93+,首次编译约 2-3 分钟):
git clone https://github.com/hanmahong5-arch/lumen.git && cd lumen && cargo build --release
# 二进制在 target/release/lumen검증: lumen --version(→ lumen 0.1.0); lumen doctor(Lurus API connected / Kova optional 확인).
빠른 시작
# 初始化项目(结构: agent.toml / prompts/system.md / tools/search.yaml / workflows/main.yaml)
lumen init my-agent && cd my-agent
# 配置 API Key
lumen auth login # 浏览器登录授权自动配置
lumen config set api_key sk-your-lurus-key # 或直接设置
# 本地运行 Agent
lumen run --interactive # 交互模式
lumen run "分析这段代码的性能问题" --file ./main.py
lumen run "翻译这段文本" --model gpt-4o # 指定模型
# 工作流调试
lumen workflow run main --input topic="AI trends"
lumen workflow run main --step-by-step # 逐步调试(每步暂停)
lumen workflow history main --last # 上次运行结果자주 쓰는 명령어
# Agent 管理
lumen agent list / create researcher / info researcher / logs researcher / delete researcher
# MCP 工具
lumen mcp list / install github / test github / remove github
# 部署
lumen deploy --target kova # 或 --target docker
lumen deploy status
# 配置
lumen config list / set api_key xxx / get api_key구성 파일
agent.toml은 Agent 프로젝트의 핵심 구성입니다:
[agent]
name = "my-researcher"
model = "deepseek-chat"
max_iterations = 20
[agent.llm]
base_url = "https://api.lurus.cn/v1"
temperature = 0.7
max_tokens = 4096
[tools]
builtin = ["web_search", "file_read", "file_write"]
[[tools.mcp]]
name = "github"
command = "npx"
args = ["-y", "@modelcontextprotocol/server-github"]
[deploy]
target = "kova"Kova와의 관계
개발자용 커맨드라인 도구 — 로컬 개발, 디버깅, 배포. 경량 런타임 lumen run 으로 즉시 실행할 수 있습니다.
Agent 런타임 엔진 — 영속 실행, WAL, 클러스터 관리. lumen deploy 이후 완전한 영속성과 클러스터 능력을 얻습니다.
로컬 개발에는 경량 런타임(lumen run)을 사용하고, Kova에 배포(lumen deploy)한 후에는 완전한 영속성과 클러스터 능력을 얻습니다.
다른 솔루션과의 비교
비교
| 维度 | Lumen | Temporal | LangGraph Checkpointer | Conductor |
|---|---|---|---|---|
| Replay | 제로 비용 LLM 재실행 | Event replay | 부분 지원 | Workflow replay |
| 연동 비용 | 3 줄 코드 | Worker + SDK | 구성 필요 | Worker |
| Cost 추적 | 내장 | 없음 | 없음 | 없음 |