### Minimal Arkloop Installation Example Source: https://github.com/qqqqqf-q/arkloop/blob/main/docs/installation.md This example demonstrates a minimal installation of Arkloop with essential configurations. It's suitable for basic setups where optional modules are not required. ```bash ./setup.sh install \ --profile standard \ --mode self-hosted \ --memory none \ --sandbox none \ --console lite \ --browser off \ --web-tools builtin \ --gateway on \ --non-interactive ``` -------------------------------- ### Start Frontend Applications Source: https://github.com/qqqqqf-q/arkloop/blob/main/CONTRIBUTING.md Install dependencies and start the frontend applications for the web interface and admin console using pnpm. ```bash cd src/apps/web && pnpm install && pnpm dev cd src/apps/console && pnpm install && pnpm dev ``` -------------------------------- ### Start Benchmark Environment Source: https://github.com/qqqqqf-q/arkloop/blob/main/src/apps/developers/content/docs/en/guide/testing.md Start the dedicated benchmark Compose stack, ensuring ports are offset to avoid conflicts. This setup is necessary before running baseline benchmarks. ```bash docker compose -f compose.bench.yaml -p arkloop-bench up -d ``` -------------------------------- ### Set Up Frontend Dependencies and Start Development Server Source: https://github.com/qqqqqf-q/arkloop/blob/main/src/services/worker/internal/tools/builtin/arkloop_help/docs/development_self_host.md Install frontend dependencies at the repository root using pnpm, then start the development servers for the web and console applications. Vite proxy settings may direct '/v1' to the local backend. ```bash pnpm install # 仓库根目录 ``` ```bash cd src/apps/web && pnpm dev ``` ```bash cd src/apps/console && pnpm dev ``` -------------------------------- ### Start Web App (Linux/macOS) Source: https://github.com/qqqqqf-q/arkloop/blob/main/src/apps/developers/content/docs/en/guide/index.mdx Starts the web application on Linux or macOS. Sets the API proxy target and installs dependencies using pnpm before running the development server. ```bash export ARKLOOP_API_PROXY_TARGET=http://127.0.0.1:19000 cd src/apps/web && pnpm install && pnpm dev ``` -------------------------------- ### Install Arkloop via Docker Compose Source: https://context7.com/qqqqqf-q/arkloop/llms.txt Use the setup.sh script for guided installation. Choose profiles and modes based on your needs, from minimal to full installs with optional modules like persistent memory and sandboxing. Pre-built images can be used with the --prod flag. ```bash # Check host prerequisites (Docker, KVM, port availability) ./setup.sh doctor # Expected output fields: platform, docker, compose, kvm, port_19000, port_9000 ``` ```bash # Minimal install (standard profile, no optional modules) ./setup.sh install \ --profile standard \ --mode self-hosted \ --memory none \ --sandbox none \ --console lite \ --browser off \ --web-tools builtin \ --gateway on \ --non-interactive ``` ```bash # Full install: persistent memory + Firecracker sandbox + self-hosted search (Linux/KVM) ./setup.sh install \ --profile full \ --mode self-hosted \ --memory openviking \ --sandbox firecracker \ --console lite \ --browser on \ --web-tools self-hosted \ --gateway on \ --non-interactive ``` ```bash # Use pre-built GHCR images instead of building locally ARKLOOP_VERSION=v0.5.0 ./setup.sh install --prod \ --profile standard --mode self-hosted --memory none \ --sandbox none --console lite --browser off \ --web-tools builtin --gateway on --non-interactive ``` ```bash # Verify the stack is up ./setup.sh status curl -sf http://localhost:19000/healthz && echo "gateway ok" ``` -------------------------------- ### Start Web App (Windows) Source: https://github.com/qqqqqf-q/arkloop/blob/main/src/apps/developers/content/docs/en/guide/index.mdx Starts the web application on Windows. Sets the API proxy target and installs dependencies using pnpm before running the development server. ```powershell $env:ARKLOOP_API_PROXY_TARGET="http://127.0.0.1:19000" cd src/apps/web; pnpm install; pnpm dev ``` -------------------------------- ### Get Run Details Response Example Source: https://github.com/qqqqqf-q/arkloop/blob/main/src/apps/developers/content/api/en/runs.md Example response for retrieving run details, including core identifiers and status. ```json { "run_id": "...", "org_id": "...", "thread_id": "...", "created_by_user_id": "...", "status": "completed", "created_at": "2024-01-01T00:00:00Z", "trace_id": "..." } ``` -------------------------------- ### Install Arkloop in SaaS Mode Source: https://github.com/qqqqqf-q/arkloop/blob/main/src/apps/developers/content/docs/zh/guide/saas-deployment.md Run the setup script to install or upgrade Arkloop in SaaS mode non-interactively. This command is idempotent and updates services with the latest configuration. ```bash ./setup.sh install --mode saas --profile standard --non-interactive --prod ``` -------------------------------- ### Full Arkloop Install with Docker Sandbox Source: https://github.com/qqqqqf-q/arkloop/blob/main/docs/installation.md This example shows a full installation of Arkloop, including persistent memory, Docker sandbox, and self-hosted search tools. It's recommended for environments requiring advanced features and isolation. ```bash ./setup.sh install \ --profile full \ --mode self-hosted \ --memory openviking \ --sandbox docker \ --console lite \ --browser off \ --web-tools self-hosted \ --gateway on \ --non-interactive ``` -------------------------------- ### Install Arkloop CLI with Homebrew Source: https://github.com/qqqqqf-q/arkloop/blob/main/README.md Use Homebrew to install the Arkloop CLI. After installation, you can start the Arkloop web interface. ```bash brew install qqqqqf-q/arkloop/arkloop ark web ``` -------------------------------- ### Start Console App (Linux/macOS) Source: https://github.com/qqqqqf-q/arkloop/blob/main/src/apps/developers/content/docs/en/guide/index.mdx Starts the console application on Linux or macOS. Sets the API proxy target and installs dependencies using pnpm before running the development server. ```bash export ARKLOOP_API_PROXY_TARGET=http://127.0.0.1:19000 cd src/apps/console && pnpm install && pnpm dev ``` -------------------------------- ### Start Console App (Windows) Source: https://github.com/qqqqqf-q/arkloop/blob/main/src/apps/developers/content/docs/en/guide/index.mdx Starts the console application on Windows. Sets the API proxy target and installs dependencies using pnpm before running the development server. ```powershell $env:ARKLOOP_API_PROXY_TARGET="http://127.0.0.1:19000" cd src/apps/console; pnpm install; pnpm dev ``` -------------------------------- ### Start Web App Development Server Source: https://github.com/qqqqqf-q/arkloop/blob/main/CLAUDE.md Navigate to the web app directory and run this command to start the development server. ```bash cd src/apps/web && pnpm dev ``` -------------------------------- ### Copy Environment Example Source: https://github.com/qqqqqf-q/arkloop/blob/main/src/apps/developers/content/docs/en/guide/deployment.md Copies the example environment file to be edited for local configuration. ```bash cp .env.example .env ``` -------------------------------- ### Fetch Installation Instructions with curl Source: https://github.com/qqqqqf-q/arkloop/blob/main/docs/installation.md Use curl to fetch the raw installation instructions. This method is recommended over WebFetch to ensure all critical details are preserved. ```bash curl -fsSL https://raw.githubusercontent.com/arkloop/arkloop/main/docs/installation.md ``` -------------------------------- ### Start Local Development Infrastructure Source: https://github.com/qqqqqf-q/arkloop/blob/main/CONTRIBUTING.md Use this command to start the minimal required infrastructure for local development, including PostgreSQL and Redis. ```bash docker compose up -d postgres redis ``` -------------------------------- ### Start Infrastructure with Docker Compose Source: https://github.com/qqqqqf-q/arkloop/blob/main/AGENTS.md Use this command to start the necessary infrastructure services like PostgreSQL, Redis, and MinIO. ```bash docker compose up -d postgres redis minio pgbouncer ``` -------------------------------- ### Install Frontend Dependencies Source: https://github.com/qqqqqf-q/arkloop/blob/main/AGENTS.md Install all frontend project dependencies using pnpm from the repository root. ```bash pnpm install ``` -------------------------------- ### Start Console App Development Server Source: https://github.com/qqqqqf-q/arkloop/blob/main/CLAUDE.md Navigate to the console app directory and run this command to start the development server. ```bash cd src/apps/console && pnpm dev ``` -------------------------------- ### Arkloop Installer Command Structure Source: https://github.com/qqqqqf-q/arkloop/blob/main/docs/installation.md Use this command structure to install Arkloop, ensuring to include `--non-interactive` for automated setups. Customize parameters based on your environment and desired features. ```bash ./setup.sh install \ --profile \ --mode self-hosted \ --memory \ --sandbox \ --console \ --browser \ --web-tools \ --gateway \ --non-interactive ``` -------------------------------- ### Create Account Response Example Source: https://github.com/qqqqqf-q/arkloop/blob/main/src/apps/developers/content/api/en/accounts.md Example of a successful response when creating a new workspace account. ```json { "id": "...", "slug": "acme-corp", "name": "Acme Corp", "type": "workspace", "created_at": "2024-01-01T00:00:00Z" } ``` -------------------------------- ### Install AutoCLI Source: https://github.com/qqqqqf-q/arkloop/blob/main/src/skills/opencli/SKILL.md Install AutoCLI using the provided script. For Windows users, refer to the GitHub repository for installation instructions. ```bash curl -fsSL https://raw.githubusercontent.com/nashsu/AutoCLI/main/scripts/install.sh | sh ``` -------------------------------- ### Get Project Default Workspace Response Source: https://github.com/qqqqqf-q/arkloop/blob/main/src/apps/developers/content/api/en/projects.md Example response for getting project workspace details. Includes workspace status and active session information if available. ```json { "project_id": "...", "workspace_ref": "ws_org_profile_project_xxx", "owner_user_id": "...", "status": "idle", "last_used_at": "2024-01-01T00:00:00Z", "active_session": { "session_ref": "shref_xxx", "session_type": "shell", "state": "ready", "last_used_at": "2024-01-01T00:00:00Z" } } ``` -------------------------------- ### Full Arkloop Install with Firecracker Sandbox Source: https://github.com/qqqqqf-q/arkloop/blob/main/docs/installation.md This example configures a full Arkloop installation using the Firecracker sandbox, suitable for Linux environments with KVM support. It enables browser access and built-in web tools. ```bash ./setup.sh install \ --profile full \ --mode self-hosted \ --memory openviking \ --sandbox firecracker \ --console lite \ --browser on \ --web-tools builtin \ --gateway on \ --non-interactive ``` -------------------------------- ### Start Minimal Infrastructure for Local Development Source: https://github.com/qqqqqf-q/arkloop/blob/main/src/apps/developers/content/docs/en/guide/deployment.md Starts the essential infrastructure components (PostgreSQL and Redis) for local development using Docker Compose. This is a prerequisite for running the API on the host machine. ```bash # Start the minimal infrastructure only docker compose -f compose.yaml -f compose.dev.yaml up -d postgres redis ``` -------------------------------- ### Start with Development Override Source: https://github.com/qqqqqf-q/arkloop/blob/main/src/apps/developers/content/docs/en/guide/deployment.md Starts Arkloop services using both the main compose file and a development override file for host-level debugging ports. ```bash docker compose -f compose.yaml -f compose.dev.yaml up -d ``` -------------------------------- ### Accept Invitation Response Example Source: https://github.com/qqqqqf-q/arkloop/blob/main/src/apps/developers/content/api/en/accounts.md Example of a successful response when accepting an invitation. ```json { "ok": true } ``` -------------------------------- ### GitHub Actions Deploy Workflow Source: https://github.com/qqqqqf-q/arkloop/blob/main/src/apps/developers/content/docs/zh/guide/saas-deployment.md Example GitHub Actions workflow to automate the deployment of Arkloop in SaaS mode. It checks out the code, sets necessary environment secrets, and runs the setup script. ```yaml name: Deploy Arkloop SaaS on: push: branches: [main] jobs: deploy: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - name: Deploy env: ARKLOOP_POSTGRES_PASSWORD: ${{ secrets.POSTGRES_PASSWORD }} ARKLOOP_REDIS_PASSWORD: ${{ secrets.REDIS_PASSWORD }} ARKLOOP_AUTH_JWT_SECRET: ${{ secrets.JWT_SECRET }} ARKLOOP_ENCRYPTION_KEY: ${{ secrets.ENCRYPTION_KEY }} ARKLOOP_S3_SECRET_KEY: ${{ secrets.S3_SECRET_KEY }} ARKLOOP_TURNSTILE_SECRET_KEY: ${{ secrets.TURNSTILE_SECRET_KEY }} ARKLOOP_TURNSTILE_SITE_KEY: ${{ secrets.TURNSTILE_SITE_KEY }} run: | ./setup.sh install \ --mode saas \ --profile standard \ --non-interactive \ --prod ``` -------------------------------- ### AutoCLI Personal Data Examples Source: https://github.com/qqqqqf-q/arkloop/blob/main/src/skills/opencli/SKILL.md Examples of retrieving personal data like history, bookmarks, and watchlists from various services. ```bash autocli bilibili history --format json ``` ```bash autocli twitter bookmarks --format json ``` ```bash autocli xueqiu watchlist --format json ``` ```bash autocli weread highlights --format json ``` ```bash autocli reddit saved --format json ``` -------------------------------- ### Send Invitation Response Example Source: https://github.com/qqqqqf-q/arkloop/blob/main/src/apps/developers/content/api/en/accounts.md Example of a successful response when sending an invitation. ```json { "id": "...", "account_id": "...", "invited_by_user_id": "...", "email": "bob@example.com", "role": "member", "expires_at": "2024-02-01T00:00:00Z", "accepted_at": null, "created_at": "2024-01-01T00:00:00Z", "token": "..." } ``` -------------------------------- ### Start Performance Profile Source: https://github.com/qqqqqf-q/arkloop/blob/main/src/apps/developers/content/docs/en/guide/deployment.md Starts Arkloop services with the performance profile enabled, requiring specific environment variables to be set first. ```bash docker compose --profile performance up -d ``` -------------------------------- ### Create Team Response Example Source: https://github.com/qqqqqf-q/arkloop/blob/main/src/apps/developers/content/api/en/accounts.md Example of a successful response when creating a new team. ```json { "id": "...", "account_id": "...", "name": "Legal Team", "members_count": 0, "created_at": "2024-01-01T00:00:00Z" } ``` -------------------------------- ### Global Run List Response Example Source: https://github.com/qqqqqf-q/arkloop/blob/main/src/apps/developers/content/api/en/runs.md Detailed example of a run object in the global list, including token counts, cost, duration, and user information. ```json [ { "run_id": "...", "org_id": "...", "thread_id": "...", "status": "completed", "model": "claude-3-5-sonnet", "persona_id": null, "total_input_tokens": 1000, "total_output_tokens": 500, "total_cost_usd": 0.005, "duration_ms": 3200, "cache_hit_rate": 0.4, "credits_used": 5, "created_at": "2024-01-01T00:00:00Z", "completed_at": "2024-01-01T00:00:03Z", "failed_at": null, "created_by_user_id": "...", "created_by_user_name": "alice", "created_by_email": "alice@example.com" } ] ``` -------------------------------- ### List Runs under a Thread Response Example Source: https://github.com/qqqqqf-q/arkloop/blob/main/src/apps/developers/content/api/en/runs.md Example response for listing runs under a thread, showing run ID, status, and creation timestamp. ```json [ { "run_id": "...", "status": "completed", "created_at": "2024-01-01T00:00:00Z" } ] ``` -------------------------------- ### Create Run Response Example Source: https://github.com/qqqqqf-q/arkloop/blob/main/src/apps/developers/content/api/en/runs.md Example of a successful response when creating a run, returning the run ID and trace ID. ```json { "run_id": "...", "trace_id": "..." } ``` -------------------------------- ### List Tool Providers Response Example Source: https://github.com/qqqqqf-q/arkloop/blob/main/src/apps/developers/content/api/en/tool-providers.md Example JSON response when listing tool providers, showing active and inactive providers with their configuration status. ```json { "groups": [ { "group_name": "web_search", "providers": [ { "group_name": "web_search", "provider_name": "web_search.tavily", "is_active": true, "key_prefix": "tvly-****1234", "requires_api_key": true, "requires_base_url": false, "configured": true }, { "group_name": "web_search", "provider_name": "web_search.searxng", "is_active": false, "base_url": null, "requires_api_key": false, "requires_base_url": true, "configured": false } ] } ] } ``` -------------------------------- ### Start Object Storage (SeaweedFS) Source: https://github.com/qqqqqf-q/arkloop/blob/main/src/apps/developers/content/docs/en/guide/deployment.md Use this command to start the SeaweedFS object storage service in detached mode. ```bash docker compose -f compose.yaml -f compose.dev.yaml --profile s3 up -d seaweedfs ``` -------------------------------- ### Start Optional Docker Compose Profiles Source: https://github.com/qqqqqf-q/arkloop/blob/main/src/services/worker/internal/tools/builtin/arkloop_help/docs/development_self_host.md Commands to start optional services such as S3 compatible storage (SeaweedFS), PgBouncer, OpenViking, or Bridge. The profile names must match those in the root compose.yaml file. ```bash docker compose --profile s3 up -d seaweedfs ``` ```bash docker compose --profile pgbouncer up -d pgbouncer ``` ```bash docker compose --profile openviking up -d openviking ``` ```bash docker compose --profile bridge up -d bridge ``` -------------------------------- ### Create Project Response Source: https://github.com/qqqqqf-q/arkloop/blob/main/src/apps/developers/content/api/en/projects.md Example of a successful response when creating a new project. ```json { "id": "...", "org_id": "...", "team_id": null, "name": "Legal Counsel Project", "description": "...", "visibility": "private", "created_at": "2024-01-01T00:00:00Z" } ``` -------------------------------- ### AutoCLI Interactive (Write) Examples Source: https://github.com/qqqqqf-q/arkloop/blob/main/src/skills/opencli/SKILL.md Examples of performing write operations such as posting, replying, and liking on platforms like Twitter and Jike. ```bash autocli twitter post --text "Hello from CLI!" ``` ```bash autocli twitter reply --url "https://x.com/.../status/123" --text "Great post!" ``` ```bash autocli twitter like --url "https://x.com/.../status/123" ``` ```bash autocli jike create --text "Hello Jike!" ``` ```bash autocli xiaohongshu publish --title "标题" --content "内容" ``` -------------------------------- ### Install Docker Engine on Linux Source: https://github.com/qqqqqf-q/arkloop/blob/main/docs/installation.md Follow these steps to install Docker Engine on a Linux system if it's not already available. This is a prerequisite for using Docker-related sandbox features. ```bash # Install Docker Engine curl -fsSL https://get.docker.com | sh sudo usermod -aG docker $USER # Re-login or run: newgrp docker ``` -------------------------------- ### Arkloop Production Install with Pre-built Images Source: https://github.com/qqqqqf-q/arkloop/blob/main/docs/installation.md Use this command to perform a production installation of Arkloop using pre-built images from GHCR. This method is faster as it avoids local builds. You can optionally pin a specific version. ```bash ./setup.sh install --prod \ --profile standard \ --mode self-hosted \ ... --non-interactive ``` ```bash ARKLOOP_VERSION=v0.5.0 ./setup.sh install --prod --non-interactive ... ``` -------------------------------- ### AutoCLI Search Examples Source: https://github.com/qqqqqf-q/arkloop/blob/main/src/skills/opencli/SKILL.md Examples of using AutoCLI to search for content on platforms like Bilibili, Zhihu, Twitter, and Google. ```bash autocli bilibili search --keyword "AI" --format json ``` ```bash autocli zhihu search --keyword "大模型" --format json ``` ```bash autocli twitter search "rust lang" --limit 10 ``` ```bash autocli youtube search --query "LLM tutorial" --format json ``` ```bash autocli boss search --query "AI工程师" --city "上海" --format json ``` ```bash autocli google search "autocli" --format json ``` ```bash autocli stackoverflow search "rust async" --format json ``` -------------------------------- ### AutoCLI Reading/Browsing Examples Source: https://github.com/qqqqqf-q/arkloop/blob/main/src/skills/opencli/SKILL.md Examples of using AutoCLI to read or browse content from various websites like Bilibili, Zhihu, and HackerNews. ```bash autocli bilibili hot --limit 10 --format json ``` ```bash autocli zhihu hot --format json ``` ```bash autocli weibo hot --format json ``` ```bash autocli twitter timeline --format json ``` ```bash autocli hackernews top --limit 20 --format json ``` ```bash autocli v2ex hot --format json ``` ```bash autocli reddit hot --format json ``` ```bash autocli xiaohongshu feed --format json ``` ```bash autocli douban top250 --format json ``` ```bash autocli weread shelf --format json ``` ```bash autocli medium feed --format json ``` -------------------------------- ### Create Run Request Body Example Source: https://github.com/qqqqqf-q/arkloop/blob/main/src/apps/developers/content/api/en/runs.md Example of a request body for creating a run, including optional route and persona IDs. ```json { "route_id": "string", "persona_id": "string" } ``` -------------------------------- ### SSE Event Format Examples Source: https://github.com/qqqqqf-q/arkloop/blob/main/src/apps/developers/content/api/en/runs.md Examples demonstrating the format of Server-Sent Events, including sequence number, event type, data payload, and timestamp. ```text data: {"seq":1,"type":"run.started","data":{...},"created_at":"..."} data: {"seq":2,"type":"message.delta","data":{"content":"..."}} data: {"seq":99,"type":"run.completed","data":{}} ``` -------------------------------- ### Start API Service (Linux/macOS) Source: https://github.com/qqqqqf-q/arkloop/blob/main/src/apps/developers/content/docs/en/guide/index.mdx Starts the API service on Linux or macOS. Sets environment variables to load the .env file and specifies the .env file path. The default listen address is 127.0.0.1:19001. ```bash export ARKLOOP_LOAD_DOTENV=1 export ARKLOOP_DOTENV_FILE=.env cd src/services/api && go run ./cmd/api ``` -------------------------------- ### Start Optional Performance Layer for Local Development Source: https://github.com/qqqqqf-q/arkloop/blob/main/src/apps/developers/content/docs/en/guide/deployment.md Starts the optional performance layer, including Pgbouncer and Redis Gateway, for local development using Docker Compose. This can be added after the minimal infrastructure is running. ```bash # Optional performance layer docker compose -f compose.yaml -f compose.dev.yaml --profile performance up -d pgbouncer redis_gateway ``` -------------------------------- ### List Messages API Response Example Source: https://github.com/qqqqqf-q/arkloop/blob/main/src/apps/developers/content/api/en/messages.md An example response when listing messages. It shows a message from the assistant, including its content and creation time. The `created_by_user_id` is null for assistant messages. ```json [ { "id": "...", "org_id": "...", "thread_id": "...", "created_by_user_id": null, "role": "assistant", "content": "According to Article 3 of the contract...", "created_at": "2024-01-01T00:00:01Z" } ] ``` -------------------------------- ### Start Backend Services Source: https://github.com/qqqqqf-q/arkloop/blob/main/CONTRIBUTING.md Run the core backend services, including the API, gateway, and worker, using Go. ```bash cd src/services/api && go run . & cd src/services/gateway && go run . & cd src/services/worker && go run . ``` -------------------------------- ### Run Frontend Development Server Source: https://github.com/qqqqqf-q/arkloop/blob/main/AGENTS.md Start the development server for the web or console frontend applications. Navigate to the specific app directory first. ```bash cd src/apps/web && pnpm dev ``` ```bash cd src/apps/console && pnpm dev ``` -------------------------------- ### Get Project Details Source: https://context7.com/qqqqqf-q/arkloop/llms.txt Fetches detailed information about a specific project using its ID. ```bash # Get project details curl -s "$BASE/v1/projects/$PROJECT_ID" -H "Authorization: Bearer $TOKEN" ``` -------------------------------- ### Get Daily Usage for a Date Range Source: https://context7.com/qqqqqf-q/arkloop/llms.txt Retrieve daily usage statistics within a specified date range. Requires start and end dates. ```bash # Daily usage for a date range curl -s "$BASE/v1/me/usage/daily?start=2024-01-01&end=2024-01-31" \ -H "Authorization: Bearer $TOKEN" ``` -------------------------------- ### Configure Environment Variables Source: https://github.com/qqqqqf-q/arkloop/blob/main/CONTRIBUTING.md Copy the example environment file and edit it to configure your local development settings. ```bash cp .env.example .env # Edit .env with your local configuration ``` -------------------------------- ### Run Arkloop Doctor Command Source: https://github.com/qqqqqf-q/arkloop/blob/main/docs/installation.md Execute the doctor command to detect the host environment and parse its output to inform installation decisions. Ensure the setup script is executable. ```bash chmod +x ./setup.sh ``` ```bash ./setup.sh doctor ``` -------------------------------- ### Get Daily Usage Statistics Source: https://github.com/qqqqqf-q/arkloop/blob/main/src/apps/developers/content/api/en/me.md Retrieves daily usage statistics for a specified date range. Requires start and end dates in YYYY-MM-DD format. Requires Bearer Token authentication. ```http GET /v1/me/usage/daily ``` -------------------------------- ### Run API Service with Go Source: https://github.com/qqqqqf-q/arkloop/blob/main/CLAUDE.md Navigate to the API service directory and run this command to start the API service. ```bash cd src/services/api && go run ./cmd/api ``` -------------------------------- ### Run Gateway Service with Go Source: https://github.com/qqqqqf-q/arkloop/blob/main/CLAUDE.md Navigate to the gateway service directory and run this command to start the gateway service. ```bash cd src/services/gateway && go run ./cmd/gateway ``` -------------------------------- ### Verify Arkloop Installation Status Source: https://github.com/qqqqqf-q/arkloop/blob/main/docs/installation.md Run this command after installation to check if the Arkloop services are running correctly. This is a crucial step to ensure the installation was successful. ```bash ./setup.sh status ``` -------------------------------- ### Example Conventional Commit Source: https://github.com/qqqqqf-q/arkloop/blob/main/CONTRIBUTING.md An example of a feature commit with a scope and subject. ```git feat(parser): add support for nested json objects ``` -------------------------------- ### Build Web App with pnpm Source: https://github.com/qqqqqf-q/arkloop/blob/main/CLAUDE.md Navigate to the web app directory and run this command to build the production version of the application. ```bash cd src/apps/web && pnpm build ``` -------------------------------- ### List Team Members Response Example Source: https://github.com/qqqqqf-q/arkloop/blob/main/src/apps/developers/content/api/en/accounts.md Example response when listing members of a team. ```json [ { "team_id": "...", "user_id": "...", "role": "member", "created_at": "2024-01-01T00:00:00Z" } ] ``` -------------------------------- ### Create a Project Source: https://context7.com/qqqqqf-q/arkloop/llms.txt Creates a new project to group threads. Requires a name and can include a description and visibility settings. ```bash # Create a project curl -sX POST "$BASE/v1/projects" \ -H "Authorization: Bearer $TOKEN" \ -H "Content-Type: application/json" \ -d '{"name":"Legal Counsel","description":"Contract review threads","visibility":"private"}' ``` -------------------------------- ### Start All Services Source: https://github.com/qqqqqf-q/arkloop/blob/main/src/apps/developers/content/docs/en/guide/deployment.md Starts all Arkloop services in detached mode using Docker Compose. ```bash docker compose up -d ``` -------------------------------- ### Run Database Migrations Source: https://github.com/qqqqqf-q/arkloop/blob/main/src/apps/developers/content/docs/en/guide/deployment.md Navigate to the API service directory and run the database migrations using the provided command. Ensure the .env file is correctly referenced. ```bash cd src/services/api ARKLOOP_LOAD_DOTENV=1 ARKLOOP_DOTENV_FILE=../../.env go run ./cmd/migrate up ``` -------------------------------- ### Submit Interactive Input Request Body Example Source: https://github.com/qqqqqf-q/arkloop/blob/main/src/apps/developers/content/api/en/runs.md Example of the request body for submitting interactive input to a run. ```json { "content": "string" } ``` -------------------------------- ### Run Worker Service with Go Source: https://github.com/qqqqqf-q/arkloop/blob/main/CLAUDE.md Navigate to the worker service directory and run this command to start the worker service. ```bash cd src/services/worker && go run ./cmd/worker ``` -------------------------------- ### Run Benchmark with OpenViking Source: https://github.com/qqqqqf-q/arkloop/blob/main/src/apps/developers/content/docs/en/guide/testing.md Optionally include OpenViking in the benchmark by providing the root API key. Ensure a running OpenViking instance is accessible. ```bash go run ./tests/bench/cmd/bench baseline \ -include-openviking \ -openviking-root-key "$ARKLOOP_OPENVIKING_ROOT_API_KEY" \ -out /tmp/arkloop-baseline.json ``` -------------------------------- ### Build and Run Sandbox Locally (Docker Mode) Source: https://github.com/qqqqqf-q/arkloop/blob/main/src/apps/developers/content/docs/en/guide/deployment.md Builds the Sandbox binary and runs it in Docker mode for local development. This setup allows for debugging and hot-reloading on the host machine while the infrastructure runs in Docker. ```bash cd src/services/sandbox go build -o sandbox-bin ./cmd/sandbox # Docker Mode ARKLOOP_SANDBOX_PROVIDER=docker \ DOCKER_HOST=unix:///run/user/1000/docker.sock \ ARKLOOP_SANDBOX_SOCKET_DIR=/tmp/sandbox \ ARKLOOP_SANDBOX_TEMPLATES_PATH="" \ ./sandbox-bin ``` -------------------------------- ### Build and Check Frontend Apps Source: https://github.com/qqqqqf-q/arkloop/blob/main/AGENTS.md Commands to build, lint, and type-check frontend applications. Run these from within the specific app's directory. ```bash cd src/apps/web && pnpm build ``` ```bash cd src/apps/web && pnpm lint ``` ```bash cd src/apps/web && pnpm type-check ``` -------------------------------- ### Start PostgreSQL Database Source: https://github.com/qqqqqf-q/arkloop/blob/main/src/apps/developers/content/docs/en/guide/index.mdx Initializes the PostgreSQL database using Docker Compose. Ensure you edit the .env file to set the ARKLOOP_POSTGRES_PASSWORD before running. ```bash cp .env.example .env # edit .env and set ARKLOOP_POSTGRES_PASSWORD docker compose up -d ``` -------------------------------- ### Run API Unit Tests with Go Source: https://github.com/qqqqqf-q/arkloop/blob/main/CLAUDE.md Navigate to the API service directory and run this command to execute all unit tests. ```bash cd src/services/api && go test ./... ``` -------------------------------- ### Send Message API Response Example Source: https://github.com/qqqqqf-q/arkloop/blob/main/src/apps/developers/content/api/en/messages.md This is an example of a successful response when sending a message. It includes details about the message, sender, and creation timestamp. ```json { "id": "...", "org_id": "...", "thread_id": "...", "created_by_user_id": "...", "role": "user", "content": "Help me analyze this contract", "created_at": "2024-01-01T00:00:00Z" } ``` -------------------------------- ### Example Fix Commit with Body and Footer Source: https://github.com/qqqqqf-q/arkloop/blob/main/CONTRIBUTING.md An example of a bug fix commit that includes a detailed explanation in the body and references an issue in the footer. ```git fix(auth): correct token expiration logic The previous logic used milliseconds instead of seconds, causing tokens to expire prematurely in production environments. Close #123 ``` -------------------------------- ### Create Plan Source: https://github.com/qqqqqf-q/arkloop/blob/main/src/apps/developers/content/api/en/subscriptions.md Creates a new plan. Requires `platform_admin` permission. ```APIDOC ## Create Plan ### Description Creates a new plan. Requires `platform_admin` permission. ### Method POST ### Endpoint /v1/plans ### Parameters #### Request Body - **name** (string) - Required - Internal name (unique) - **display_name** (string) - Required - Display name - **entitlements** (array) - Optional - Initial entitlements list **Entitlement Object** - **key** (string) - Entitlement key - **value** (string) - Entitlement value - **value_type** (string) - `integer`/`boolean`/`string` ``` -------------------------------- ### Run API Migrations Source: https://github.com/qqqqqf-q/arkloop/blob/main/AGENTS.md Navigate to the API service directory and run the migration command to update the database schema. ```bash cd src/services/api && go run ./cmd/migrate ``` -------------------------------- ### Start Sandbox in Firecracker Mode Source: https://github.com/qqqqqf-q/arkloop/blob/main/src/apps/developers/content/docs/en/guide/deployment.md Launches the Sandbox service using Firecracker microVMs. Requires /dev/kvm and the Firecracker binary. ```bash docker compose --profile firecracker up -d sandbox ``` -------------------------------- ### Run Unit Tests Source: https://github.com/qqqqqf-q/arkloop/blob/main/src/apps/developers/content/docs/en/guide/testing.md Execute unit tests for Go services and frontend applications. Navigate to the respective service directory before running the test commands. ```bash # Go cd src/services/api && go test ./... cd src/services/worker && go test ./... cd src/services/gateway && go test ./... # Frontend cd src/apps/web && pnpm test cd src/apps/console && pnpm test ``` -------------------------------- ### Create Project Source: https://github.com/qqqqqf-q/arkloop/blob/main/src/apps/developers/content/api/en/projects.md Creates a new project with specified details. ```APIDOC ## Create Project ### Description Creates a new project. ### Method POST ### Endpoint /v1/projects ### Parameters #### Request Body - **name** (string) - Required - Project name - **description** (string) - Optional - Description - **team_id** (string) - Optional - Associated team ID - **visibility** (string) - Optional - `private` (default) or `shared` ### Response #### Success Response (201 Created) - **id** (string) - Description - **org_id** (string) - Description - **team_id** (string) - Description - **name** (string) - Description - **description** (string) - Description - **visibility** (string) - Description - **created_at** (string) - Description ### Request Example { "name": "Legal Counsel Project", "description": "", "team_id": "", "visibility": "private" } ### Response Example { "id": "...", "org_id": "...", "team_id": null, "name": "Legal Counsel Project", "description": "...", "visibility": "private", "created_at": "2024-01-01T00:00:00Z" } ``` -------------------------------- ### Start API Service (Windows) Source: https://github.com/qqqqqf-q/arkloop/blob/main/src/apps/developers/content/docs/en/guide/index.mdx Starts the API service on Windows. Sets environment variables to load the .env file and specifies the .env file path. The default listen address is 127.0.0.1:19001. ```powershell $env:ARKLOOP_LOAD_DOTENV="1" $env:ARKLOOP_DOTENV_FILE=".env" cd src/services/api; go run ./cmd/api ``` -------------------------------- ### Start Optional S3 Storage Source: https://github.com/qqqqqf-q/arkloop/blob/main/CONTRIBUTING.md Enable the optional S3-compatible storage using SeaweedFS. This is useful for testing S3 integrations. ```bash docker compose --profile s3 up -d seaweedfs ``` -------------------------------- ### Run Local CI Checks Source: https://github.com/qqqqqf-q/arkloop/blob/main/README.md Use these commands to run local Continuous Integration checks. 'quick' is for a fast check, 'integration' for integration tests, and 'full' for a comprehensive check. ```bash bin/ci-local quick # Quick local CI ``` ```bash bin/ci-local integration # Go integration tests ``` ```bash bin/ci-local full # Full check ``` -------------------------------- ### List Project Workspace Directory Response Source: https://github.com/qqqqqf-q/arkloop/blob/main/src/apps/developers/content/api/en/projects.md Example response for listing directory contents in a project workspace. Returns workspace reference, path, and an array of items (files/directories). ```json { "workspace_ref": "ws_org_profile_project_xxx", "path": "/src", "items": [ { "name": "main.go", "path": "/src/main.go", "type": "file", "size": 14, "mtime_unix_ms": 1710000000000, "mime_type": "text/plain; charset=utf-8" } ] } ``` -------------------------------- ### Structural Diagram Example (SVG) Source: https://github.com/qqqqqf-q/arkloop/blob/main/src/services/worker/internal/tools/builtin/generative_ui_source/assets/sections/diagram_types.md Illustrates a structural diagram for a library branch with nested regions, internal flow, and external inputs. This SVG example uses color classes for theming and defines an arrow marker. ```svg Library branch Main floor Circulation desk Checkouts, returns Reading room Seating, reference Books New acq. ```