Skip to content

feat: add agent mode#2

Merged
kalil0321 merged 1 commit into
mainfrom
feat/browser-agent
Dec 25, 2025
Merged

feat: add agent mode#2
kalil0321 merged 1 commit into
mainfrom
feat/browser-agent

Conversation

@kalil0321
Copy link
Copy Markdown
Owner

@kalil0321 kalil0321 commented Dec 25, 2025

Note

Adds fully automated browsing and capture alongside existing manual/engineer flows.

  • New AgentBrowser and run_agent_browser in browser.py using browser-use to drive the browser and record HAR; includes parse_agent_model, API key validation, and result/metadata handling
  • CLI gains third mode [agent] with run_agent_capture, integrates reverse engineering option, exposes agent model via /settings, and wires version output to __version__
  • Config adds agent_model default; Session history now records run mode
  • UI: mode-specific colors and dynamic version display
  • Dependencies: add browser-use (git) and aiohttp; enable direct references; require Python >= 3.11
  • README updates: documents agent mode, multi-provider setup (Browser-Use/OpenAI/Google), commands, and requirements/roadmap adjustments

Written by Cursor Bugbot for commit f49f124. This will update automatically on new commits. Configure here.

@kalil0321
Copy link
Copy Markdown
Owner Author

@cursor review

@kalil0321
Copy link
Copy Markdown
Owner Author

@codex review

Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the final PR Bugbot will review for you during this billing cycle

Your free Bugbot reviews will reset on January 7

Details

You are on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle.

To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

Comment thread src/reverse_api/browser.py
Comment thread src/reverse_api/browser.py
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread README.md
Comment on lines +666 to +670
console.print(f" [dim]starting browser with har...[/dim]")
browser = Browser(
record_har_path=str(self.har_path),
record_har_mode="full",
record_har_content="attach",
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Honor agent start_url when launching browser

AgentBrowser accepts and records a start_url, but when the agent browser is created it is not passed through (lines 666‑670), so any URL the user enters in agent mode is ignored and the agent always starts from a blank session. Feed self.start_url into the Browser/Agent setup so autonomous runs begin at the requested page.

Useful? React with 👍 / 👎.

@kalil0321 kalil0321 merged commit bee927f into main Dec 25, 2025
2 checks passed
shaneholloman pushed a commit to shaneholloman/reverse-api-engineer that referenced this pull request May 6, 2026
Implements the first two items of the agent-friendliness backlog (kalil0321#62):

kalil0321#1 TTY-detect at REPL entry
  Without a TTY and no subcommand, the prompt_toolkit REPL would block on
  stdin forever. Now detects `not sys.stdin.isatty()`, prints `--help` to
  stderr, and exits 2 (misuse). Subcommands are unaffected.

kalil0321#2 engineer --json / --no-interactive
  Mirrors the agent-mode contract (PR kalil0321#61): --json redirects Rich output
  to stderr and emits a stable JSON payload on stdout. New helper
  `_build_engineer_payload` produces the schema {schema_version, status,
  run_id, prompt, fresh, script_path, usage, error}. KeyboardInterrupt
  surfaces as `error: "interrupted"`. Exit codes: 0 ok, 1 runtime error.
  --no-interactive is reserved for symmetry (engineer mode has no
  questionary prompts internally).

Also surfaces `--json` / `--no-interactive` in the root --help (item kalil0321#6
partial).

Adds tests/test_cli_followups.py (14 tests) covering TTY-detect end-to-
end via subprocess, _build_engineer_payload edge cases, and the click
wiring for engineer --json (success, not-found, KeyboardInterrupt,
exception, prompt-vs-fresh threading).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.

1 participant