This is the detailed installation guide for GenericAgent.
Two audiences:
- For Humans — you are installing GA for yourself.
- For LLM Agents — you are a coding agent such as Claude Code, or Codex installing GA for a human user. Read that section first so you do not guess.
The shortest install commands live in the main README. This guide adds platform notes, key setup, verification, troubleshooting, and agent-safe rules.
| Requirement | Notes |
|---|---|
| OS | Windows 10/11, macOS 12+, or a modern Linux distribution. |
| Python | Use Python 3.11 or 3.12. Do not use Python 3.14 — it is incompatible with pywebview and a few GA dependencies. The one-line installer ships an isolated Python environment, so manual Python setup is usually unnecessary. |
| Git | Recommended for updates and self-evolution. |
| LLM API key | GA speaks two native protocols: OpenAI-compatible APIs and Anthropic Claude native APIs. GPT-family models, Claude, Kimi, MiniMax, DeepSeek, GLM, Qwen, Gemini through OAI-compatible gateways, and similar providers can be configured through mykey.py. |
This is the easiest path. It prepares an isolated runtime, downloads GenericAgent, installs the core dependencies, and gives you a ready-to-run local project tree.
Windows PowerShell
powershell -ExecutionPolicy Bypass -c "$env:GLOBAL=1; irm http://fudankw.cn:9000/files/ga_install.ps1 | iex"Linux / macOS
GLOBAL=1 bash -c "$(curl -fsSL http://fudankw.cn:9000/files/ga_install.sh)"After installation, launch the desktop app from:
frontends/GenericAgent.exe
Or run from the project directory:
python launch.pywGenericAgent is meant to grow its environment through the Agent itself, not by pre-installing every possible package. Start small, then let GA install task-specific tools when it actually needs them.
INSTALL_DIR="$HOME/work/GenericAgent" GLOBAL=1 bash -c "$(curl -fsSL http://fudankw.cn:9000/files/ga_install.sh)"$env:INSTALL_DIR="C:\dev\GenericAgent"; powershell -ExecutionPolicy Bypass -c "$env:GLOBAL=1; irm http://fudankw.cn:9000/files/ga_install.ps1 | iex"Use this only when you know you want to refresh the installed files. Back up mykey.py, memory/, skills/, and any local work first.
FORCE=1 GLOBAL=1 bash -c "$(curl -fsSL http://fudankw.cn:9000/files/ga_install.sh)"Use this when you want a normal editable checkout.
git clone https://github.com/lsdefine/GenericAgent.git
cd GenericAgent
uv venv
uv pip install -e ".[ui]" # Core + UI dependencies
cp mykey_template.py mykey.py # Fill in your LLM API key
python launch.pywFull guide: GETTING_STARTED.md
- Open the installed
GenericAgentdirectory. - If
mykey.pydoes not exist, copy it frommykey_template.py. - Fill in one provider. Do not paste example keys as real keys.
- If you are unsure about the fields, read the comments in
mykey_template.pyfirst.
GA supports:
- OpenAI-compatible endpoints — Chat Completions / Responses shaped APIs.
- Anthropic Claude native — Claude Messages API.
Optional helper:
python assets/configure_mykey.pyFor one-line installs on Windows, double-click:
frontends/GenericAgent.exe
A lightweight keyboard-driven interface built on Textual. It supports multiple concurrent sessions and real-time streaming.
python frontends/tuiapp_v2.pypython launch.pywFrom the GenericAgent directory:
python -c "import agent_loop; print('OK')"
git rev-parse --short HEADThen launch at least one frontend:
python launch.pyw
# or
python frontends/tuiapp_v2.pyIf your system python --version reports 3.14, do not use it for GA. Use the one-line installer, or create a Python 3.11 / 3.12 environment with uv.
Some systems already use ga for another tool. Check first:
type gaIf it resolves to something unexpected, do not rely on the shortcut. Run GA from the install directory with python launch.pyw or python frontends/tuiapp_v2.py.
TUI rendering on Windows depends on terminal, font, and textual version.
- Upgrade Textual first:
pip install -U textual. - Prefer Git Bash on Windows over classic PowerShell / cmd when Unicode or key bindings look broken.
- If it still looks wrong, ask GA itself to repair the terminal compatibility. Example prompt:
"My experience using
frontends/tuiapp_v2.pyin PowerShell / cmd / Git Bash on Windows is very poor — lots of incompatibility. Please refer to Claude Code's best practices for the Windows terminal and fix all font and rendering incompatibilities."
Desktop mode depends on GTK / WebKit packages. On Debian / Ubuntu:
sudo apt install libgtk-3-dev libwebkit2gtk-4.1-dev
pip install pywebviewOn headless servers, prefer the TUI or run Streamlit in browser mode instead of desktop mode.
Do not delete a working GA directory just to update it. It may contain the user's mykey.py, memory, skills, and local work.
cd ~/GenericAgent
git fetch
git pull
uv pip install -e ".[ui]"If git pull reports conflicts:
- For
mykey.py,memory/,skills/,temp/, and user-created artifacts: prefer the local copy. - For core code such as
agent*.py,frontends/*,reflect/*, andtools/*: usually prefer upstream unless the user says otherwise. - Resolve explicitly, then
git addand commit the merge.
IMPORTANT: fetch this file with
curl, not a summarized web reader. Summaries often drop flags, command quoting, and safety rules.curl -fsSL https://raw.githubusercontent.com/lsdefine/GenericAgent/refs/heads/main/docs/installation.md
You are installing GenericAgent for a human user. Be direct, verify each step, and avoid destructive cleanup unless the user explicitly authorizes it.
Check:
- OS:
uname -a,$env:OS, orpython -c "import platform; print(platform.system())". - Existing install:
~/GenericAgent/launch.pyw,%USERPROFILE%\GenericAgent\launch.pyw, or a.gitdirectory. - Python version: must be 3.11 or 3.12 if you use the developer path.
- Git availability:
git --version. - API key readiness: ask the user if no key is available. Never invent one.
Default to the one-line installer unless the user already has a checkout.
Windows PowerShell
powershell -ExecutionPolicy Bypass -c "$env:GLOBAL=1; irm http://fudankw.cn:9000/files/ga_install.ps1 | iex"Linux / macOS
GLOBAL=1 bash -c "$(curl -fsSL http://fudankw.cn:9000/files/ga_install.sh)"If the user explicitly wants a developer checkout:
git clone https://github.com/lsdefine/GenericAgent.git
cd GenericAgent
uv venv
uv pip install -e ".[ui]"
cp mykey_template.py mykey.py- Read
mykey_template.pybefore editingmykey.py. - Configure only keys the user actually provides.
- Never print the full key back to the user.
- If the user is unsure, run
python assets/configure_mykey.pyor ask which provider they want to use.
Suggested question:
Which LLM should GenericAgent use? GA supports OpenAI-compatible endpoints and Anthropic Claude native APIs. Which provider do you want to configure, and do you already have an API key?
Run:
cd ~/GenericAgent
python -c "import agent_loop; print('OK')"
git rev-parse --short HEADThen verify one frontend:
python launch.pyw
# or, for terminal-only environments:
python frontends/tuiapp_v2.pyRead this document again and think through whether you have done everything correctly:
- You inspected the OS, existing install, Python version, Git, and key readiness before acting.
- You used the correct GA install command for this English guide, including
GLOBAL=1where shown. - You configured only real user-provided keys and did not reveal secrets.
- You verified import, Git commit hash, and at least one frontend.
Say to user: Congratulations! 🎉 You have successfully set up GenericAgent! Double-click frontends/GenericAgent.exe on Windows, or run python frontends/tuiapp_v2.py in your terminal to start using it.
Tell the user:
- Install path.
- Git commit hash.
- Which frontend you verified.
- Whether
mykey.pyis configured, without revealing secrets. - Recommended next reading: Hello GenericAgent and GETTING_STARTED.md.
After everything is set up and working, you may ask:
If you found this helpful, would you like to star the GenericAgent repository? It helps the project grow! ⭐
Only open or run anything related to starring the repository if the user explicitly agrees.
- Do not run
pip install genericagent; GA is not a PyPI package. - Do not delete
~/GenericAgentor%USERPROFILE%\GenericAgentfor a "clean install" without explicit user approval. - Do not fabricate API keys or treat sample keys as real.
- Do not assume
gais a valid shell command; check first. - Do not rely on
ga update; usegit fetch,git pull, and reinstall dependencies as shown above.
- Main README: README.md
- Getting started: GETTING_STARTED.md
- Datawhale tutorial: https://datawhalechina.github.io/hello-generic-agent/
- Technical report: https://arxiv.org/abs/2604.17091