// agent

My Chill Dev Research Buddy

by Hugagent · Sep 06, 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.

20 downloads
0 forks
0.0 rating

Description

Based on the Chill Dev Research Buddy template.

What this agent can do

My Chill Dev Research Buddy is built from the Chill Dev Research Buddy 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
conversation_memory = []
MAX_MEMORY = 8
MAX_CHARS = int("[[[MAX_CHARS|6000]]]")


def _clear_memory() -> str:
    global conversation_memory
    conversation_memory = []
    return "ok"


async def process_user_query(query: str) -> str:
    """Handle a friendly coding and research chat request.

    Args:
        query: The user's latest message.

    Returns:
        A helpful conversational response.
    """
    global conversation_memory

    clean_query = (query or "").strip()
    if not clean_query:
        return "Please send a message, and I’ll help with coding, research, or planning."

    clean_query = clean_query[:MAX_CHARS]

    history_lines = []
    for item in conversation_memory[-MAX_MEMORY:]:
        role = item.get("role", "user")
        content = item.get("content", "")[:1200]
        history_lines.append(f"{role.upper()}: {content}")

    history_text = "\n".join(history_lines)

    prompt = (
        "You are continuing a friendly developer and research chat. "
        "Use the conversation when useful. "
        "Be practical, clear, and relaxed. "
        "If the user asks for code, provide code blocks in plain text formatting. "
        "If the user asks for research, give a concise answer with tradeoffs and next steps when helpful.\n\n"
        f"Conversation so far:\n{history_text}\n\n"
        f"User message:\n{clean_query}"
    )

    answer = await agentop_llm.generate(prompt, globals().get("TEMPLATE_SYSTEM_PROMPT", ""))
    answer = (answer or "").strip()

    conversation_memory.append({"role": "user", "content": clean_query})
    conversation_memory.append({"role": "assistant", "content": answer})
    conversation_memory = conversation_memory[-(MAX_MEMORY * 2):]

    return answer or "I’m here and ready — want to try that again with a bit more detail?"