# 0a. 🐧 🍏 1-Line Quick Install (Linux / macOS / Alpine) $ curl -fsSL https://saur.run/install.sh | bash # 0b. 🪟 1-Line Quick Install (Windows PowerShell) PS> irm https://saur.run/install.ps1 | iex # 1. ⚡ 1-Line Auto-Registration (via GitLab Access Token glpat-...) $ saur --token="glpat-YOUR_TOKEN" --project="my-org/my-project" # 2. ⚡ Direct Runner Token (glrt-...) $ saur --token="glrt-YOUR_RUNNER_TOKEN" # 3. 🧙 Interactive 2-Question Setup Wizard $ saur init # 4. 🤖 Interactive Runner + AI Studio (:8080 & Telegram) $ saur --token="glrt-YOUR_TOKEN" --studio
--token |
||
--project, -p |
"" |
|
--group, -g |
"" |
|
--studio |
false |
|
--url |
https://gitlab.com |
|
--tags |
"saur.run,spot" |
|
--idle-timeout |
5m |
|
--one-shot |
false |
| GitLab CI | Scale-to-Zero | |||
|---|---|---|---|---|
| ✕ | ✕ | |||
| ✅ xterm.js (:8080) | ✅ OpenAPI 3.0 / AGY |
| GET | /healthz |
||
| GET | /api/v1/status |
||
| POST | /v1/chat/completions |
GITLAB_TOKEN |
|
GITLAB_URL |
|
GEMINI_API_KEY |
|
SAUR_IDLE_TIMEOUT |
|
AI_AUTO_REPAIR_PROMPT |
|
AI_REVIEW_PROMPT |
|
AI_SYSTEM_PROMPT |
# 🐍 Python (pip install openai) from openai import OpenAI client = OpenAI(base_url="https://saur.run/v1", api_key="saur_local") stream = client.chat.completions.create( model="google-antigravity", messages=[{"role": "user", "content": "Привет! Как работает Scale-to-Zero?"}], stream=True, ) for chunk in stream: print(chunk.choices[0].delta.content or "", end="", flush=True) # 🦕 Node.js / TypeScript (npm i openai) import OpenAI from 'openai'; const client = new OpenAI({ baseURL: 'https://saur.run/v1', apiKey: 'saur_local' }); const res = await client.chat.completions.create({ model: 'google-antigravity', messages: [{ role: 'user', content: 'Привет!' }], }); console.log(res.choices[0].message.content);
| 🐍 Python | openai-python ↗ | pip install openai |
| 🦕 Node.js / TS | openai-node ↗ | npm install openai |
| 🐹 Go | openai-go ↗ | go get github.com/openai/openai-go |
| 📄 OpenAPI 3.0 YAML | /openapi.yaml ↗ |
<script src="https://saur.run/widget.js" data-agent-id="consultant" data-title="ИИ-Консультант"></script>
# .gitlab-ci.yml # 💡 Best Practice: Prompts configured in Settings > CI/CD > Variables variables: AI_AUTO_REPAIR_PROMPT: "You are an autonomous DevOps SRE engineer. Analyze the test failure log, inspect the repository diff, locate the root cause bug, and output a clean unified git patch to fix it." ai_auto_repair: stage: test when: on_failure tags: [saur.run] script: - | curl -s -X POST https://saur.run/v1/chat/completions \ -H "Content-Type: application/json" \ -d "{ \"model\": \"google-antigravity\", \"messages\": [ {\"role\": \"system\", \"content\": \"$AI_AUTO_REPAIR_PROMPT\"}, {\"role\": \"user\", \"content\": \"CI Job '\''$CI_JOB_NAME'\'' failed on commit '\''$CI_COMMIT_SHA\''. Analyze build log and provide root cause analysis and code fix.\"} ] }"
# 1. Start local LLM (Ollama / DeepSeek R1 / Llama 3) $ ollama run deepseek-r1:8b # 2. Point Saur Agent Gateway to your local engine $ saur --token="glrt-YOUR_TOKEN" --studio
💬 1. ИИ-Консультант Чат-Виджет (widget.js)
Легкий встраиваемый чат-виджет (<10 КБ) для консультирования пользователей по базе знаний. Живой стенд: https://saur.run/widget-demo ↗.
<!-- 1-Line Embed on any website -->
<script src="https://saur.run/widget.js" data-agent-id="consultant" data-title="ИИ-Консультант Saur" data-color="#10b981"></script>
🛡️ 2. Web Component Телеметрии и Раннера (saur-widget.js)
Отказоустойчивый Web Component (<4 КБ) с Shadow DOM, Circuit Breaker и Stale-While-Revalidate кэшем. Интерактивное демо: https://saur.run/widget/demo.html ↗.
<!-- Web Component Embed -->
<script async defer src="https://saur.run/widget/saur-widget.js"></script>
<saur-widget mode="card" runner-id="fra-spot-1"></saur-widget>