--- title: HtmlClaw emoji: ๐Ÿ  colorFrom: red colorTo: gray sdk: static pinned: false license: other short_description: OpenClaw inspired HTML port... --- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference โšก CHRONOS Browser-Native WebLLM Agent Chronos is a fully client-side AI agent that runs directly in the browser using WebLLM. It combines a ReAct agent loop, persistent memory, dynamic skills, hybrid RAG, and tool execution โ€” all without a traditional backend. The system demonstrates how a modern agent architecture can run entirely inside a web environment using JavaScript + WebGPU. ๐Ÿง  Core Idea Chronos is not just a chat interface. It is a browser-resident AI agent runtime that combines: LLM (WebGPU) + Persistent Memory + Skills + Tools + Hybrid RAG + Web Search + Local Network Discovery + Scheduling Everything runs in the browser. No Python servers or AI frameworks are required to run the agent logic. ๐Ÿงฉ Architecture User โ”‚ โ–ผ Chronos UI โ”‚ โ–ผ ReAct Agent Loop โ”‚ โ”œ soul.md โ†’ agent identity โ”œ user.md โ†’ persistent user memory โ”œ skills/*.md โ†’ injected capabilities โ”‚ โ”œ tools โ”‚ โ”œ web_search โ”‚ โ”œ scrape โ”‚ โ”œ summarize โ”‚ โ”œ remember โ”‚ โ”œ read_memory โ”‚ โ”œ forget โ”‚ โ”œ schedule โ”‚ โ”œ inject_js โ”‚ โ”œ rag_index โ”‚ โ”œ rag_search โ”‚ โ”œ rag_prompt โ”‚ โ”” network_scan โ”‚ โ”” hybrid RAG index โ”‚ โ–ผ WebLLM (GPU inference) The agent builds its prompt dynamically based on: memory skills retrieved documents tool outputs conversation context โšก Features ๐Ÿง  Persistent Agent Memory Chronos uses two memory files: soul.md Defines the identity and behavior of the agent. Example: You are Chronos, a browser-native AI agent. You can reason, use tools, and retrieve knowledge. This acts as the system prompt. user.md Stores persistent user information. Example: User name: Chris Interests: - AI agents - semantic search This allows the agent to remember preferences across sessions. โšก Dynamic Skill Injection Skills extend the agent without modifying the core code. skills/ โ”œ gdpr-advisor.md โ”” code-engineer.md Skills contain instructions that are injected into the prompt when active. Example skill capabilities: domain expertise coding support legal advisory specialized reasoning Skills can be: added removed modified at runtime. ๐Ÿ” ReAct Agent Loop Chronos uses a ReAct reasoning loop: think โ†’ act โ†’ observe โ†’ respond Example flow: User: What is the latest AI news? Think: I should search the web. Act: web_search("latest AI news") Observe: results... Respond: summary This allows the agent to use tools during reasoning. ๐Ÿ›  Tool System Chronos supports a built-in tool ecosystem. Current tools include: Tool Description web_search search the web scrape extract webpage text summarize summarize long content remember store information in memory read_memory read stored memory forget delete stored memory schedule create scheduled tasks inject_js run JavaScript rag_index index documents rag_search search indexed knowledge rag_prompt inject RAG context network_scan detect local services ๐Ÿ“š Hybrid RAG Retrieval Chronos includes a browser-based RAG system. Documents can be indexed directly from the UI. Sources include: pasted text scraped pages memory manual input The system builds a hybrid index: semantic vectors + keyword terms This allows efficient retrieval inside the browser. Workflow: Index documents โ”‚ โ–ผ User query โ”‚ โ–ผ Hybrid search โ”‚ โ–ผ Top results injected into prompt ๐ŸŒ Web Search + Scraping Chronos can access external knowledge through: web_search โ†’ find pages scrape โ†’ extract content summarize โ†’ compress results Optional integration: Brave Search API https://brave.com/search/api Free tier includes: 2000 requests/month ๐Ÿ“ก Local Network Discovery The network_scan tool attempts to detect common local services. Default targets: localhost:3000 (dev) localhost:5000 (flask) localhost:5173 (vite) localhost:4200 (angular) localhost:8888 (jupyter) localhost:11434 (ollama) This allows the agent to discover locally running AI services or development servers. โฐ Scheduled Tasks Chronos can store tasks for later execution. Example: schedule("Check AI news every morning") Tasks persist inside the agent state. ๐Ÿ–ฅ Running Chronos Because WebLLM requires proper browser isolation, the UI should be served via a local proxy. Run: python proxy.py 8080 Then open: http://localhost:8080 ๐Ÿค– Model Support Chronos loads WebLLM-compatible models. Example: Llama 3.2 ยท 3B Typical requirements: Model VRAM 3B ~2GB 7B ~4-6GB WebGPU support is required. ๐Ÿ“Š Runtime Stats Chronos provides live metrics: tokens/sec total tokens web searches scrapes reasoning logs โŒจ Shortcuts Shortcut Action `Ctrl + `` open console log โ†‘ command palette Ctrl + L clear conversation ๐Ÿ”ง Example Use Cases Chronos can be used as: a local AI assistant a browser research agent a developer tool for AI experiments a WebLLM playground a lightweight autonomous agent ๐Ÿ’ก Why This Project Exists Most agent frameworks require: Python stacks vector databases complex infrastructure heavy frameworks Chronos shows that a surprisingly capable agent can run entirely inside the browser. ๐Ÿš€ Future Ideas Possible extensions: streaming token display vector embedding models multi-agent cooperation browser automation plugin marketplace distributed browser agents