htmlClaw / README.md
Chris4K's picture
Update README.md
b0af8c5 verified
metadata
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