Build your own AGI. In your browser. Right now.
| ChatGPT/Claude.ai | agi.diy | |
|---|---|---|
| Privacy | Data on their servers | 100% in your browser |
| Cost | $20-200/month subscription | Pay only for API usage |
| Offline Mode | β | β WebLLM runs locally |
| Custom Tools | Limited plugins | Create unlimited tools |
| Multi-Agent | β | β Coordinated agent teams |
| Self-Modifying | β | β Agent evolves itself |
| Open Source | β | β Fully auditable |
Use the hosted version:
open https://agi.diyOr self-host:
git clone https://github.com/cagataycali/agi-diy.git
cd agi-diy/docs && python3 -m http.server 8080Then: Settings β Add API key β Start chatting
Want 100% local? Select WebLLM β Download model once β Works offline forever
graph LR
A[You type message] --> B[Agent selects tools]
B --> C[Calls AI model]
C --> D[Executes in browser]
D --> E[Shows result]
style A fill:#3b82f6,color:#fff
style E fill:#10b981,color:#fff
Everything runs in your browser. The only external call is to the AI provider you choose (or none with WebLLM).
Ask the agent to build tools on the fly:
"Create a tool that fetches Bitcoin price from CoinGecko"
The tool saves to localStorage and persists forever. Use it anytime:
"What's the current Bitcoin price?"
β Uses your custom tool β "$67,432"
"Every morning at 9am, check my Gmail and notify me of urgent emails"
Agent connects via Google OAuth, schedules a cron job, and sends push notifications.
"Watch my screen every 30 seconds and help me debug"
Agent captures your screen, spots errors, and suggests fixes in real-time.
"Spawn researcher, analyst, and writer agents. Research AI safety."
Agents coordinate through ring attentionβwhen one learns something, others see it.
Ask about a topic, then walk away. Agent keeps exploring while you're gone. When you return, findings are injected into your next message.
"Mark top 5 coffee shops near me and fly me through them"
Interactive Google Maps with GPS tracking and smooth camera animations.
| Mode | File | What it's for |
|---|---|---|
| Single Agent | index.html |
Personal assistant, coding help, quick tasks |
| Multi-Agent | agi.html |
Research teams, parallel processing, scheduled automation |
graph TD
You[You] --> Main[Main Agent]
Main --> R[Researcher]
Main --> A[Analyst]
Main --> W[Writer]
R -.-> Ring[(Ring Buffer)]
A -.-> Ring
W -.-> Ring
Ring -.-> R
Ring -.-> A
Ring -.-> W
Ring Attention: Agents share context automatically. When the researcher finds papers, the analyst and writer see that context immediately.
| Provider | Models | Best for |
|---|---|---|
| Anthropic | Claude Opus, Sonnet, Haiku | Quality reasoning |
| OpenAI | GPT-4o, GPT-4, GPT-3.5 | General tasks |
| Amazon Bedrock | Claude + extended thinking | Deep analysis |
| Model | Size | Notes |
|---|---|---|
| Qwen 2.5 3B β | ~2GB | Recommended for most users |
| Qwen 2.5 1.5B | ~1GB | Faster, less capable |
| Llama 3.2 1B | ~700MB | Smallest, for mobile |
| Hermes 8B | ~4GB | Best tool usage |
WebLLM requires Chrome/Edge 113+ with WebGPU
render_uiβ Dynamic HTML components in chatjavascript_evalβ Execute JS, return resultsstorage_get/setβ Persistent localStoragefetch_urlβ HTTP requestsnotifyβ Push notifications (works in background)
create_toolβ Define new tools at runtimelist_toolsβ See all available toolsdelete_toolβ Remove toolsupdate_selfβ Rewrite system prompt
get_user_contextβ Activity state, mouse position, idle timeset_contextβ Add custom contextscan_bluetoothβ Find nearby devices and agents
add_map_markerβ Place markers with emoji/labelsfly_to_locationβ Smooth camera animationstour_markersβ Animated journey through pointsget_map_locationβ Current GPS position
google_authβ OAuth 2.0 authenticationuse_googleβ Access 200+ Google servicesgmail_sendβ Send emails directly
use_agentβ Spawn sub-agentsinvoke_agentβ Call agent, wait for responsebroadcast_to_agentsβ Message all agentsschedulerβ Cron-based recurring tasks
Agent thinks while you're away.
| Mode | Trigger | Behavior |
|---|---|---|
| π Standard | 30s idle | Runs 3 iterations, then pauses |
| π Autonomous | Click button | Runs until [AMBIENT_DONE] or stopped |
How it works: You ask about quantum computing, go make coffee. Agent explores applications, recent breakthroughs, industry adoption. When you return, those findings auto-inject into your next message.
Your data never leaves your browser (except queries to your chosen AI provider).
| What | Where it's stored |
|---|---|
| API Keys | localStorage (never transmitted) |
| Conversations | localStorage |
| Custom Tools | localStorage |
| Settings Sync | AES-256-GCM encrypted |
With WebLLM: Zero external calls. Everything runs on your GPU.
| Platform | Steps |
|---|---|
| iOS | Safari β Share β Add to Home Screen |
| Android | Chrome β Menu β Install app |
| Desktop | Click install icon in URL bar |
Features: Home screen icon, background notifications, offline support, settings sync between devices.
- Settings β Sync β Enter password
- Copy encrypted URL
- On other device: paste URL, enter password
- All settings transfer securely
- Anthropic: console.anthropic.com
- OpenAI: platform.openai.com
- Bedrock: AWS Console β API Keys
Paste in Settings β API β Additional Request Fields:
{
"thinking": { "type": "enabled", "budget_tokens": 10000 }
}- Cloud Console β Create OAuth Client
- Add authorized origin:
https://agi.diy - Settings β Google β Paste Client ID
https://agi.diy/?q=what+time+is+it
Great for iOS Shortcutsβone tap to query.
agi.agent // Agent instance
agi.clear() // Clear conversation
agi.tools.list() // List custom tools
agi.tools.delete(name) // Remove tool
agiContext.getContext() // All context data
agiContext.scanBluetooth() // Find nearby devices| Issue | Solution |
|---|---|
| No response | Settings β Check API key |
| WebLLM won't load | Use Chrome/Edge 113+ |
| Model download stuck | Refresh page |
| Screen capture denied | Allow browser permission |
| No notifications | Enable in browser settings |
docs/
βββ index.html # Single agent mode
βββ agi.html # Multi-agent mode
βββ strands.js # Strands SDK bundle
βββ vision.js # Screen capture, ambient mode
βββ webllm.js # Local model inference
βββ map.js # Google Maps integration
βββ tools/google.js # Google API tools
βββ sw.js # Service worker (PWA)
βββ manifest.json # PWA config
PRs welcome for:
- β New tools
- β Model providers
- β Bug fixes
- β Build systems
- β Framework dependencies
The project is intentionally minimalβsingle HTML files, no build step, fully auditable.
Apache 2.0
Built with Strands Agents SDK
agi.diy