// agent

My Помощник по неясным сообщениям

by Xgxgxyxyfyfug · Nov 01, 2026 Public

Choose how to run this agent

⚡ Local runs on your GPU. For usable speed it needs a WebGPU-capable browser — Chrome or Edge on a machine with a graphics card, or an Apple Silicon Mac. Without a supported GPU, pick OpenAI or Anthropic above instead. Check your machine
Try it now

Requires an API key and an AgentOp account.

37 downloads
0 forks
0.0 rating

Description

Based on the Помощник по неясным сообщениям template.

What this agent can do

My Помощник по неясным сообщениям is built from the Помощник по неясным сообщениям template. Runs fully on your own device: llama.cpp compiled to WebAssembly, GPU-accelerated through WebGPU, with no API key and no server. After the one-time model download it works offline. Can run on OpenAI models with your own API key, encrypted in your browser. Can run on Anthropic Claude models with your own API key, encrypted in your browser.

Source Code

agent.py
_dialogue = []

async def process_user_query(query: str) -> str:
    """Clarify an unclear Russian message and continue the conversation.

    Args:
        query: The user's current message.
    """
    text = query.strip()[:3000]
    if not text:
        return "Напишите сообщение — я помогу его разобрать."
    history = "\n".join(f"{role}: {message}" for role, message in _dialogue[-8:])
    prompt = ("История беседы:\n" + (history or "(пока нет)") +
              "\nПользователь: " + text +
              "\nОтветь пользователю по-русски. Если смысл непонятен, не угадывай уверенно: "
              "коротко уточни, что он имел в виду.")
    answer = await agentop_llm.generate(prompt[:6000], globals().get("TEMPLATE_SYSTEM_PROMPT", ""))
    response = str(answer).strip()
    _dialogue.extend([("Пользователь", text[:600]), ("Помощник", response[:900])])
    del _dialogue[:-8]
    return response