Local AI agent with optional browser automation, sandboxed shell, and plug-and-play skills
pip install agent-code==2.0.0 Copy PIP instructions
On a PC without a monitor, or over SSH, run agent-code tui. It provides a full-screen terminal layout with Chat, Workspace, Skills, MCP configuration, Settings, and Help pages. Model-list requests and agent work run in background threads so provider/network delays do not freeze the UI; the model picker can filter returned IDs. On Linux, agent-code automatically opens the TUI when no graphical display (DISPLAY / WAYLAND_DISPLAY) is available. Use agent-code gui to explicitly launch the desktop interface. In the TUI chat, enter ! to run a terminal command directly; recognized executable commands (for example ls, git, or python) are also dispatched to the workspace shell rather than the AI. cd changes the workspace-confined terminal directory. Use /clear or Ctrl+L to clear chat, and /stop or F5 to request stopping the current agent task (Ctrl+C stops a running task, or exits when idle).
If Tkinter is missing on a supported Linux desktop, Agent Code offers to install the distro package after asking permission (APT, DNF, Pacman, Zypper, or APK). It does not install system packages without confirmation.
Agent Code 2.0 stable line: includes a CustomTkinter workspace, separate task-plan view, detailed activity panel, browser diagnostics, cooperative stop controls, and the new agent-code doctor diagnostic command.
A local AI agent with a headless browser, sandboxed shell, chat GUI, and a plug-and-play skill system backed by a hosted skill registry.
Live site: https://agent-code-dev.github.io · Stable install: pip install agent-code
Release note: this repository version is packaged as 2.0.0. Run agent-code doctor after installation to check your local environment, including Firefox and Chromium detection. The GUI and browser still depend on compatible system-installed components.
The complete offline-friendly HTML documentation is in docs/:
Skills and Add-ons are separate systems: Skills add tools for the AI agent; Add-ons extend the Agent Code application. See the guides for the exact extension points supported by this release.
One command install. Two GUIs. A hosted skill registry.
Skills are folders under ./skills/. Install them from the in-app Skills Store or add one manually. Use Reload Skills to refresh the tool list without restarting Agent Code. Skill code is Python and should only be installed from sources you trust.
pip install agent-code That's it. No clone, no config file, no build step.
agent-code # run the agent agent-code manage # open the skill store agent-code skills # list bundled skills agent-code skills install # copy them into ./skills/ First run The agent needs an API key. On first launch:
Or create agent_config.json in the folder where you run the agent:
{ "openai_api_keys": ["sk-your-key-here"], "openai_base_url": "https://api.openai.com/v1", "openai_model": "gpt-4o", "cloud_sync": false } The config file wins if both exist. The Settings dialog writes to it.
go to news.ycombinator.com and list the top 5 story titles find a free API for cat facts and call it create a snake game in a single HTML file Platform support Agent Code targets Python 3.10 or newer on Windows, Linux, and macOS. Other operating systems may work if they provide a compatible Python build, Tcl/Tk, and a Chromium-compatible browser supported by DrissionPage, but are not yet verified. Python version alone is not sufficient: the GUI and browser also need their native system dependencies.
Install Tk and a Chromium-based browser using your distribution's package manager. Examples:
# Ubuntu / Debian / Kali / Mint / Pop!_OS sudo apt install python3-tk chromium # Fedora / RHEL family sudo dnf install python3-tkinter chromium # Arch / Manjaro sudo pacman -S tk chromium If your Python came from a separate environment (such as pyenv), ensure that build includes Tcl/Tk. If agent-code is not found after installation, add ~/.local/bin to PATH or run python -m agent_code --version.
Install Python 3.10+ with Tcl/Tk enabled and install Chromium or Google Chrome for browser automation. If browser startup fails, check the browser installation and DrissionPage's supported browser configuration; WebView2 is not a substitute for the Chromium browser used by DrissionPage.
The Link to SSH command parser follows the host OS quoting rules so Windows private-key paths such as C:\Users\Alice\.ssh\id_ed25519 keep their backslashes. SSH configuration and keys are resolved from the current user's home directory on each supported OS.
The app's GUI and local file-opening helpers target Windows 10/11, macOS, and Linux. The optional Alpine sandbox is a Linux container: Linux needs a working Podman service; Windows and macOS need Podman Desktop (or another working Podman machine) initialized and running. The sandbox is optional; without it, shell commands run on the host and must use that OS's available commands (for example, PowerShell/CMD commands on Windows and POSIX commands on Linux/macOS).
Optional system integrations (opening a folder in the file manager, browser startup, and platform-specific icon handling) depend on the desktop environment. Agent Code falls back to a clear error if no system file opener is available.
The app imports enabled skill.py files as Python modules. A skill can execute arbitrary code with the user's permissions, so review skill source before installing or enabling it.
skills/my_skill/ ├── skill.py ← code └── skill.md ← metadata + docs skill.py exports three things:
SKILL = {"name": "my_skill", "description": "What this does."} def greet(name: str = "world") -> str: return f"Hello, {name}!" TOOL_SCHEMAS = [{ "type": "function", "function": { "name": "greet", "description": "Return a greeting.", "parameters": { "type": "object", "properties": {"name": {"type": "string"}}, }, }, }] TOOL_CALLABLES = {"greet": greet} Restart the agent. The LLM can now call greet().
Add-ons are a separate extension layer for changing or extending Agent Code itself — not a way to train, replace, or improve the selected AI model. They are designed to be open-ended: add-ons can register agent tools, namespaced slash commands, lifecycle hooks, and actions shown in the Add-ons page. Future core versions can expose more extension points without requiring add-ons to become skills.
Open Add-ons in the sidebar. The per-user directory is:
Each add-on is a folder containing addon.json and addon.py. Use Create add-on template to generate a starter. Example manifest:
{ "name": "sample-addon", "version": "1.0.0", "description": "An example extension", "author": "Your name" } Example implementation:
def register(api): api.register_tool({ "type": "function", "function": { "name": "sample_status", "description": "Return the add-on status.", "parameters": {"type": "object", "properties": {}}, }, }, lambda: "Sample add-on is active") api.register_command("status", lambda args, log: log("Add-on active"), "Show sample add-on status") api.on("task_started", on_task_started) api.register_action("Sample action", lambda: "Action completed") def on_task_started(app, task): # Keep hooks fast and avoid blocking the UI thread. return None Commands are namespaced to avoid collisions: /sample-addon:status. Available lifecycle events currently include tools_loaded, task_started, task_finished, before_tool_call, and after_tool_call. Add-ons may also declare capability labels with api.declare_capability(...). Tools are registered with the normal agent tool registry and are subject to Agent Code's existing Plan Mode filtering and central permission checks.
Security: add-ons are trusted Python code and run with the current user's permissions. They are not a sandbox. Review add-on source before enabling it, and never enable an add-on from an untrusted source. Add-ons are disabled in Core Mode.
Optional COMMANDS export adds user-facing slash commands. A command may also register aliases for natural phrase dispatch; these invoke only the registered Python skill handler (they are never interpreted as shell commands):
COMMANDS = { "status": { "handler": handle_status, "description": "Show service status", "aliases": ["my service status", "check service status"], }, } Slash commands remain supported as before. Example bundled temp-mail commands: /email, /providers, temp mail configure, and temp mail providers.
def _handle_ping(args: list, log) -> None: log(f"pong {' '.join(args)}", "dim") COMMANDS = { "ping": {"handler": _handle_ping, "description": "Reply pong"}, } Optional skill.md frontmatter gives the skill a name, version, and author. Anything after the closing --- becomes the skill's help page, visible in the Help dialog when the user clicks the skill.
Full developer guide: read the module docstring in src/agent_code/loader.py — the loader is ~200 lines and documents the whole skill contract.
pip install agent-code ships three skills. Run agent-code skills install to copy them into your current folder's skills/:
Installed skills appear under ./skills/ / with skill.py and skill.md. Toggle them on/off in the Skills dialog.
The registry lets you publish skills and install them anywhere.
A live instance is already running at https://skills-manager.freesrv.com. Both the manager and the agent use it by default. If the domain is down, they auto-fall-back to a raw IP.
agent-code manage Sign in with any nickname — the account is created automatically. Then:
The standalone registry backend lives in server/ and is licensed separately under AGPL-3.0-only. See server/README.md.
Placed in the folder where you run agent-code, or in the platform config dir if no local file exists:
{ "openai_api_keys": ["sk-...", "sk-..."], "openai_base_url": "https://api.openai.com/v1", "openai_model": "gpt-4o", "cloud_sync": false, "disabled_skills": [], "email_api": { "provider": "resend", "api_key": "re_...", "from_addr": "onboarding@resend.dev", "from_name": "Agent" } } Field Notes openai_api_keys Multiple keys rotate per request openai_base_url Any OpenAI-compatible endpoint openai_model Depends on the provider cloud_sync Sync chats/current.json to the registry disabled_skills List of skill folder names to skip email_api Optional, used by the temp_mail skill Where files go When you run agent-code from a folder, it creates:
/ ├── skills/ ← installed + bundled skills ├── workspace/ ← sandbox for shell and file tools ├── chats/ ← auto-saved conversation └── agent_config.json (if you created one here) Whichever folder you launch from is the "project" for that session. Run agent-code from different folders to keep separate projects.
The agent executes LLM-generated commands. That's the point, but it means you need to be careful.
Full Linux sandbox (Settings → Sandbox → Enable Podman sandbox):
site-packages/agent_code/ ├── __init__.py ├── __main__.py ├── cli.py ├── paths.py ├── agent.py ├── skill_manager.py ├── loader.py └── data/ └── skills/ ├── filesystem/{skill.py,skill.md} ├── public_api/{skill.py,skill.md} └── temp_mail/{skill.py,skill.md} Your project folder (created on first run) your-folder/ ├── skills/ ├── workspace/ ├── chats/ └── agent_config.json (optional) This repository Agent-code/ ├── pyproject.toml ← PyPI metadata ├── src/agent_code/ ← the package source ├── docs/skills.html ← developer guide ├── README.md ├── LICENSE ← MIT for the Agent Code application ├── server/ │ ├── skill-server.py ← standalone registry backend │ ├── LICENSE ← AGPL-3.0-only for the server │ └── README.md └── .gitignore The registry backend is a separate component. Its AGPL-3.0-only license does not replace the MIT license for the Agent Code application; see the component-specific notices below.
git clone https://github.com/minecraftbefile-maker/Agent-code.git cd Agent-code pip install -e . Run the agent and local skill manager:
agent-code run agent-code manage The skill loader is ~200 lines: src/agent_code/loader.py. Read it alongside docs/skills.html — between the two you'll know everything the agent does with a skill.
The registry server is separately licensed so that the network-use source-sharing terms apply to that component. Do not treat the server as MIT-licensed.
Agent Code stores installed skills in a per-user data directory shared across projects:
Agent Code settings and API credentials are stored in the per-user config directory rather than in the project workspace:
The Skills Store's login/config data is stored beside the Agent Code config. Legacy project-local skills/ folders are copied into the global skills directory when the app starts; existing global skills are never overwritten. The workspace itself remains project-local. These are local files, so users should protect their OS account and avoid sharing config files containing API keys.
Open Settings → API & Models and choose a provider preset:
Provider selection is saved in the per-user Agent Code configuration. API keys remain local to that user configuration. The Google and Anthropic presets use the OpenAI SDK compatibility surface, so compatibility depends on the provider's supported request fields and model names.
When you ask Agent Code to create a new app, game, website, or other project, it creates a fresh, uniquely named subdirectory in the active workspace first and keeps the new files inside it. Existing project folders are not used as the destination. If a folder with that name already exists, Agent Code selects a free suffix such as -2 rather than overwriting it. Ask Agent Code to "modify this existing project" when you want in-place changes.
The optional Podman sandbox uses Alpine Linux 3.22. Its build-base package supplies GCC (gcc), G++ (g++), Make, and C development headers; Bash, Git, curl, Python/pip, and common command-line utilities are installed as well. The container shares the project workspace at /workspace.
The conversation toolbar provides Copy answer, Find, and Latest actions. Find searches the transcript case-insensitively and highlights the first match.
Open Settings & Accounts → Link to SSH, enter the VM hostname/IP, SSH username, port, and optionally a private-key path, then choose Link / Connect. Password authentication is supported; leave the password blank to use SSH agent/key-based authentication. Passwords are session-only and are not saved in the configuration. The remote host must already be trusted in ~/.ssh/known_hosts; Agent Code rejects unknown host keys rather than silently trusting them. After connecting, the agent receives a remote_shell tool for commands on that host. Remote commands require user approval unless permission mode is set to Auto. Disconnect removes the remote tool.
Install the SSH dependency with pip install paramiko if it is not installed. Keep SSH private keys protected and only link machines you are authorized to administer.
Link to SSH checks a matching ~/.ssh/config entry for IdentityFile and HostName, uses the SSH agent and default key locations, and accepts an explicit private-key path. If ssh user@host works but the GUI still cannot authenticate, enter the same host alias used by OpenSSH or specify its private key path. For passphrase-protected keys, unlock the key with ssh-agent first. Unknown host keys remain rejected until the host is trusted through your normal OpenSSH workflow.
Open Settings & Accounts → Link to SSH and paste a connection-only command, for example ssh root@ubuntu-server.com, ssh -p 2222 deploy@vm.example, or ssh -i ~/.ssh/id_ed25519 user@host. Agent Code reads the selected OpenSSH config (~/.ssh/config by default), uses configured identities and the SSH agent, and prompts when a host key or authentication credential needs attention. Unknown host keys are never accepted silently: verify the displayed fingerprint before choosing to save it or trust it for one connection. Passwords and key passphrases are session-only. Remote commands are executed on the linked host and should be reviewed carefully. The quick-connect field intentionally rejects remote commands and arbitrary -o options; put advanced SSH configuration in your OpenSSH config file.
Provider API keys are stored through Python keyring in the operating system's credential store (Windows Credential Manager, macOS Keychain, or a Linux Secret Service-compatible keyring). The JSON configuration stores credential references rather than API-key values. If the OS credential store is unavailable, saving credentials fails closed instead of silently writing new secrets in plaintext. Existing legacy plaintext keys are loaded for migration and are moved to the OS store the next time settings are saved successfully. Linux desktop environments need a working Secret Service/keyring session (for example, GNOME Keyring or KWallet integration).
Long-running actions now show a modal progress window, including model-list retrieval and Alpine Podman sandbox start/stop/remove. First sandbox start can take longer because Podman may need to download the Alpine image.
The terminal workspace keeps assistant replies prominent: tool results are shown as compact summaries in Chat, while complete tool output remains in the model's tool history and the recent Activity view. Use Page Up/Page Down (or Home/End) to scroll the transcript. Assistant commentary returned alongside tool calls is preserved.
The TUI also avoids resending the just-submitted user prompt twice in a single model request. Use !command to force direct shell execution; recognized executable commands are dispatched directly, while natural-language requests go to the agent.
Task reports include verified changed-file lists and, when text files can be safely decoded, aggregate line additions and deletions. Binary files are identified without fabricating line counts. See RELEASE-NOTES-2.0.0-TASK-DIFF-SUMMARY.md.
ai agent llm browser automation skills openai
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
None of the files in this release were uploaded with provenance metadata.
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.




