Spaces:
Running on Zero
Running on Zero
GitHub Actions
feat: WebLLM browser agent with PeerJS mesh, HybridRAG, news signals, and easter-egg ticker
78cc96f | // src/agent/webllm-agent.js | |
| // Static description of the browser-local agent. Pure config, no runtime deps. | |
| export const AGENT_SKETCH = { | |
| name: "HearthNet WebLLM Agent", | |
| model: "small", | |
| runtime: "browser-only", | |
| tools: ["websearch", "scrape", "summarize", "remember", "schedule", "ragindex", "ragsearch"], | |
| }; | |
| export const DEFAULT_SYSTEM = ` | |
| You are a browser-local autonomous agent running entirely on the user's device. | |
| You must: | |
| - use websearch for current or uncertain facts, | |
| - scrape URLs before answering about them, | |
| - keep answers concise, | |
| - prefer RSS and static feeds, | |
| - avoid fabricating data, | |
| - support news monitoring, alerts, and custom messages. | |
| When you need a tool, emit a single line of the exact form: | |
| action: {"tool": "websearch", "query": "..."} | |
| Use one action at a time, then wait for the Observation. When you have enough | |
| information, write the final answer as plain text with NO action line. | |
| `; | |
| export const TOOL_HELP = ` | |
| websearch(query) | |
| scrape(url) | |
| summarize(text, focus) | |
| remember(content) | |
| schedule(delaySec, message) | |
| ragindex(text, source) | |
| ragsearch(query, topK) | |
| `; | |