Skip to content

Agent TARS #213

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 43 commits into from
Mar 19, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
981b8e3
feat: init `@agent-infra/shared`package
ycjcl868 Mar 17, 2025
c4bf9d1
feat(@agent-infra/shared): add agent related methods
sanyuan0704 Mar 16, 2025
91f063e
feat(@agent-infra/shared): add mcp related methods
ycjcl868 Mar 16, 2025
805b985
feat(agent-infra): init logger
ycjcl868 Mar 17, 2025
337bc9d
feat(agent-infra): init browser
ulivz Mar 16, 2025
7c6dffb
feat(agent-infra): init search
ulivz Mar 16, 2025
f39e760
feat: browser use and mcp client & servers (#186)
ycjcl868 Mar 17, 2025
079a642
fix(mcp-browser): browser relaunch when session closed (#192)
ycjcl868 Mar 17, 2025
0d11f10
feat: agent tars app (#191)
sanyuan0704 Mar 17, 2025
fdedc21
fix(ci): monorepo version error (#194)
ycjcl868 Mar 17, 2025
80d7b26
fix(app): electron build error (#199)
ycjcl868 Mar 18, 2025
eb1f956
fix: clear the canvas display when deleting the history records (#197)
skychx Mar 18, 2025
e5f7bd0
fix: the replay page supports pause and resume (#198)
skychx Mar 18, 2025
39346a2
chore: release app action (#200)
ycjcl868 Mar 18, 2025
54bcf39
chore: refine files structure for desktop app (#201)
ulivz Mar 18, 2025
39744b6
feat(ui-tars): browser operator (#195)
ulivz Mar 18, 2025
a79b62a
fix: handle default exports correctly in dynamic imports (#202)
skychx Mar 18, 2025
d1891fe
feat: turbo build (#203)
ycjcl868 Mar 18, 2025
91967cd
fix: resolve path undefined error in normalizeOmegaData (#204)
skychx Mar 18, 2025
0613afc
chore: update README.md (#207)
helio9cn Mar 18, 2025
5e0c901
chore: ci speed (#206)
ycjcl868 Mar 18, 2025
cb58700
feat: support artifact (#205)
sanyuan0704 Mar 18, 2025
99ff7c7
fix(mcp): browser navigate waitForPageAndFramesLoad (#209)
ycjcl868 Mar 18, 2025
0b5fbb4
refactor(omega): hidden electron title (#208)
ulivz Mar 18, 2025
107fe2b
fix: form validation (#211)
sanyuan0704 Mar 18, 2025
45ad465
fix: browser navigator (#212)
ycjcl868 Mar 18, 2025
23e1fd6
chore: update README.md and add here banner (#214)
ulivz Mar 18, 2025
a32220b
chore: add demo video
ulivz Mar 18, 2025
54b8a7c
chore: release beta v (#215)
ycjcl868 Mar 18, 2025
7f187b0
docs: refactor `README.md` and update credits (#216)
ulivz Mar 18, 2025
ba351a8
fix(ci): turborepo prepare outputs dir (#217)
ycjcl868 Mar 18, 2025
3d975be
fix(mcp): browser navigate error (#218)
ycjcl868 Mar 19, 2025
59d343b
fix(mcp): global page set ua (#219)
ycjcl868 Mar 19, 2025
d0de21f
refactor: rename app to agent-infra (#220)
ycjcl868 Mar 19, 2025
22e0f9e
chore(release): tag prefix (#221)
ycjcl868 Mar 19, 2025
d2b7b8d
refactor: agent-tars app (#222)
ycjcl868 Mar 19, 2025
a64f3ed
feat: support artifact in replay process (#225)
sanyuan0704 Mar 19, 2025
671024b
fix: replay ui bugs (#224)
ycjcl868 Mar 19, 2025
41bffc7
feat: bing search setting panel (#227)
sanyuan0704 Mar 19, 2025
6defb2f
chore: unused resources build bundle (#226)
ycjcl868 Mar 19, 2025
ed1e997
feat: add quick start (#228)
sanyuan0704 Mar 19, 2025
b2e1271
feat(mcp): add browser adblock feature (#229)
ycjcl868 Mar 19, 2025
a2065ad
docs: some enhancements (#230)
ulivz Mar 19, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
13 changes: 11 additions & 2 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,15 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Cache turbo
uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf
with:
path: .turbo
key: ${{ runner.os }}-turbo-${{ github.sha }}
restore-keys: |
${{ runner.os }}-turbo-

- name: Install pnpm
run: npm install -g pnpm@9
- uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
Expand All @@ -42,6 +51,6 @@ jobs:
if: matrix.os == 'macos-latest'
run: npm install -g appdmg
- name: Install dependencies
run: pnpm install
run: npm exec turbo run bootstrap
- name: Run e2e
run: cd apps/ui-tars && pnpm run test:e2e
run: npm exec turbo run ui-tars-desktop#test:e2e
98 changes: 98 additions & 0 deletions .github/workflows/release-agent-tars.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
name: Release Agent-TARS app
on:
workflow_dispatch:

env:
CI: true
NODE_OPTIONS: --max-old-space-size=8192
HUSKY: 0

permissions:
id-token: write
contents: write
attestations: write

jobs:
publish_on_mac:
strategy:
fail-fast: false
matrix:
os: [macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Show operating system info
run: |
echo "Operating System:"
uname -a
- name: Install pnpm
run: npm install -g pnpm@9
- uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
with:
node-version: 20
cache: 'pnpm'
- name: Install Python setuptools
run: brew install python-setuptools
- name: Install appdmg
run: npm install -g appdmg
- name: Install the Apple certificate and provisioning profile
env:
BUILD_CERTIFICATE_BASE64: ${{ secrets.BUILD_CERTIFICATE_BASE64 }}
P12_PASSWORD: ${{ secrets.P12_PASSWORD }}
BUILD_PROVISION_PROFILE_BASE64: ${{ secrets.BUILD_PROVISION_PROFILE_BASE64 }}
KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }}
run: |
# create variables
CERTIFICATE_PATH=$RUNNER_TEMP/build_certificate.p12
PP_PATH=$RUNNER_TEMP/build_pp.mobileprovision
KEYCHAIN_PATH=$RUNNER_TEMP/app-signing.keychain-db

# import certificate and provisioning profile from secrets
echo -n "$BUILD_CERTIFICATE_BASE64" | base64 --decode -o $CERTIFICATE_PATH
echo -n "$BUILD_PROVISION_PROFILE_BASE64" | base64 --decode -o $PP_PATH

# create temporary keychain
security create-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH
security set-keychain-settings -lut 21600 $KEYCHAIN_PATH
security unlock-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH

# import certificate to keychain
security import $CERTIFICATE_PATH -P "$P12_PASSWORD" -A -t cert -f pkcs12 -k $KEYCHAIN_PATH
security set-key-partition-list -S apple-tool:,apple: -k "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH
security list-keychain -d user -s $KEYCHAIN_PATH

# apply provisioning profile
mkdir -p ~/Library/MobileDevice/Provisioning\ Profiles
cp $PP_PATH ~/Library/MobileDevice/Provisioning\ Profiles
- name: install dependencies
run: pnpm install
- name: publish Mac Universal
env:
APPLE_ID: ${{ secrets.APPLE_ID }}
APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }}
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
KEYCHAIN_PATH: ${{ runner.temp }}/app-signing.keychain-db
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
cd apps/agent-tars && pnpm run publish:mac

# publish_on_win:
# runs-on: windows-latest
# steps:
# - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
# - name: Show operating system info
# run: |
# echo "Operating System:"
# cmd /c ver
# - name: Install pnpm
# run: npm install -g pnpm@9
# - uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
# with:
# node-version: 20
# cache: 'pnpm'
# - name: install dependencies
# run: pnpm install
# - name: publish
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# run: cd apps/agent-tars && pnpm run publish:win32
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Release app
name: Release UI-TARS app
on:
# push:
# branches:
Expand Down
15 changes: 12 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,27 @@ jobs:

steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Cache turbo
uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf
with:
path: .turbo
key: ${{ runner.os }}-turbo-${{ github.sha }}
restore-keys: |
${{ runner.os }}-turbo-

- name: Install pnpm
run: npm install -g pnpm@9
- uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
with:
node-version: 20
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
run: npm exec turbo run bootstrap
- name: Run typecheck
run: cd apps/ui-tars && pnpm run typecheck
run: npm exec turbo run typecheck
- name: Run test
run: pnpm run coverage
run: npm exec turbo run coverage
- name: Upload coverage data
uses: codecov/codecov-action@13ce06bfc6bbe3ecf90edbbf1bc32fe5978ca1d3 # v5.3.1
with:
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
node_modules
dist
out
.tmp
.DS_Store
*.log*
.eslintcache
.env
test-results/
coverage/
.turbo/
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ pnpm-lock.yaml
LICENSE.md
tsconfig.json
tsconfig.*.json
apps/agent-tars/src/vendor/chat-ui/index.js
127 changes: 127 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
# Contributor covenant code of conduct

## Our pledge

We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, religion, or sexual identity
and orientation.

We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.

## Our standards

Examples of behavior that contributes to a positive environment for our
community include:

- Demonstrating empathy and kindness toward other people
- Being respectful of differing opinions, viewpoints, and experiences
- Giving and gracefully accepting constructive feedback
- Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
- Focusing on what is best not just for us as individuals, but for the
overall community

Examples of unacceptable behavior include:

- The use of sexualized language or imagery, and sexual attention or
advances of any kind
- Trolling, insulting or derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or email
address, without their explicit permission
- Other conduct which could reasonably be considered inappropriate in a
professional setting

## Enforcement responsibilities

Community leaders are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
response to any behavior that they deem inappropriate, threatening, offensive,
or harmful.

Community leaders have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, and will communicate reasons for moderation
decisions when appropriate.

## Scope

This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official e-mail address,
posting via an official social media account, or acting as an appointed
representative at an online or offline event.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement.
All complaints will be reviewed and investigated promptly and fairly.

All community leaders are obligated to respect the privacy and security of the
reporter of any incident.

## Enforcement guidelines

Community leaders will follow these Community Impact Guidelines in determining
the consequences for any action they deem in violation of this Code of Conduct:

### 1. Correction

**Community Impact**: Use of inappropriate language or other behavior deemed
unprofessional or unwelcome in the community.

**Consequence**: A private, written warning from community leaders, providing
clarity around the nature of the violation and an explanation of why the
behavior was inappropriate. A public apology may be requested.

### 2. Warning

**Community Impact**: A violation through a single incident or series
of actions.

**Consequence**: A warning with consequences for continued behavior. No
interaction with the people involved, including unsolicited interaction with
those enforcing the Code of Conduct, for a specified period of time. This
includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or
permanent ban.

### 3. Temporary ban

**Community Impact**: A serious violation of community standards, including
sustained inappropriate behavior.

**Consequence**: A temporary ban from any sort of interaction or public
communication with the community for a specified period of time. No public or
private interaction with the people involved, including unsolicited interaction
with those enforcing the Code of Conduct, is allowed during this period.
Violating these terms may lead to a permanent ban.

### 4. Permanent ban

**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.

**Consequence**: A permanent ban from any sort of public interaction within
the community.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.0, available at
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.

Community Impact Guidelines were inspired by [Mozilla's code of conduct
enforcement ladder](https://github.com/mozilla/diversity).

[homepage]: https://www.contributor-covenant.org

For answers to common questions about this code of conduct, see the FAQ at
https://www.contributor-covenant.org/faq. Translations are available at
https://www.contributor-covenant.org/translations.
64 changes: 39 additions & 25 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Contributing to UI-TARS Desktop

<!-- FIXME: Refine for Agent TARS's new structure -->

First off, thanks for taking the time to contribute! ❤️

All types of contributions are encouraged and valued. Please make sure to read the relevant section before making your contribution. It will make it a lot easier for us maintainers and smooth out the experience for all involved. The community looks forward to your contributions. 🎉
Expand Down Expand Up @@ -55,30 +57,41 @@ This is a [Monorepo](https://pnpm.io/workspaces) project including the following
```bash
.
├── README.md
├── package.json # Electron application dependencies
├── forge.config.ts # Electron pack and publish configuration
├── electron.vite.config.ts # Electron bundle configuration
├── src # Electron application source code
│   ├── main # Main process source code(Like backend)
│   ├── preload # Preload script source code
│   └── renderer # Renderer process source code(Like frontend)
├── packages # Packages or Modules or SDK for UI-TARS Desktop
│   ├── action-parser # Action parser for parsing UI-TARS model output into actions
│   ├── core # Core SDK package for UI-TARS Agent
│   ├── electron-ipc # Electron IPC for communication between main and renderer processes
│   ├── shared # Shared code of the project(including types, utils, constants, etc.)
│   ├── utio # UTIO (UI-TARS Insights and Observation)
│   ├── visualizer # Sharing HTML Visualization Reporter
│ └── operators # Automation operators
│ ├── browserbase # Browserbase integration
│   └── nut-js # Nut.js integration
├── docs # Documentation of the project
├── rfcs # RFCs (Request for Comments) for the project
├── e2e # E2E test cases for the project
├── playwright.config.ts # E2E test configuration
├── apps
│   ├── agent-tars
│   │   ├── src
│   │   │   ├── main
│   │   │   ├── preload
│   │   │   ├── renderer
│   │   │   └── vendor
│   └── ui-tars
│      └── src
│        ├── main
│         ├── preload
│         └── renderer
│ 
├── packages
│   ├── agent-infra
│   │   ├── browser
│   │   ├── browser-use
│   │   ├── logger
│   │   ├── mcp-client
│   │   ├── mcp-servers
│   │   ├── search
│   │   └── shared
│   ├── common
│   │   ├── configs
│   │   └── electron-build
│   └── ui-tars
│   ├── action-parser
│   ├── cli
│   ├── electron-ipc
│   ├── operators
│   ├── sdk
│   ├── shared
│   ├── tsconfig.node.json
│   ├── utio
│   └── visualizer
└── vitest.*.mts # Unit test configuration
```

Expand All @@ -103,7 +116,8 @@ $ pnpm install
#### Run the application

```bash
$ pnpm run dev
$ pnpm run dev:ui-tars # Start UI-TARS Desktop
$ pnpm run dev:agent-tars # Start Agent-TARS Desktop
```

After the application starts, you can see the UI-TARS interface within the application.
Expand Down
Loading