Skip to content

Latest commit

 

History

14 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Zara — Control Your Windows Laptop From Your Phone

An AI agent that runs on your PC and takes orders from Discord — by text or by voice, in English or Urdu.

Send a message from anywhere. Zara takes a screenshot, runs the command, opens the app, fixes the Wi-Fi, sends the file — then replies with the result and a picture of your screen.

Python Platform Developed by Bilal Hassan License PRs Welcome


What is this?

Zara is a remote laptop assistant. She lives on your Windows PC and listens to a private Discord channel that only you can talk to.

You control her from the Discord mobile app on your phone — the same app you already use. No extra app to install, nothing to buy, and it works from anywhere on mobile data or Wi-Fi.

You are outside. Your laptop is at home. You open Discord on your phone and type (or say):

"take a screenshot and tell me how the laptop is doing"

…and a few seconds later you get a picture of your screen and a spoken reply.

She also understands Urdu — send a voice note in Urdu and she replies in an Urdu voice.

She is not a chatbot with a fixed menu. She is an AI agent — a brain (Claude) plus 39 tools (screenshot, shell, files, mouse, keyboard, apps, Wi-Fi, webcam). She decides which tools to use and chains them together on her own.

Discord app on your phone  ──►  Your laptop at home  ──►  AI brain  ──►  Tools
            ▲                                                             │
            └──────────  text · screenshots · voice reply  ◄─────────────┘

No port forwarding, no static IP, no VPN, no tunnel. Your laptop connects outward to Discord, so it works behind any home router or mobile network.


What she can do

📸 See your screen Takes screenshots — and actually reads them to decide what to do next
💻 Run anything Any PowerShell command, install software, check logs, run builds
📁 Files Read, write, search, and send files to your phone
🖱️ Use apps like a human Opens apps, focuses windows, clicks, types, pastes long text instantly
💬 WhatsApp Opens a chat and sends a message for you
🎙️ Voice in Send a voice note in English or Urdu — she understands it
🔊 Voice out Replies in a natural female voice, in the same language you used
🩺 System health CPU, RAM, disk, battery, biggest processes — and frees RAM when asked
📊 Daily summary Messages you once a day with health, today's downloads and activity
🌡️ Heat alert Warns you when the CPU runs dangerously hot
👁️ Person detection Alerts you when someone is at the laptop — via webcam, or keyboard/mouse activity if the PC has no camera
📶 Fixes its own Wi-Fi Detects the charger coming back after a power cut and reconnects by itself
📧 Email Reads, searches and summarises your Gmail/Outlook inbox — read-only, never sends or deletes
📡 Live view Streams the screen as photos every few seconds on demand (/live on)
🔌 Wake-on-LAN Wakes other PCs on the network; prepares this laptop so a phone app can wake it when off
🔐 Per-channel permissions Mark any channel read-only — only your private channel can change things
♻️ Never dies Auto-starts at login, a watchdog restarts her within 3 minutes if she stops

Requirements

Before you start, make sure you have:

  • Windows 10 or 11 — this does not run on Mac or Linux
  • Python 3.10+ — while installing, tick "Add Python to PATH"
  • A Claude subscription (Claude Pro/Max) or an Anthropic API key
  • A Discord account (free)

Zara can run on your existing Claude subscription through the Claude Code CLI — no separate per-token API bill. An API key also works if you prefer.


Install — step by step

It takes about 10 minutes. You do not need to write any code.

Step 1 — Download

git clone https://github.com/bilals2008/zara-ai-laptop-agent.git

No git? Click the green Code button above → Download ZIP → unzip it somewhere like D:\zara.

Step 2 — Create your Discord bot

  1. Open https://discord.com/developers/applications

  2. Click New Application → name it ZaraCreate

  3. In the left menu click Bot

  4. Scroll down to Privileged Gateway Intents and turn ONMESSAGE CONTENT INTENTSave Changes

    ⚠️ Do not skip this. Without it, Zara appears online but cannot read a single message. This is the #1 reason people get stuck.

  5. Click Reset TokenCopy. This is your bot token — keep it private.

Step 3 — Make a server and invite her

A Discord bot can only be messaged if you share a server with it.

  1. In the Discord app, click + on the left → Create My OwnFor me and my friends → name it Laptop
  2. Back in the developer portal: OAuth2URL Generator
  3. Under Scopes, tick bot
  4. Under Bot Permissions, tick: Send Messages, Attach Files, Read Message History, Embed Links
  5. Copy the generated URL at the bottom, open it in your browser, pick your Laptop server → Authorize

Step 4 — Get your Discord user ID

This is the security lock: only this ID can command your laptop. Everyone else is refused.

  1. Discord → SettingsAdvanced → turn on Developer Mode
  2. Right-click your own name in the bottom-left corner
  3. Click Copy User ID

Step 5 — Install

Double-click install.bat

It creates a virtual environment, installs everything, and opens .env in Notepad. Fill in the two lines:

DISCORD_BOT_TOKEN=paste_your_bot_token_here
DISCORD_ALLOWED_USER_IDS=paste_your_user_id_here

Save the file and close it.

Step 6 — Start her

Double-click START_ZARA.bat

Now open Discord on your phone, go to your Laptop server, and send:

/help

Then try:

screenshot my screen

That's it — you're running. 🎉


Optional extras

Make voice replies fast (free)

Voice notes are transcribed on your CPU by default, which takes ~13 seconds. With a free Groq key it drops to about 1 second, and Urdu accuracy improves a lot.

  1. Get a free key at https://console.groq.comAPI KeysCreate API Key
  2. Double-click SET_GROQ_KEY.bat and paste it

Make her voice sound human

By default Zara uses free Microsoft neural voices — clear, but a little flat. For a realistic voice with actual emotion ([warmly], [laughs], [sighs]), add an ElevenLabs key:

  1. Double-click SET_VOICE_KEY.bat and paste your key
  2. Check what your plan supports:
    .venv\Scripts\python.exe check_voice.py

If ElevenLabs is unavailable or out of credits, she silently falls back to the free voices — nothing breaks.

Keep her running forever

Double-click INSTALL_AUTOSTART.bat → click Yes on the Windows prompt.

From then on she starts at login, restarts herself within 3 minutes if she ever stops, and reconnects on her own when the internet comes back — then messages you "back online".

For surviving a full power cut while you're away, read AUTOSTART-NOTES.txt.


Daily summary & security alerts

Three optional guardians watch the laptop in the background and message you on Discord.

  • 📊 Daily summary — once a day (default 09:00) she sends system health, today's downloads and battery status. DAILY_SUMMARY=true in .env to enable.
  • 🌡️ Heat alert — if the CPU runs hotter than HEAT_THRESHOLD_C (default 88°C) she warns you. Requires a readable temperature sensor (most laptops have one; desktops often need an add-on, in which case she just reports "sensor not readable").
  • 🚨 Person alert — she checks whether someone is at the laptop and pings you with a photo. It uses the webcam for face detection. No camera? She falls back to keyboard/mouse activity + unlocked screen, so she can still tell you someone is physically using the machine. Set OWNER_FACE to a photo of yourself and she'll call out an UNKNOWN person instead of just "someone".

Quick controls from your phone (no .env edits needed):

/summary now          # send today's summary right away
/summary on           # start daily summaries
/summary time 21:30   # change the daily time
/watch on             # start person detection (camera, or activity fallback)
/heat on              # start heat alerts
/security             # see what's watching + current temperature + camera status
/cam                  # take a webcam photo right now

These need opencv-python-headless + wmi, which install.bat installs. On an older install just run install.bat once more — and remember, everything degrades gracefully: if OpenCV or a camera is missing, person detection simply uses the activity fallback.


Local web dashboard

A small web page on the laptop itself — no phone access, no internet exposure.

  • Status — is she running, which brain/model, all alerts on/off, CPU temp, camera, system health
  • Config — edit the useful .env settings in a form instead of Notepad
  • Logs — live view of discord.log
  • Tools — run screenshot, webcam, daily summary or a temperature check by hand

Enable it by setting in .env:

DASHBOARD_PORT=8500

When Zara runs she starts the dashboard automatically. To run it without the bot:

python dashboard.py

Then open http://localhost:8500 in a browser on the laptop. It binds to 127.0.0.1 only, so nothing on your network or the internet can see it.

Built with Flask + Waitress (Python). No Node.js, no build step — it lives inside the same Python environment as Zara.


Commands

Command What it does
/help Show help
/new Forget the conversation and start fresh
/stop Cancel whatever she is doing
/shot Instant screenshot
/status Instant system health
/cam Take a photo with the webcam
/summary Daily summary: /summary now, /summary on|off, /summary time HH:MM
/watch on|off Alert you if someone is at the laptop
/heat on|off Alert you when the CPU gets too hot; /heat threshold 90 to change the limit
/security Status of all monitoring
/voice on · off · auto Control voice replies
/live on [sec] · off Stream the screen as photos every few seconds

Everything else is just plain English — type it or send a voice note from the Discord app:

"open chrome and go to gmail, then screenshot it" "what's eating my RAM? close the worst one" "find every invoice PDF in Documents from this year and send me the biggest" "send a WhatsApp message to Ali saying I'll be there in 10 minutes" "pull the latest changes in D:\my-project, run the tests, show me any failures" "is my internet working? if not, fix it"

Urdu works exactly the same way — she replies in whichever language you used.


Security

This tool gives an AI real control of your computer, so the design is deliberately strict:

  • Only your Discord user ID can issue commands. Everyone else is refused and logged — even people inside your own server.
  • Your .env file holds the keys to your machine. Never commit it, never share it, never open it while screen-sharing. It is already in .gitignore.
  • Everything she reads is treated as data, not orders. A web page, document or chat message that says "delete everything" will not be obeyed — she shows it to you instead.
  • She will not type your passwords or card numbers into forms.
  • Set CONFIRM_RISKY=true in .env to make destructive actions (delete, shutdown, registry, format) ask you for a Run it / Cancel confirmation first.

Use this on a computer you own. You are responsible for what you ask it to do.


Troubleshooting

She shows online but never replies

MESSAGE CONTENT INTENT is off. Go back to Step 2.4. This causes 9 out of 10 problems.

"You are not authorised to control this machine"

Your DISCORD_ALLOWED_USER_IDS is wrong. Redo Step 4 — make sure you copied your user ID, not the bot's application ID.

Nothing happens when I run install.bat

Python isn't installed, or "Add Python to PATH" wasn't ticked during install. Reinstall Python and tick that box.

I can't find the bot to message it

You haven't invited it to a server yet — do Step 3. A bot can't be DMed unless you share a server.

Voice notes are ignored

The first voice note downloads a speech model (~0.5 GB) once, so it's slow the first time. After that it's fast. Add a Groq key to make it about 1 second.

She stops in the middle of a long job

Raise MAX_ITERATIONS in .env (default 400). Every click, wait and screenshot counts as one step, so very long jobs can hit the ceiling. She also auto-continues 3 times before pausing.


How it works

  • Discord is the transport — no open ports, no port forwarding, no tunnel, no static IP. Your laptop connects outward, so it works behind any router.
  • Claude is the brain, via the Claude Agent SDK, running on your existing subscription.
  • Tools are small Python functions exposed to the model as an in-process MCP server. The model picks which to call.
  • Speech to text: faster-whisper locally, or Groq's whisper-large-v3 in the cloud.
  • Text to speech: edge-tts free, or ElevenLabs for emotional voices.

Want to add your own ability? Drop a function in agent/tools/, decorate it with @tool(...), and Zara can use it immediately.


Contributing

Issues and pull requests are welcome — especially new tools, better Urdu voice support, and Linux/Mac ports.

License

MIT — free to use, change and share. If it helps you, a ⭐ on the repo is appreciated.


Built by @bilals2008

AI agent · personal AI assistant · remote PC control · control laptop from phone · Discord bot Python · Windows automation · Claude AI agent · computer use agent · voice assistant · Urdu voice assistant · speech to text · text to speech · LLM agent · self-hosted AI assistant

About

Zara AI - control your Windows laptop from Discord by text or voice (OpenCode Zen / Groq / OpenRouter / Claude). English & Urdu.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages