AstronRPA Documentation

repository·main·Indexed 26 days ago

https://github.com/iflytek/astron-rpa

An enterprise-grade, open-source Robotic Process Automation (RPA) desktop application for low-code/no-code automation of Windows applications and web pages. The ecosystem includes an AI Service for chat, OCR, and captcha recognition; an RPA OpenAPI Service for workflow management and execution; a Resource Service for file uploads and downloads; and a Robot Backend Service.

Tokens
47K
Snippets
118
Records
287
Agent score
90%

What's inside AstronRPA

  1. Overview of AstronRPA Frontend package structure

    main

    The AstronRPA Frontend is a monorepo containing several core packages for different application types and shared resources:

    Core Packages

    • @rpa/web-app: Main web application.
    • @rpa/electron-app: Desktop application.
    • @rpa/browser-plugin: Browser extension.
    • @rpa/components: Shared UI components.
    • @rpa/shared: Shared tools.
    • @rpa/locales: Internationalization resources.
  2. Develop with the @rpa/auth-app template

    main
    The @rpa/auth-app package provides a development template based on Vue 3, TypeScript, and Vite. It utilizes Vue 3 <script setup> Single File Components (SFCs) for component development. For best results, follow the recommended Project Setup and IDE Support guidelines in the official Vue TypeScript documentation.
  3. Understand the Smart Input Optimization Logic

    main

    The optimize_input_prompt system transforms user-provided 'Operation Descriptions' or 'Interface Goals' into executable 'Optimized Instructions'.

    Core Logic:

    • Browser GUI Operations: Triggered if gui_targets are provided. The system uses specific placeholder syntax to reference existing elements or request missing ones.
    • Data Processing Operations: Triggered if gui_targets are NOT provided. The system expands the user's description by adding required formats and examples without changing the original intent.

    Key Terminology:

    • Operation Description: The user's text requirement.
    • Interface Goal: A collection of browser elements (including uuid, screenshots, and outerHTML).
    • Optimized Instruction: The final, executable output generated by the system.
  4. System Requirements for AstronRPA

    main

    AstronRPA requires specific hardware and software environments to function correctly.

    Operating System

    • Windows: 10/11 (Primary support)

    Hardware Configuration

    ItemMinimumRecommended
    CPU2 Cores4 Cores+
    Memory4GB8GB+
    Disk10GB available20GB+
    NetworkStable internet connection-

    Software Dependencies

    ToolVersionDescription
    Node.js>= 22JavaScript runtime
    Python3.13.xRPA engine core
    JavaJDK 8+Backend service runtime
    pnpm>= 9Node.js package manager
    UV0.8+Python package management tool
    7-Zip-For creating deployment archives
    SWIG-For connecting Python with C/C++
  5. Understand the meta configuration workflow

    main

    The meta_json.py script follows this execution logic:

    1. Component Execution: Iterates through the components directory (skipping astronverse-database) and runs each component's meta.py to generate/update local meta.json files.
    2. Local Merging: Aggregates all component meta.json files into a temporary file temp_local.json.
    3. Remote Fetching: Retrieves the current server-side meta configuration via the REMOTE_META_URL and saves it as temp_remote.json.
    4. Synchronization: Merges local updates/additions into the remote configuration, producing temp_update.json. The logic prioritizes local changes while supplementing missing remote content.
    5. Upload: Prompts the user to upload the final temp_update.json to the server via COMPONENTS_META_UPLOAD_URL.
  6. Install AstronRPA Client via Release Package

    main

    For most users, the easiest way to install the AstronRPA client is to download the latest installation package from the official GitHub Releases page.

    https://github.com/iflytek/astron-rpa/releases
  7. Repackage and Reinstall Client via build.bat

    main

    To create a complete .msi installer after extensive changes, use the build.bat script in the project root.

    # 1. Run in the project root directory
    .\build.bat
    
    # 2. Wait for build to complete (10-30 minutes)
    # The new msi installer will be in build/dist/
    
    # 3. Use the generated msi to reinstall
    # 1. Run in the project root directory
    .\build.bat
    
    # 2. Wait for build to complete (may take 10-30 minutes)
    # New msi installer will be generated in build/dist/ directory
    
    # 3. Use the newly generated msi installer to reinstall
    # - Run build/dist/*.msi file directly
    # - Or replace it in the release directory for other users to download
  8. Deploy RPA OpenAPI Service with Docker Compose

    main

    For production deployment, use Docker Compose to manage the service containers.

    1. Configure environment variables: Create a .env file with your production settings.
    2. Start the services:
      docker-compose up -d
    3. Monitor status:
      docker-compose ps
      docker-compose logs -f app

    Unit Test Environment Deployment: To run tests in an isolated environment:

    # Start test dependency services
    docker-compose -f docker-compose.test.yaml up -d
    
    # Run tests
    pytest
    docker-compose up -d
  9. Install Python 3.13.x

    main

    AstronRPA requires Python 3.13.x as its core RPA engine. You can install it using several methods:

    • Official Installer: Download from python.org.
    • Winget: winget install Python.Python.3.13
    • Chocolatey: choco install python --version=3.13.x

    Note: You will need the installation path (e.g., C:\Users\{User}\AppData\Local\Programs\Python\Python313\python.exe) for later configuration.

    winget install Python.Python.3.13
  10. Build the RPA browser plugin

    main

    To build the RPA browser plugin, ensure you are using Node.js v20+.

    • Use npm run build to create a universal extension package compatible with Chrome and Edge browsers.
    • Use npm run build:browser to package the plugin for a specific browser (Chromium or Firefox-based).

    To support a specific browser variant with npm run build:browser, you must:

    1. Set the custom_agent value in src/3rd/rpa_websocket.js.
    2. Add the corresponding command to package.json where browser refers to the target browser's executable file name.
    npm run build
    npm run build:browser