HashAgent – Share an AI agent as a URL, runs locally via WebGPU
HashAgent: Distributing Local AI Agents via Simple URLs
HashAgent introduces a novel way to distribute and utilize AI agents. Instead of relying on centralized servers, it allows users to share a fully configured AI agent through a single URL. The magic happens because the agent executes locally on the recipient's hardware using WebGPU.
🚀 The Core Concept: Private AI in a Link
The philosophy behind HashAgent is simple: Privacy by design. By shifting the computation from the cloud to the client, your data never leaves your machine.
"HashAgent enables the sharing of AI personas and instructions without requiring a backend database or user accounts."
How it Works
The configuration of the agent—including its system prompts and parameters—is encoded directly into the URL's hash fragment.
Using LaTeX to represent the logic:
When a user opens the link, the browser decodes the hash and initializes the local model.
🛠 Technical Architecture
HashAgent leverages WebGPU to ensure that large language models (LLMs) can run efficiently within the browser.
Data Flow Diagram
Feature Comparison
| Feature | Traditional AI Agents | HashAgent |
|---|---|---|
| Data Storage | Local Device | |
| Access | Account/API Key required | Single URL |
| Privacy | Third-party processing | Fully Private |
| Compute | Server-side GPU | Client-side WebGPU |
📋 Implementation Details
To get an agent running, the system follows a specific checklist:
- Parse the URL hash for configuration.
- Initialize the
WebGPUpipeline. - Load the quantized model weights.
- Apply the system prompt from the URL.
Example URL Structure
While the actual encoding is complex, the conceptual structure looks like this:
https://hashagent.ai/#agent_id=123&prompt=YouAreAHelpfulAssistant&temp=0.7
💡 Summary of Nuances
- Zero Backend: There is no need to maintain a database of agents; the URL is the database.
- Hardware Dependent: Because it uses
WebGPU, the performance depends on the user's local graphics hardware. - Instant Deployment: Sharing an agent is as fast as sending a text message.
In short, HashAgent transforms the AI agent from a hosted service into a portable, private, and shareable asset.