Skip to content

Add Cloud Agent development environment setup - #97

Open
allwefantasy wants to merge 1 commit into
masterfrom
cursor/setup-cloud-agent-env-8ea2
Open

Add Cloud Agent development environment setup#97
allwefantasy wants to merge 1 commit into
masterfrom
cursor/setup-cloud-agent-env-8ea2

Conversation

@allwefantasy

Copy link
Copy Markdown
Owner

Summary

Sets up a reproducible Cloud Agent development environment for auto-coder and makes the package importable/runnable out of the box.

What's added

  • .cursor/environment.json — declares the environment and runs bash .cursor/install.sh as the install step.
  • .cursor/install.sh — an idempotent install script that:
    • installs the system libraries some Python deps need (libcairo2, poppler-utils, ffmpeg, python3.12-venv);
    • creates an isolated virtualenv at $HOME/autocoder-venv (avoids conflicts with Debian-managed system Python packages such as PyJWT);
    • installs requirements.txt + the package in editable mode, plus pytest for the repo's test scripts;
    • symlinks the console scripts (auto-coder, auto-coder.chat, auto-coder.run, auto-coder.serve, …) into /usr/local/bin so they're on PATH with no shell-profile mutation.

Dependency fixes (required for the package to import at all)

  • Pin setuptools<81: newer setuptools removed the pkg_resources API that autocoder.common.buildin_tokenizer still imports.
  • Add missing runtime deps that the code imports but requirements.txt didn't list: pandas (via pyjava), sqlmodel (autocoder.db.store), psutil (autocoder.common.run_cmd).

.gitignore

  • Keep ignoring .cursor/ contents but track the two environment files.

Validation (local VM)

Check Result
Clean install from scratch Succeeds (auto-coder install complete: 1.0.0)
Install idempotence Passes on re-run
auto-coder / auto-coder.chat / auto-coder.run / auto-coder.serve load All OK
auto-coder.serve HTTP server Starts; /docs and /openapi.json → 200; /list_files{"files":[]}, /conf/list{"config":{}}
Built-in tokenizer (BuildinTokenizer) Returns real token counts
Unit tests (file_checkpoint/test_utils.py) 9 passed

Notes

  • RAG mode (auto-coder.rag) with the byzer-storage backend requires ray, which upstream intentionally commented out in requirements.txt and which is incompatible with current byzerllm on the latest release. It's left as an optional extra; the core CLI, chat/run agent, and server modes all work.
Open in Web Open in Cursor 

- Add .cursor/environment.json and .cursor/install.sh (venv-based
  idempotent install that exposes CLI entry points on PATH)
- Pin setuptools<81 (newer versions drop pkg_resources, which autocoder
  still imports) and add missing runtime deps: pandas, sqlmodel, psutil
- Allow the two .cursor env files through .gitignore

Co-authored-by: WilliamZhu <allwefantasy@gmail.com>
@allwefantasy
allwefantasy marked this pull request as ready for review August 22, 2026 05:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants