लाइव एजेंट मूल्यांकन
AI एजेंट को असल समय में काम करते देखें और pause, instruct तथा takeover नियंत्रणों से चलते-चलते उसके व्यवहार का एनोटेशन करें। Anthropic, Ollama और Claude SDK के साथ वेब तथा कोडिंग एजेंट समर्थित हैं।
v2.4.0 में नया
लाइव एजेंट मूल्यांकन एनोटेटरों को किसी AI एजेंट को असल समय में वेब ब्राउज़ करते देखने और चलते-चलते उसके व्यवहार का एनोटेशन करने देता है — बाद में नहीं। एजेंट स्क्रीनशॉट लेता है, उन्हें विज़न LLM को भेजता है, क्रियाएँ पाता है, और उन्हें एक headless ब्राउज़र में चलाता है। हर चरण एनोटेटर की स्क्रीन पर लाइव स्ट्रीम होता है।
आवश्यकताएँ
pip install playwright anthropic
playwright install chromium
export ANTHROPIC_API_KEY=your_key_hereकॉन्फ़िगरेशन
live_agent:
endpoint_type: anthropic_vision
ai_config:
model: claude-sonnet-4-20250514
api_key: ${ANTHROPIC_API_KEY}
max_tokens: 4096
temperature: 0.3
system_prompt: |
You are a web browsing agent. Complete the given task efficiently.
At each step, describe your thought, then output an action.
max_steps: 30
step_delay: 1.0
viewport:
width: 1280
height: 720
allow_takeover: true
allow_instructions: true
instance_display:
fields:
- key: task_description
type: text
label: "Task"
- key: agent_trace
type: live_agent
label: "Live Agent Session"
display_options:
show_overlays: true
show_filmstrip: true
show_thought: true
show_controls: trueकॉन्फ़िगरेशन संदर्भ
| विकल्प | टाइप | डिफ़ॉल्ट | विवरण |
|---|---|---|---|
endpoint_type | string | anthropic_vision | एजेंट के लिए LLM प्रदाता |
ai_config.model | string | claude-sonnet-4-20250514 | इस्तेमाल किया जाने वाला मॉडल |
ai_config.api_key | string | env var | API कुंजी (${VAR} सिंटैक्स इस्तेमाल करें) |
ai_config.max_tokens | int | 4096 | प्रति LLM उत्तर अधिकतम token |
ai_config.temperature | float | 0.3 | सैंपलिंग temperature |
system_prompt | string | built-in | एजेंट के लिए सिस्टम prompt |
max_steps | int | 30 | रुकने से पहले अधिकतम चरण |
step_delay | float | 1.0 | चरणों के बीच सेकंड |
viewport.width | int | 1280 | ब्राउज़र viewport चौड़ाई |
viewport.height | int | 720 | ब्राउज़र viewport ऊँचाई |
allow_takeover | bool | true | एनोटेटरों को मैनुअल नियंत्रण लेने दें |
allow_instructions | bool | true | एनोटेटरों को बीच रन में निर्देश भेजने दें |
history_window | int | 5 | LLM संदर्भ में शामिल हालिया चरणों की संख्या |
डेटा फ़ॉर्मैट
हर instance काम और शुरुआती URL देता है:
{
"id": "task_001",
"task_description": "Search for climate change on Wikipedia and find the year it was first described",
"start_url": "https://en.wikipedia.org"
}एनोटेटर कार्यप्रवाह
- एनोटेटर काम का विवरण पढ़ता है और Start Agent पर क्लिक करता है
- एक headless Chromium ब्राउज़र शुरू होता है और LLM से जुड़ता है
- एजेंट के नेविगेट करते-करते स्क्रीनशॉट व्यूअर में लाइव स्ट्रीम होते हैं — हर चरण में स्क्रीनशॉट, एजेंट का विचार, और की गई क्रिया दिखती है
- एनोटेटर कंट्रोल पैनल से अंतःक्रिया कर सकता है:
- Pause / Resume — एजेंट को चरणों के बीच रोकें
- Send Instructions — बीच रन में एजेंट के संदर्भ में एक संदेश डालें
- Take Over — मैनुअल ब्राउज़िंग नियंत्रण पर जाएँ
- Stop — सेशन जल्दी ख़त्म करें
- सेशन पूरा होने पर (सफलता, विफलता, या
max_stepsतक पहुँचने पर) ट्रेस सहेजा जाता है और डिस्प्ले समीक्षा मोड में बदल जाता है - एनोटेटर एजेंट के प्रदर्शन को आँकने के लिए एनोटेशन स्कीमा भरता है
कीबोर्ड शॉर्टकट
| कुंजी | क्रिया |
|---|---|
Space | Pause / Resume |
Escape | सेशन रोकें |
एनोटेशन स्कीमा जोड़ना
लाइव एजेंट डिस्प्ले को किसी भी Potato एनोटेशन स्कीमा के साथ जोड़ें:
annotation_schemes:
- annotation_type: radio
name: task_success
question: "Did the agent complete the task?"
labels:
- name: "Yes, fully"
- name: "Partially"
- name: "No"
- annotation_type: likert
name: efficiency
question: "How efficiently did the agent work?"
min_label: "Very inefficient"
max_label: "Very efficient"
scale: 5
- annotation_type: text
name: errors_observed
question: "Describe any errors or unnecessary steps"
- annotation_type: span
name: error_steps
question: "Mark any steps where the agent made an error"
labels:
- name: hallucination
- name: wrong_target
- name: unnecessary_actionपूरा उदाहरण
task_name: "Live Agent Evaluation Study"
task_dir: "."
live_agent:
endpoint_type: anthropic_vision
ai_config:
model: claude-sonnet-4-20250514
api_key: ${ANTHROPIC_API_KEY}
max_tokens: 4096
temperature: 0.3
max_steps: 25
step_delay: 1.5
viewport:
width: 1280
height: 720
allow_takeover: true
allow_instructions: true
history_window: 5
data_files:
- "tasks.jsonl"
instance_display:
fields:
- key: task_description
type: text
label: "Task"
- key: agent_trace
type: live_agent
label: "Live Session"
display_options:
show_overlays: true
show_filmstrip: true
show_thought: true
show_controls: true
annotation_schemes:
- annotation_type: radio
name: task_success
question: "Did the agent complete the task?"
labels:
- name: "Yes"
- name: "Partially"
- name: "No"
- annotation_type: likert
name: efficiency
question: "Rate the agent's efficiency"
scale: 5
min_label: "Very inefficient"
max_label: "Very efficient"
- annotation_type: text
name: notes
question: "Notes on agent behavior"
output_annotation_dir: "output/"
output_annotation_format: "jsonl"आर्किटेक्चर
लाइव एजेंट Flask में एक बैकग्राउंड थ्रेड के रूप में चलता है। स्क्रीनशॉट और स्थिति के बदलाव Server-Sent Events (SSE) के ज़रिए ब्राउज़र तक स्ट्रीम होते हैं। एनोटेटर के नियंत्रण (pause, instruct, takeover, stop) उन REST एंडपॉइंट को कॉल करते हैं जो बैकग्राउंड थ्रेड के साथ तालमेल रखते हैं।
Annotator (browser) <── SSE stream ── Flask Server ── Playwright ──► Headless Browser
──► REST control ─► ◄── LLM API ────► Claude Vision
स्क्रीनशॉट {task_dir}/live_sessions/ में सहेजे जाते हैं और फ़िल्मस्ट्रिप दृश्य के लिए API के ज़रिए परोसे जाते हैं।
ट्रेस निर्यात
सेशन पूरा होने पर Potato पूरे ट्रेस को अपने आप web_agent_trace-संगत JSON के रूप में निर्यात करता है, जिसमें ये शामिल होते हैं:
- स्क्रीनशॉट, क्रियाओं, विचारों और observation सहित सारे चरण
- एनोटेटर द्वारा बीच रन में भेजे गए सारे निर्देश
- टाइमस्टैम्प और एजेंट कॉन्फ़िगरेशन मेटाडेटा
- एनोटेटर के takeover की घटनाएँ
यानी पूरे हो चुके लाइव सेशन को बाद में मानक वेब एजेंट एनोटेशन व्यूअर से देखा जा सकता है।
समस्या निवारण
"Playwright is not installed" — pip install playwright && playwright install chromium चलाएँ।
"Anthropic API key required" — ANTHROPIC_API_KEY एनवायरनमेंट वेरिएबल सेट करें या अपने कॉन्फ़िग में api_key: ${ANTHROPIC_API_KEY} इस्तेमाल करें।
एजेंट धीमा लग रहा है — हर चरण में एक LLM API कॉल लगती है (आम तौर पर 3–10 सेकंड)। LLM के प्रोसेस करते समय thinking संकेतक दिखता है। लंबे सेशन तेज़ करने के लिए history_window घटाएँ।
स्क्रीनशॉट लोड नहीं हो रहे — जाँचें कि task_dir में लिखा जा सकता है और सर्वर पर डिस्क जगह बची है।
कोडिंग एजेंट बैकएंड
वेब ब्राउज़िंग एजेंट के अलावा Potato कोडिंग एजेंट के लाइव अवलोकन का भी समर्थन करता है। तीन बैकएंड उपलब्ध हैं:
Ollama (लोकल, बिना API कुंजी)
पूरी तरह लोकल मॉडल के साथ कोडिंग एजेंट मूल्यांकन चलाएँ — किसी API कुंजी की ज़रूरत नहीं।
live_agent:
endpoint_type: coding_agent
backend: ollama
ai_config:
model: qwen2.5-coder:7b
host: "http://localhost:11434"
max_steps: 50
project_dir: "./workspace"Anthropic API
कोडिंग एजेंट मूल्यांकन के लिए टूल इस्तेमाल के साथ Claude चलाएँ।
live_agent:
endpoint_type: coding_agent
backend: anthropic
ai_config:
model: claude-sonnet-4-20250514
api_key: ${ANTHROPIC_API_KEY}
max_tokens: 8192
max_steps: 50
project_dir: "./workspace"Claude Agent SDK
उन्नत कोडिंग एजेंट सेशन के लिए पूरी Claude Code क्षमताएँ।
live_agent:
endpoint_type: coding_agent
backend: claude_agent_sdk
ai_config:
max_turns: 50
project_dir: "./workspace"rollback, branching और ट्रैजेक्टरी निर्यात सहित पूरे संदर्भ के लिए लाइव कोडिंग एजेंट देखें।
Rollback और चेकपॉइंट
कोडिंग एजेंट सेशन में Potato हर फ़ाइल बदलाव के बाद एक git कमिट बनाता है। इससे ये मुमकिन होते हैं:
- किसी भी पुराने चेकपॉइंट पर एक क्लिक में rollback
- शाखा बनाकर दोहराना — किसी भी चेकपॉइंट से दूसरा तरीक़ा आज़माएँ
- समीक्षा के लिए हर फ़ाइल स्थिति का पूरा इतिहास
चेकपॉइंट हर सेशन के लिए एक अलग git शाखा के ज़रिए अपने आप सँभाले जाते हैं।
शाखा बनाती ट्रैजेक्टरी
जब कोई एनोटेटर पीछे लौटकर दूसरा तरीक़ा आज़माता है, तो Potato एक शाखा बनाती ट्रैजेक्टरी बनाता है। दोनों शाखाएँ आउटपुट में सुरक्षित रहती हैं, जिससे इनके लिए प्रशिक्षण डेटा बनता है:
- प्रोसेस रिवॉर्ड मॉडल — शाखाओं के आर-पार प्रति-चरण शुद्धता लेबल
- प्रेफ़रेंस लर्निंग — किस शाखा से बेहतर नतीजे मिले
- कोड समीक्षा डेटासेट — अलग-अलग तरीक़ों में कोड गुणवत्ता की तुलना
आगे पढ़ें
- लाइव कोडिंग एजेंट — Ollama, Anthropic और Claude SDK के साथ कोडिंग एजेंट अवलोकन
- वेब एजेंट एनोटेशन — पहले से रिकॉर्ड किए गए एजेंट ट्रेस की समीक्षा
- एजेंटिक एनोटेशन — एजेंट ट्रेस फ़ॉर्मैट और कन्वर्टर का अवलोकन
- प्रोसेस रिवॉर्ड एनोटेशन — PRM प्रशिक्षण डेटा संग्रह
- AI समर्थन — एनोटेशन में मदद के लिए LLM इंटीग्रेशन
कार्यान्वयन के विवरण के लिए स्रोत दस्तावेज़ देखें।