Choose how to run this agent
Download Agent
Choose how you want to use this agent:
Use Security Settings Key (Recommended)
Use the API key you've already saved in Security Settings. Quick and convenient!
- No need to re-enter API key
- Works offline after download
- Centralized key management
No API key found in Security Settings. Add one now
Enter API Key Manually
Enter your API key now for this specific agent download.
- Use different key for this agent
- One-time use (not saved)
- Works offline after download
Configure Agent Encryption
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
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?"