Skip to main content

cli-anything-hiagent

Command-line interface for HiAgent Python SDK - Observe service (API Token, Trace Spans) via CLI

소스 정보

저장소
volcengine/hiagent-python-sdk
최근 소스 활동
2026년 5월 29일 03:26
감지된 SKILL.md 언어
영어
스타
29
포크
10

설치 방법

기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.

소스 파일 검토

설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.

SKILL.md 표시 중

SKILL.md
소스 지침 · 읽기 전용 미리보기
name
cli-anything-hiagent
description
Command-line interface for HiAgent Python SDK - Observe service (API Token, Trace Spans) via CLI
# cli-anything-hiagent Command-line interface for the HiAgent Python SDK built by Hiagent. This CLI provides programmatic access to HiAgent's Observe service, including API Token management and Trace/Span observability. ## Installation ```bash pip install cli-anything-hiagent ``` ## Installation from source ```bash uv pip install -e agent-harness ``` **Prerequisites:** - HiAgent Python SDK (`hiagent-api`, `hiagent-components`) - Volcano Engine credentials (request signing) - `VOLC_ACCESSKEY` / `VOLC_SECRETKEY` environment variables, or - `~/.volc/.env` ## Configuration Set up credentials using environment variables: ```bash export VOLC_ACCESSKEY="..." export VOLC_SECRETKEY="..." export HIAGENT_TOP_ENDPOINT="https://open.volcengineapi.com" ``` ## Observe Commands Observe service for API Token management and Trace/Span observability: ```bash # Create API Token cli-anything-hiagent observe token create \ --workspace-id ws-123 \ --custom-app-id app-456 # List trace spans cli-anything-hiagent observe trace list \ --workspace-id ws-123 \ --page-size 10 \ --sort-by StartTime \ --sort-order Desc # List trace spans with pagination cli-anything-hiagent observe trace list \ --workspace-id ws-123 \ --page-size 20 \ --last-id last-doc-id \ --sort-by Latency \ --sort-order Asc ``` ### Observe Command Options **token create:** - `--workspace-id` (required): Workspace ID - `--custom-app-id` (required): Custom App ID **trace list:** - `--workspace-id` (required): Workspace ID - `--page-size`: Page size (default: 10) - `--last-id`: Last ID for pagination - `--sort-by`: Sort field (StartTime, Latency, LatencyFirstResp, TotalTokens) - `--sort-order`: Sort order (Asc, Desc) ## JSON Output Mode Use `--json` flag for machine-readable output (essential for AI agents): ```bash cli-anything-hiagent --json observe trace list --workspace-id ws-123 ``` JSON output format: ```json { "success": true, "message": "Operation completed", "data": { ... } } ``` ## Return Codes - `0` - Success - `1` - Error (with error message in `message` field of JSON output) ## Error Handling All commands output errors in both human-readable and JSON formats: ```bash # JSON error $ cli-anything-hiagent --json observe trace list --workspace-id invalid-ws { "success": false, "message": "...", "data": null } ``` ## System Requirements - Python >= 3.10 - HiAgent API access with valid Volcano Engine credentials - Network access to HiAgent endpoints ## License Apache-2.0 --- *Generated by Hiagent*
GitHub에서 보기