### Start the VM with Vagrant Source: https://github.com/arthur-ai/arthur-engine/blob/dev/VAGRANT_README.md Initiates the Vagrant virtual machine. Ensure Vagrant and VirtualBox are installed. ```bash vagrant up ``` -------------------------------- ### GenAI Engine Setup and Development Commands Source: https://github.com/arthur-ai/arthur-engine/blob/dev/CLAUDE.md Commands for setting up the GenAI Engine, including dependency installation, database setup, running the development server, and testing. ```bash cd genai-engine uv sync --group dev --group linters ``` ```bash # Start PostgreSQL (required) docker compose up ``` ```bash export POSTGRES_USER=postgres export POSTGRES_PASSWORD=changeme_pg_password export POSTGRES_URL=localhost export POSTGRES_PORT=5432 export POSTGRES_DB=arthur_genai_engine export GENAI_ENGINE_SECRET_STORE_KEY="some_test_key" uv run alembic upgrade head ``` ```bash export PYTHONPATH="src:$PYTHONPATH" uv run serve # Access at http://localhost:3030/docs ``` ```bash uv run pytest -m "unit_tests" ``` ```bash uv run pytest -m "unit_tests" --cov=src --cov-fail-under=79 ``` ```bash ./tests/test_remote.sh # Integration tests ``` ```bash uv run alembic revision --autogenerate -m "" uv run alembic upgrade head ``` ```bash uv run isort src --profile black ``` ```bash uv run autoflake --remove-all-unused-imports --in-place --recursive src ``` ```bash uv run black src ``` ```bash uv run routes_security_check ``` ```bash uv run generate_changelog ``` -------------------------------- ### Set Up Python Environment and Dependencies Source: https://github.com/arthur-ai/arthur-engine/blob/dev/integrations/claude-code-skills/arthur-onboard/EXAMPLE.md Install project dependencies using uv, activate the virtual environment, and copy the example environment file. ```bash pip install uv uv sync --extra dev source .venv/bin/activate cp .env.example .env ``` -------------------------------- ### Frontend Development Workflow Source: https://github.com/arthur-ai/arthur-engine/blob/dev/CLAUDE.md Commands for installing dependencies, starting the development server, and generating the API client for the frontend application. ```bash cd genai-engine/ui yarn install yarn dev # After OpenAPI spec changes yarn generate-api ``` -------------------------------- ### Install All Arthur Onboarding Skills Globally Source: https://github.com/arthur-ai/arthur-engine/blob/dev/integrations/claude-code-skills/arthur-onboard/README.md This script automates the global installation of all Arthur onboarding skills by downloading their respective SKILL.md files from GitHub and saving them into the ~/.claude/skills/ directory. It also downloads the instrumentation examples reference file. Error handling is included for failed downloads. ```bash BASE="https://raw.githubusercontent.com/arthur-ai/arthur-engine/main/integrations/claude-code-skills/arthur-onboard" for skill in arthur-onboard-oss arthur-onboard-oss-engine arthur-onboard-task arthur-onboard-analyze \ arthur-onboard-instrument arthur-onboard-prompts arthur-onboard-verify \ arthur-onboard-eval-provider arthur-onboard-evals arthur-skills-upgrade; do mkdir -p ~/.claude/skills/$skill curl -sSLf "$BASE/$skill/SKILL.md" > ~/.claude/skills/$skill/SKILL.md \ || { echo "FAILED: $skill"; rm -f ~/.claude/skills/$skill/SKILL.md; } done # Also install the instrumentation examples reference curl -sSLf "$BASE/arthur-onboard-instrument/EXAMPLES.md" > ~/.claude/skills/arthur-onboard-instrument/EXAMPLES.md \ || { echo "FAILED: arthur-onboard-instrument/EXAMPLES.md"; rm -f ~/.claude/skills/arthur-onboard-instrument/EXAMPLES.md; } ``` -------------------------------- ### Environment Variables Setup Source: https://github.com/arthur-ai/arthur-engine/blob/dev/genai-engine/examples/agents/analytics-agent/README.md Copy the example .env file and populate it with your API keys and configuration settings for OpenAI, Arthur Engine, and optional guardrails. ```bash cp .env.example .env ``` ```bash # OpenAI API Configuration OPENAI_API_KEY=your-openai-api-key-here # Arthur Engine Configuration ARTHUR_BASE_URL=https://your-arthur-instance.com ARTHUR_API_KEY=your-arthur-api-key-key-here ARTHUR_TASK_ID=your-arthur-task-id-here # Guardrails (optional — see "Hallucination Guardrails" section below) ARTHUR_GUARDRAILS_ENABLED=false SIMULATE_HALLUCINATION=false # Logging Configuration (optional) LOG_LEVEL=info ``` -------------------------------- ### Quick Start Prompt for Claude Code Source: https://github.com/arthur-ai/arthur-engine/blob/dev/integrations/claude-code-skills/arthur-onboard/README.md Paste this prompt directly into Claude Code to fetch and save skill markdown files without installation. It also fetches instrumentation examples. ```text For each skill name in this list — arthur-onboard-platform, arthur-onboard-platform-access, arthur-onboard-platform-workspace, arthur-onboard-platform-engine, arthur-onboard-platform-model, arthur-onboard-platform-token, arthur-onboard-analyze, arthur-onboard-instrument, arthur-onboard-prompts, arthur-onboard-verify, arthur-onboard-eval-provider, arthur-onboard-evals, arthur-skills-upgrade — fetch https://raw.githubusercontent.com/arthur-ai/arthur-engine/refs/heads/main/integrations/claude-code-skills/arthur-onboard//SKILL.md and save it to ~/.claude/skills//SKILL.md (create the directory if it doesn't exist). Also fetch https://raw.githubusercontent.com/arthur-ai/arthur-engine/refs/heads/main/integrations/claude-code-skills/arthur-onboard/arthur-onboard-instrument/EXAMPLES.md and save it to ~/.claude/skills/arthur-onboard-instrument/EXAMPLES.md. Once all files are saved, read ~/.claude/skills/arthur-onboard-platform/SKILL.md and follow its instructions. ``` -------------------------------- ### ML Engine Setup and Development Commands Source: https://github.com/arthur-ai/arthur-engine/blob/dev/CLAUDE.md Commands for setting up the ML Engine, including generating and installing the GenAI Engine client, running the ML Engine, and code quality checks. ```bash cd ml-engine # Generate GenAI Engine client cd scripts ./openapi_client_utils.sh generate python ./openapi_client_utils.sh install python ./install_db_dependencies.sh cd .. uv sync ``` ```bash uv run python src/ml_engine/job_agent.py ``` ```bash uv sync --group dev uv run pytest tests/unit ``` ```bash uv run isort src/ml_engine --profile black --check ``` ```bash uv run black --check src/ml_engine ``` ```bash uv run mypy src/ml_engine ``` -------------------------------- ### Install Arthur Platform Skills via Prompt Source: https://github.com/arthur-ai/arthur-engine/blob/dev/integrations/codex-skills/arthur-onboard/README.md Use this prompt in a Codex thread to install the Arthur Platform onboarding skills. It specifies the skill folders, download locations for SKILL.md files, and the instrumentation examples reference. ```text Install the Arthur Platform onboarding Codex skills from arthur-ai/arthur-engine. Install these skill folders into ${CODEX_HOME:-~/.codex}/skills: - arthur-onboard-platform - arthur-onboard-platform-access - arthur-onboard-platform-workspace - arthur-onboard-platform-engine - arthur-onboard-platform-model - arthur-onboard-platform-token - arthur-onboard-analyze - arthur-onboard-instrument - arthur-onboard-prompts - arthur-onboard-verify - arthur-onboard-eval-provider - arthur-onboard-evals Fetch each SKILL.md from: https://raw.githubusercontent.com/arthur-ai/arthur-engine/main/integrations/claude-code-skills/arthur-onboard//SKILL.md Also fetch the instrumentation examples reference: https://raw.githubusercontent.com/arthur-ai/arthur-engine/main/integrations/claude-code-skills/arthur-onboard/arthur-onboard-instrument/EXAMPLES.md Save it to ${CODEX_HOME:-~/.codex}/skills/arthur-onboard-instrument/EXAMPLES.md. Create each directory as needed. After installation, remind me to restart Codex. ``` -------------------------------- ### Install OSS GenAI Engine Skills via Prompt Source: https://github.com/arthur-ai/arthur-engine/blob/dev/integrations/codex-skills/arthur-onboard/README.md Use this prompt in a Codex thread to install the Arthur OSS onboarding skills. It specifies the skill folders, download locations for SKILL.md files, and the instrumentation examples reference. ```text Install the Arthur OSS onboarding Codex skills from arthur-ai/arthur-engine. Install these skill folders into ${CODEX_HOME:-~/.codex}/skills: - arthur-onboard-oss - arthur-onboard-oss-engine - arthur-onboard-task - arthur-onboard-analyze - arthur-onboard-instrument - arthur-onboard-prompts - arthur-onboard-verify - arthur-onboard-eval-provider - arthur-onboard-evals Fetch each SKILL.md from: https://raw.githubusercontent.com/arthur-ai/arthur-engine/main/integrations/claude-code-skills/arthur-onboard//SKILL.md Also fetch the instrumentation examples reference: https://raw.githubusercontent.com/arthur-ai/arthur-engine/main/integrations/claude-code-skills/arthur-onboard/arthur-onboard-instrument/EXAMPLES.md Save it to ${CODEX_HOME:-~/.codex}/skills/arthur-onboard-instrument/EXAMPLES.md. Create each directory as needed. After installation, remind me to restart Codex. ``` -------------------------------- ### Install Arthur Observability SDK Source: https://github.com/arthur-ai/arthur-engine/blob/dev/arthur-observability-sdk/README.md Install the SDK using pip. Install framework-specific extras by including them in square brackets. ```bash pip install arthur-observability-sdk ``` ```bash pip install "arthur-observability-sdk[openai]" pip install "arthur-observability-sdk[langchain]" pip install "arthur-observability-sdk[anthropic]" ``` -------------------------------- ### Create and Render a Tour Source: https://github.com/arthur-ai/arthur-engine/blob/dev/genai-engine/ui/src/features/tour/README.md Defines a tour configuration, initializes the tour engine with a state plugin and navigator, and renders the tour host with example introduction and step components. Use this as a starting point for building custom tours. ```tsx import { BackdropBlocker, PopoverAnchor, Spotlight, TargetTracker, TourHost, TourProvider, applyBackdropAction, createTour, createTourStatePlugin, defineTourConfig, getHighlightPadding, useReactRouterNavigator, useTour, } from "@/features/tour"; const config = defineTourConfig({ id: "example-tour", sections: [ { id: "welcome", introduction: { title: "Welcome", description: "Learn the workflow in a few steps.", primaryActionLabel: "Start", }, steps: [], }, { id: "workspace", title: "Workspace", steps: [ { id: "open-panel", target: { kind: "selector", selector: '[data-tour-id="panel"]' }, content: "Open the panel to continue.", placement: "right", advanceOn: [{ type: "click" }, { type: "action", name: "panel-opened" }], awaitTarget: { timeoutMs: 4000 }, }, ], }, ], }); function ExampleTour() { const navigator = useReactRouterNavigator(); const statePlugin = useMemo(() => createTourStatePlugin({ storageKey: "example-tour" }), []); const engine = useMemo(() => createTour({ config, plugins: [statePlugin] }), [statePlugin]); return ( ); } function ExampleIntro() { const { state, activeSection, actions } = useTour(); if (state.status !== "intro" || !activeSection?.introduction) return null; return ( ); } function ExampleStep() { const { state, config, activeStep, actions } = useTour(); if (state.status !== "step" || !activeStep) return null; const content = typeof activeStep.step.content === "function" ? activeStep.step.content({ tourId: config.id, sectionId: state.sectionId, stepId: state.stepId, index: { sectionIndex: state.sectionIndex, stepIndex: state.stepIndex, globalStepIndex: state.globalStepIndex, totalSteps: state.totalSteps, }, actions, }) : activeStep.step.content; return ( {({ rect }) => ( <> {activeStep.step.overlay?.blockInteraction ? ( applyBackdropAction(activeStep.step.overlay?.onBackdropClick, actions)} /> ) : null}
{content}
)}
); } ``` -------------------------------- ### Initiate Arthur Onboarding OSS Source: https://github.com/arthur-ai/arthur-engine/blob/dev/integrations/claude-code-skills/arthur-onboard/README.md Starts the interactive onboarding process for the Arthur OSS skill within Claude Code CLI. This command guides the user through setup steps, seeking confirmation before code modifications. ```bash /arthur-onboard-oss ``` -------------------------------- ### Install OSS and Platform Skills from Local Checkout Source: https://github.com/arthur-ai/arthur-engine/blob/dev/integrations/codex-skills/arthur-onboard/README.md This bash script installs Arthur onboarding skills from a local repository checkout. It defines skill sets for OSS GenAI Engine and Arthur Platform, copies them to the specified destination, and includes the instrumentation examples reference. ```bash OSS_SKILLS="arthur-onboard-oss arthur-onboard-oss-engine arthur-onboard-task arthur-onboard-analyze arthur-onboard-instrument arthur-onboard-prompts arthur-onboard-verify arthur-onboard-eval-provider arthur-onboard-evals" PLATFORM_SKILLS="arthur-onboard-platform arthur-onboard-platform-access arthur-onboard-platform-workspace arthur-onboard-platform-engine arthur-onboard-platform-model arthur-onboard-platform-token arthur-onboard-analyze arthur-onboard-instrument arthur-onboard-prompts arthur-onboard-verify arthur-onboard-eval-provider arthur-onboard-evals" SKILLS="$OSS_SKILLS" # SKILLS="$PLATFORM_SKILLS" SKILL_DEST="${CODEX_HOME:-$HOME/.codex}/skills" mkdir -p "$SKILL_DEST" for skill in $SKILLS; do rm -rf "$SKILL_DEST/$skill" cp -R "claude-code-skills/arthur-onboard/$skill" "$SKILL_DEST/$skill" done # Also install the instrumentation examples reference cp "claude-code-skills/arthur-onboard/arthur-onboard-instrument/EXAMPLES.md" \ "$SKILL_DEST/arthur-onboard-instrument/EXAMPLES.md" ``` -------------------------------- ### Install Dependencies Source: https://github.com/arthur-ai/arthur-engine/blob/dev/genai-engine/CLAUDE.md Installs project dependencies using uv. ```bash # Install dependencies uv sync ``` -------------------------------- ### Create a Logging Plugin Source: https://github.com/arthur-ai/arthur-engine/blob/dev/genai-engine/ui/src/features/tour/README.md Example of creating a custom tour plugin that logs tour start events. Plugins can install side effects using TourPluginContext, such as registering layers or subscribing to events. ```typescript import type { TourPlugin } from "@/features/tour"; export function createLoggingPlugin(): TourPlugin { return { name: "logging", install: ({ bus, registerLayer }) => { registerLayer("popover", 1300); const onStart = (event: { tourId: string }) => console.info("tour started", event.tourId); bus.on("tour:start", onStart); return () => bus.off("tour:start", onStart); }, }; } ``` -------------------------------- ### Performance Testing Setup Source: https://github.com/arthur-ai/arthur-engine/blob/dev/genai-engine/CLAUDE.md Installs performance testing dependencies and refers to Locust documentation. ```bash # Performance testing (requires separate install) uv sync --group performance # See locust/README.md for details ``` -------------------------------- ### Install arthur-client Source: https://github.com/arthur-ai/arthur-engine/blob/dev/integrations/claude-code-skills/arthur-onboard/arthur-onboard-platform-token/SKILL.md Ensures the arthur-client library is installed. Run this before attempting to refresh the token. ```bash python3 -c "import arthur_client" 2>/dev/null || pip install arthur-client -q ``` -------------------------------- ### Install Development Dependencies Source: https://github.com/arthur-ai/arthur-engine/blob/dev/CONTRIBUTING.md Installs the necessary development packages for the project using uv. ```shell uv sync --group dev ``` -------------------------------- ### Install Dependencies Source: https://github.com/arthur-ai/arthur-engine/blob/dev/genai-engine/locust/README.md Install project dependencies using pip from requirements.txt. ```bash pip install -r requirements.txt ``` -------------------------------- ### Start GenAI Engine Services Source: https://github.com/arthur-ai/arthur-engine/blob/dev/VAGRANT_README.md Navigates to the genai-engine directory, starts the database using Docker Compose, and then launches the local server script. ```bash cd genai-engine docker-compose up -d db ./scripts/start_local_server.sh ``` -------------------------------- ### OpenInference Instrumentation Setup Source: https://github.com/arthur-ai/arthur-engine/blob/dev/integrations/claude-code-skills/arthur-onboard/arthur-onboard-instrument/SKILL.md Configure OpenInference instrumentation in your Python application's entry point. Ensure you have the necessary openinference-instrumentation packages installed. ```python from opentelemetry import trace from opentelemetry.sdk.trace import TracerProvider from opentelemetry.sdk.trace.export import BatchSpanProcessor from opentelemetry.exporter.otlp.proto.http.trace_exporter import OTLPSpanExporter from openinference.instrumentation. import Instrumentor from openinference.instrumentation import using_attributes # using_session, using_user also available from openinference.semconv.trace import SpanAttributes, OpenInferenceSpanKindValues import os, json, uuid provider = TracerProvider() exporter = OTLPSpanExporter( endpoint=f"{os.environ.get('ARTHUR_BASE_URL', '')}/api/v1/traces", headers={"Authorization": f"Bearer {os.environ.get('ARTHUR_API_KEY', '')}"}, ) provider.add_span_processor(BatchSpanProcessor(exporter)) trace.set_tracer_provider(provider) Instrumentor().instrument() tracer = trace.get_tracer(__name__) ``` -------------------------------- ### Start Development Server Source: https://github.com/arthur-ai/arthur-engine/blob/dev/genai-engine/examples/agents/image-analysis-agent/README.md Start the development server for the image analysis agent. This command is used to run the agent locally during development. ```bash yarn dev ``` -------------------------------- ### Install Database Dependencies Source: https://github.com/arthur-ai/arthur-engine/blob/dev/ml-engine/CLAUDE.md Installs necessary database dependencies such as ODBC and Oracle drivers. ```bash ./install_db_dependencies.sh ``` -------------------------------- ### Install Arthur Onboarding Skills Source: https://github.com/arthur-ai/arthur-engine/blob/dev/integrations/claude-code-skills/arthur-onboard/README.md Automates the installation of various Arthur AI Engine onboarding skills into the .claude/skills directory. It iterates through a list of skills, downloads their SKILL.md files, and stages them for commit. ```bash BASE="https://raw.githubusercontent.com/arthur-ai/arthur-engine/main/integrations/claude-code-skills/arthur-onboard" for skill in arthur-onboard-oss arthur-onboard-oss-engine arthur-onboard-task arthur-onboard-analyze \ arthur-onboard-instrument arthur-onboard-prompts arthur-onboard-verify \ arthur-onboard-eval-provider arthur-onboard-evals arthur-skills-upgrade; do mkdir -p .claude/skills/$skill curl -sSLf "$BASE/$skill/SKILL.md" > .claude/skills/$skill/SKILL.md \ || { echo "FAILED: $skill"; rm -f .claude/skills/$skill/SKILL.md; } done # Also install the instrumentation examples reference curl -sSLf "$BASE/arthur-onboard-instrument/EXAMPLES.md" > .claude/skills/arthur-onboard-instrument/EXAMPLES.md \ || { echo "FAILED: arthur-onboard-instrument/EXAMPLES.md"; rm -f .claude/skills/arthur-onboard-instrument/EXAMPLES.md; } git add .claude/skills/arthur-onboard*/ git commit -m "Add Arthur GenAI Engine onboarding skills" ``` -------------------------------- ### Install uv Source: https://github.com/arthur-ai/arthur-engine/blob/dev/genai-engine/README.md Installs the 'uv' Python dependency management tool. This is the first step in managing project dependencies. ```bash pip install uv ``` -------------------------------- ### Install Dependencies Source: https://github.com/arthur-ai/arthur-engine/blob/dev/genai-engine/examples/agents/mastra-translator-agent/README.md Installs project dependencies using npm. Ensure Node.js v20.6 or later is installed. ```bash npm install ``` -------------------------------- ### Quick Start Docker Compose Up Command Source: https://github.com/arthur-ai/arthur-engine/blob/dev/deployment/docker-compose/genai-engine/README.md This command starts the Arthur GenAI Engine services using Docker Compose. Ensure your .env file is configured before running. ```bash export GENAI_ENGINE_VERSION= docker compose up ``` -------------------------------- ### Install Skills from a Specific Branch or Tag Source: https://github.com/arthur-ai/arthur-engine/blob/dev/integrations/codex-skills/arthur-onboard/README.md Add this line to either installation prompt to use a specific Git branch or tag instead of 'main'. ```text Use ref instead of main. ``` -------------------------------- ### Generate and Install Python API Client Source: https://github.com/arthur-ai/arthur-engine/blob/dev/arthur-observability-sdk/CLAUDE.md Generates the Python API client from OpenAPI specifications and installs it. Requires Node.js and Java. ```bash ./scripts/generate_openapi_client.sh generate python ./scripts/generate_openapi_client.sh install python ``` -------------------------------- ### Generate and Install GenAI Engine Client Source: https://github.com/arthur-ai/arthur-engine/blob/dev/ml-engine/CLAUDE.md Generates and installs the Python client for the GenAI Engine using openapi_client_utils.sh. ```bash cd scripts ./openapi_client_utils.sh generate python ./openapi_client_utils.sh install python ``` -------------------------------- ### Install Locust for Performance Tests Source: https://github.com/arthur-ai/arthur-engine/blob/dev/genai-engine/README.md Install Locust, a performance testing tool, using the provided command. This is a prerequisite for running performance tests. ```bash uv sync --group performance ``` -------------------------------- ### Quick Start Docker Compose Up Command (Windows PowerShell) Source: https://github.com/arthur-ai/arthur-engine/blob/dev/deployment/docker-compose/genai-engine/README.md This command starts the Arthur GenAI Engine services using Docker Compose on Windows with PowerShell. Ensure your .env file is configured before running. ```powershell $env:GENAI_ENGINE_VERSION = "" docker compose up ``` -------------------------------- ### Install Git Pre-commit Hooks Source: https://github.com/arthur-ai/arthur-engine/blob/dev/CONTRIBUTING.md Installs the git pre-commit hooks to ensure code quality and consistency before commits. ```shell uv run pre-commit install ``` -------------------------------- ### Codex Skill Installation Instructions Source: https://github.com/arthur-ai/arthur-engine/blob/dev/README.md Instructions for Codex users to install Arthur Platform onboarding skills. This involves copying skill folders and fetching markdown files. ```shell Install these skill folders into ${CODEX_HOME:-~/.codex}/skills: - arthur-onboard-platform - arthur-onboard-platform-access - arthur-onboard-platform-workspace - arthur-onboard-platform-engine - arthur-onboard-platform-model - arthur-onboard-platform-token - arthur-onboard-analyze - arthur-onboard-instrument - arthur-onboard-prompts - arthur-onboard-verify - arthur-onboard-eval-provider - arthur-onboard-evals Fetch each SKILL.md from: https://raw.githubusercontent.com/arthur-ai/arthur-engine/main/integrations/claude-code-skills/arthur-onboard//SKILL.md Create each directory as needed. After installation, remind me to restart Codex. ``` -------------------------------- ### Install OpenInference Packages (npm) Source: https://github.com/arthur-ai/arthur-engine/blob/dev/integrations/claude-code-skills/arthur-onboard/arthur-onboard-instrument/SKILL.md Install the necessary OpenInference and OpenTelemetry packages for Node.js applications using npm. This includes the core SDKs and framework-specific auto-instrumentors. ```bash npm install \ @opentelemetry/sdk-trace-node \ @opentelemetry/exporter-trace-otlp-proto \ @opentelemetry/sdk-trace-base \ @opentelemetry/resources \ @opentelemetry/semantic-conventions \ @arizeai/openinference-semantic-conventions # Framework auto-instrumentors (install the one that matches): @arizeai/openinference-instrumentation-openai @arizeai/openinference-instrumentation-langchain @arizeai/openinference-instrumentation-anthropic @arizeai/openinference-instrumentation-llama-index ``` -------------------------------- ### Set Up Environment Variables Source: https://github.com/arthur-ai/arthur-engine/blob/dev/genai-engine/examples/agents/image-analysis-agent/README.md Copy the example .env file to create your own configuration file. This is the first step in setting up your agent's environment variables. ```bash cp .env.example .env ``` -------------------------------- ### Run Development Server Source: https://github.com/arthur-ai/arthur-engine/blob/dev/genai-engine/CLAUDE.md Starts the development server using uv or uvicorn. ```bash # Run development server uv run serve # or: uvicorn src.server:get_app --reload ``` -------------------------------- ### Onboarding Completion Summary Example Source: https://github.com/arthur-ai/arthur-engine/blob/dev/integrations/claude-code-skills/arthur-onboard/arthur-onboard-platform/SKILL.md A sample completion summary displayed after the onboarding process is finished. It includes key platform and engine details and suggests next steps for monitoring the application. ```text Onboarding complete! Arthur Platform: Workspace: () Engine: Engine URL: Model: Task: Continuous evals: monitoring your application Next: Run your application with the Arthur env vars set to start seeing traces and eval scores in the Arthur Platform UI at . ``` -------------------------------- ### Example Audit Log for Getting a Task by ID (GET) Source: https://github.com/arthur-ai/arthur-engine/blob/dev/genai-engine/docs/audit-logging.md This JSON object illustrates an audit log entry for a successful GET request to retrieve a specific task. It shows the extracted path parameter for the task ID and the ID of the retrieved task. ```json { "id": "98b08ced-81a1-4b01-b3e3-10892e8dcc0d", "user_id": "950e225a-b8aa-4546-95d2-d90ec81547c1", "timestamp": "2026-04-27T20:02:53.903564Z", "request_method": "get", "request_path": "/api/v2/tasks/d4b3a415-5cb0-4f2f-bf31-c5eadf1faced", "path_params": [ { "param_name": "task_id", "param_value": "d4b3a415-5cb0-4f2f-bf31-c5eadf1faced" } ], "response_ids": [ { "response_type": "TaskResponse", "id_field": "id", "response_id": "d4b3a415-5cb0-4f2f-bf31-c5eadf1faced" } ], "status_code": 200, "audit_log_meta_version": "ArthurAuditLogEventV1" } ``` -------------------------------- ### Capture Installation Timestamp Source: https://github.com/arthur-ai/arthur-engine/blob/dev/integrations/claude-code-skills/arthur-onboard/arthur-onboard-oss-engine/SKILL.md Records the current UTC date and time before starting the Arthur GenAI Engine installer. This timestamp is used later to filter and display relevant startup logs. ```bash date -u "+%Y-%m-%dT%H:%M:%SZ" ``` -------------------------------- ### Bootstrap Arthur Skills Upgrade Source: https://github.com/arthur-ai/arthur-engine/blob/dev/integrations/claude-code-skills/arthur-onboard/README.md Installs the `arthur-skills-upgrade` skill manually using a curl command. This is a one-time setup for users who installed skills before versioning was introduced, enabling the `/arthur-skills-upgrade` command. ```bash BASE="https://raw.githubusercontent.com/arthur-ai/arthur-engine/main/integrations/claude-code-skills/arthur-onboard" mkdir -p ~/.claude/skills/arthur-skills-upgrade curl -sSLf "$BASE/arthur-skills-upgrade/SKILL.md" > ~/.claude/skills/arthur-skills-upgrade/SKILL.md \ || { echo "FAILED: arthur-skills-upgrade"; rm -f ~/.claude/skills/arthur-skills-upgrade/SKILL.md; } ``` -------------------------------- ### ML Engine Development Workflow Source: https://github.com/arthur-ai/arthur-engine/blob/dev/CLAUDE.md Steps for setting up and running the ML engine, including generating and installing the OpenAPI client, synchronizing dependencies, setting environment variables, and running unit tests and type checks. ```bash cd ml-engine # Generate GenAI client cd scripts ./openapi_client_utils.sh generate python ./openapi_client_utils.sh install python cd .. uv sync --group dev --group linters # Set environment variables export ARTHUR_API_HOST=https://platform.arthur.ai export ARTHUR_CLIENT_SECRET= export ARTHUR_CLIENT_ID= # Run uv run python src/ml_engine/job_agent.py # Before committing uv run pytest tests/unit uv run mypy src/ml_engine uv run black --check src/ml_engine ``` -------------------------------- ### Generate Changelog from Container Source: https://github.com/arthur-ai/arthur-engine/blob/dev/genai-engine/README.md If you cannot install torch locally, use this command to start a containerized changelog generator from the genai-engine directory. ```bash docker compose up -d changelog-generator ``` -------------------------------- ### Preview Production Build Source: https://github.com/arthur-ai/arthur-engine/blob/dev/genai-engine/ui/README.md Previews the production build locally. ```bash yarn preview ``` -------------------------------- ### Quick Start: Initialize and Instrument OpenAI Source: https://github.com/arthur-ai/arthur-engine/blob/dev/arthur-observability-sdk/README.md Initialize the Arthur SDK with your API key and task ID, then instrument the OpenAI client. Use the attributes context manager to tag spans with session and user IDs. ```python from arthur_observability_sdk import Arthur arthur = Arthur( api_key="your-api-key", # or set ARTHUR_API_KEY env var task_id="", service_name="my-app", ) arthur.instrument_openai() # Tag all spans in this block with session and user with arthur.attributes(session_id="sess-1", user_id="user-42"): response = openai_client.chat.completions.create(...) arthur.shutdown() ``` -------------------------------- ### Clone and Navigate to Repository Source: https://github.com/arthur-ai/arthur-engine/blob/dev/integrations/claude-code-skills/arthur-onboard/EXAMPLE.md Clone the agents-from-scratch repository and change the directory to the cloned repository. ```bash git clone https://github.com/langchain-ai/agents-from-scratch cd agents-from-scratch ``` -------------------------------- ### Run GenAI Engine Server via Terminal Source: https://github.com/arthur-ai/arthur-engine/blob/dev/genai-engine/README.md Command to start the GenAI Engine server after setting up the environment variables. Ensure Python dependencies are installed with uv. ```bash export PYTHONPATH="src:$PYTHONPATH" uv run serve ``` -------------------------------- ### List Transforms API Endpoint Source: https://github.com/arthur-ai/arthur-engine/blob/dev/genai-engine/technical_documentation/dataset_transforms/simplified_transforms_design.md HTTP GET request example to list all transforms associated with a specific dataset. The response includes details for each transform, such as ID, name, description, and definition. ```http # List all transforms for a dataset GET /api/v2/datasets/{dataset_id}/transforms Response: { "transforms": [ { "id": "uuid-1", "dataset_id": "dataset-uuid", "name": "Extract SQL Queries", "description": "Extracts SQL queries and trace metadata", "definition": { "version": "1.0", "columns": [...] }, "created_at": "2025-11-15T10:00:00Z", "updated_at": "2025-11-15T10:00:00Z" } ] } ``` -------------------------------- ### Add New Span Query Endpoint Source: https://github.com/arthur-ai/arthur-engine/blob/dev/genai-engine/technical_documentation/span_query_endpoint_scope_doc.md Defines the GET /spans/query endpoint to retrieve spans filtered by type, with support for pagination and various query parameters. It requires task IDs and optionally accepts span types, start time, and end time. ```python from datetime import datetime from typing import Annotated from fastapi import Depends, Query from sqlalchemy.orm import Session from app.core.dependencies import common_pagination_parameters, get_db_session from app.core.security import multi_validator from app.models.user import User from app.schemas.response_schemas import QuerySpansResponse from app.services.permission_service import PermissionLevelsEnum, permission_checker from openinference.semconv.trace import OpenInferenceSpanKindValues from app.schemas.pagination import PaginationParameters from src.routers.v1.span_routes import span_routes @span_routes.get( "/spans/query", description="Query spans filtered by span type. Task IDs are required. Returns spans with any existing metrics but does not compute new ones.", response_model=QuerySpansResponse, response_model_exclude_none=True, tags=["Spans"], responses={ 400: {"description": "Invalid span types or parameters"}, 404: {"description": "No spans found"}, 422: {"description": "Validation error"}, } ) @permission_checker(permissions=PermissionLevelsEnum.INFERENCE_READ.value) def query_spans_by_type( pagination_parameters: Annotated[ PaginationParameters, Depends(common_pagination_parameters), ], task_ids: list[str] = Query( ..., description="Task IDs to filter on. At least one is required.", min_length=1, ), span_types: list[str] = Query( None, description=f"Span types to filter on. Optional. Valid values: {', '.join(sorted([kind.value for kind in OpenInferenceSpanKindValues]))}", ), start_time: datetime = Query( None, description="Inclusive start date in ISO8601 string format.", ), end_time: datetime = Query( None, description="Exclusive end date in ISO8601 string format.", ), db_session: Session = Depends(get_db_session), current_user: User | None = Depends(multi_validator.validate_api_multi_auth), ): pass ``` -------------------------------- ### Local Install Bash Script (Windows) Source: https://github.com/arthur-ai/arthur-engine/blob/dev/integrations/claude-code-skills/arthur-onboard/arthur-onboard-oss-engine/SKILL.md This script is designed for Windows environments using WSL. It fetches Docker logs and checks the engine's API status, similar to the Linux version. The 'NEXT_LOG_SINCE' output should be used for subsequent calls. Initialize '' with 'PRE_INSTALL_TIME'. ```bash COMPOSE_FILE=$(wslpath "$USERPROFILE/.arthur-engine/local-stack/genai-engine/docker-compose.yml" \ 2>/dev/null || echo "$USERPROFILE/.arthur-engine/local-stack/genai-engine/docker-compose.yml") sleep 10 if [ -f "$COMPOSE_FILE" ]; then docker compose -f "$COMPOSE_FILE" logs --no-color --since="" 2>&1 || true fi echo "NEXT_LOG_SINCE=$(date -u '+%Y-%m-%dT%H:%M:%SZ')" STATUS=$(curl -s -o /dev/null -w "%{{http_code}}" \ "http://localhost:3030/api/v2/tasks?page=0&page_size=1" 2>/dev/null || echo "000") echo "ENGINE_STATUS=$STATUS" ``` -------------------------------- ### Install Arthur Engine on Windows using PowerShell Source: https://github.com/arthur-ai/arthur-engine/blob/dev/integrations/claude-code-skills/arthur-onboard/arthur-onboard-platform-engine/SKILL.md Installs the Arthur Engine on Windows by downloading and executing the installer script. It retrieves the data plane secret from a file and passes it as a parameter. ```powershell $DP_SECRET = Get-Content -Path "$env:USERPROFILE\.ae_dp_secret" -Raw Remove-Item -Path "$env:USERPROFILE\.ae_dp_secret" -Force & ([scriptblock]::Create((Invoke-WebRequest "https://engine.arthur.ai/win" -UseBasicParsing).Content)) ` --arthur-client-id="" ` --arthur-client-secret="$DP_SECRET" ` --arthur-api-host="" ` --fetch-raw-data-enabled=true ` --default-genai-config=false ``` -------------------------------- ### Setup New Task for Customer Support Agent Source: https://github.com/arthur-ai/arthur-engine/blob/dev/genai-engine/examples/agents/customer-support-agent/README.md Creates a new task for the customer support agent with a specified name. This includes setting up prompts, LLM evaluations, transforms, and test datasets. ```bash yarn setup:new-task "Demo Customer Support Agent" ``` -------------------------------- ### Install Arthur Onboard Skills from GitHub Source: https://github.com/arthur-ai/arthur-engine/blob/dev/integrations/codex-skills/arthur-onboard/README.md Installs specified OSS or Platform skills from the Arthur Engine GitHub repository. Ensure ARTHUR_ENGINE_REF is set for specific branches/tags. Restarts Codex after installation. ```bash OSS_SKILLS="arthur-onboard-oss arthur-onboard-oss-engine arthur-onboard-task arthur-onboard-analyze arthur-onboard-instrument arthur-onboard-prompts arthur-onboard-verify arthur-onboard-eval-provider arthur-onboard-evals" PLATFORM_SKILLS="arthur-onboard-platform arthur-onboard-platform-access arthur-onboard-platform-workspace arthur-onboard-platform-engine arthur-onboard-platform-model arthur-onboard-platform-token arthur-onboard-analyze arthur-onboard-instrument arthur-onboard-prompts arthur-onboard-verify arthur-onboard-eval-provider arthur-onboard-evals" SKILLS="$OSS_SKILLS" # SKILLS="$PLATFORM_SKILLS" ARTHUR_ENGINE_REF="${ARTHUR_ENGINE_REF:-main}" BASE="https://raw.githubusercontent.com/arthur-ai/arthur-engine/$ARTHUR_ENGINE_REF/integrations/claude-code-skills/arthur-onboard" SKILL_DEST="${CODEX_HOME:-$HOME/.codex}/skills" for skill in $SKILLS; do mkdir -p "$SKILL_DEST/$skill" curl -sSLf "$BASE/$skill/SKILL.md" > "$SKILL_DEST/$skill/SKILL.md" \ || { echo "FAILED: $skill"; rm -f "$SKILL_DEST/$skill/SKILL.md"; } done # Also install the instrumentation examples reference curl -sSLf "$BASE/arthur-onboard-instrument/EXAMPLES.md" > "$SKILL_DEST/arthur-onboard-instrument/EXAMPLES.md" \ || { echo "FAILED: arthur-onboard-instrument/EXAMPLES.md"; rm -f "$SKILL_DEST/arthur-onboard-instrument/EXAMPLES.md"; } ``` -------------------------------- ### Install Arthur Exporter Source: https://github.com/arthur-ai/arthur-engine/blob/dev/integrations/claude-code-skills/arthur-onboard/arthur-onboard-instrument/SKILL.md Install the @mastra/arthur package using npm, yarn, or pnpm. ```bash npm install @mastra/arthur # or yarn add / pnpm add ``` -------------------------------- ### Initialize MCP Session and Cache Tools Source: https://github.com/arthur-ai/arthur-engine/blob/dev/integrations/claude-code-skills/arthur-onboard/arthur-onboard-instrument/EXAMPLES.md Connects to the MCP server, establishes a session, and retrieves tool definitions. This function should be called once at application startup. ```python async def init_mcp() -> None: """Connect to the MCP server and cache the tool list. Called once at startup.""" global _mcp_session, _mcp_tools server_params = StdioServerParameters( command=os.environ["MCP_SERVER_COMMAND"], # e.g. "npx" args=os.environ["MCP_SERVER_ARGS"].split(), # e.g. "-y @modelcontextprotocol/server-filesystem /tmp" ) # AsyncExitStack holds both context managers open for the process lifetime # and calls __aexit__ on each during shutdown (see finally in main() below) read, write = await _exit_stack.enter_async_context(stdio_client(server_params)) _mcp_session = await _exit_stack.enter_async_context(ClientSession(read, write)) await _mcp_session.initialize() tools_result = await _mcp_session.list_tools() _mcp_tools = [ { "type": "function", "name": t.name, "description": t.description or "", "parameters": t.inputSchema, } for t in tools_result.tools ] print(f"MCP ready: {[t['name'] for t in _mcp_tools]}") ``` -------------------------------- ### Initialize Direct API Client (Before) Source: https://github.com/arthur-ai/arthur-engine/blob/dev/genai-engine/ui/src/lib/API_README.md This snippet shows the older method of directly instantiating the API client with configuration. ```typescript import { Api } from "@/lib/api-client/api-client"; const api = new Api({ baseURL: "http://localhost:8000", securityWorker: (token) => (token ? { headers: { Authorization: `Bearer ${token}` } } : {}), }); ``` -------------------------------- ### Local Install Bash Script (Mac/Linux) Source: https://github.com/arthur-ai/arthur-engine/blob/dev/integrations/claude-code-skills/arthur-onboard/arthur-onboard-oss-engine/SKILL.md This script fetches Docker logs since a specified timestamp and checks the engine's API status. Use the output 'NEXT_LOG_SINCE' as the '--since' argument for subsequent calls. Replace '' with 'PRE_INSTALL_TIME' initially. ```bash COMPOSE_DIR="$HOME/.arthur-engine/local-stack/genai-engine" sleep 10 if [ -f "$COMPOSE_DIR/docker-compose.yml" ]; then docker compose -f "$COMPOSE_DIR/docker-compose.yml" logs --no-color \ --since="" 2>&1 || true fi echo "NEXT_LOG_SINCE=$(date -u '+%Y-%m-%dT%H:%M:%SZ')" STATUS=$(curl -s -o /dev/null -w "%{{http_code}}" \ "http://localhost:3030/api/v2/tasks?page=0&page_size=1" 2>/dev/null || echo "000") echo "ENGINE_STATUS=$STATUS" ``` -------------------------------- ### Global Install Script for Claude Code Tracer Source: https://github.com/arthur-ai/arthur-engine/blob/dev/integrations/claude-code-observability/README.md Installs the Claude Code tracer globally to monitor all sessions. It installs dependencies, copies the tracer, registers hooks, and writes configuration from environment variables. ```bash cd integrations/claude-code-observability # Optional but recommended: add credentials so the installer writes the config for you cp .env.example .env # or create .env manually (see below) ./install.sh ``` -------------------------------- ### MCP Server Configuration for Filesystem Source: https://github.com/arthur-ai/arthur-engine/blob/dev/integrations/claude-code-skills/arthur-onboard/arthur-onboard-instrument/EXAMPLES.md Example `.env` entries for configuring an MCP server to handle filesystem operations. Specifies the command, arguments, and server name. ```dotenv MCP_SERVER_COMMAND=npx MCP_SERVER_ARGS=-y @modelcontextprotocol/server-filesystem /tmp MCP_SERVER_NAME=filesystem ``` -------------------------------- ### Install Codex Skills for Arthur Engine Source: https://github.com/arthur-ai/arthur-engine/blob/dev/README.md Paste this prompt into a Codex session to install Arthur Engine onboarding Codex skills. It specifies skill folders to install and fetches SKILL.md files from GitHub. ```text Install the Arthur OSS onboarding Codex skills from arthur-ai/arthur-engine. Install these skill folders into ${CODEX_HOME:-~/.codex}/skills: - arthur-onboard-oss - arthur-onboard-oss-engine - arthur-onboard-task - arthur-onboard-analyze - arthur-onboard-instrument - arthur-onboard-prompts - arthur-onboard-verify - arthur-onboard-eval-provider - arthur-onboard-evals Fetch each SKILL.md from: https://raw.githubusercontent.com/arthur-ai/arthur-engine/main/integrations/claude-code-skills/arthur-onboard//SKILL.md Create each directory as needed. After installation, remind me to restart Codex. ``` -------------------------------- ### Install Arthur Engine on macOS Source: https://github.com/arthur-ai/arthur-engine/blob/dev/README.md Run this command in your terminal to install the Arthur Engine on a macOS system. ```bash bash <(curl -sSL https://get-genai-engine.arthur.ai/mac) ``` -------------------------------- ### Deploy Arthur AI Wrapper Locally Source: https://github.com/arthur-ai/arthur-engine/blob/dev/docs/integrations/truefoundry.md Set up a local Python virtual environment and install development dependencies. Run the Uvicorn server to serve the application locally for testing. ```bash python3 -m venv .venv .venv/bin/pip install -r requirements-dev.txt .venv/bin/uvicorn main:app --reload --port 8000 ``` -------------------------------- ### Build for Production Source: https://github.com/arthur-ai/arthur-engine/blob/dev/genai-engine/ui/README.md Builds the application for production. The output will be placed in the dist/ directory. ```bash yarn build ``` -------------------------------- ### Install Arthur Engine on Windows Source: https://github.com/arthur-ai/arthur-engine/blob/dev/README.md Run this command in your PowerShell terminal to install the Arthur Engine on a Windows system. ```powershell iex (iwr -Uri "https://get-genai-engine.arthur.ai/win" -UseBasicParsing).Content ``` -------------------------------- ### Example Section File Structure Source: https://github.com/arthur-ai/arthur-engine/blob/dev/genai-engine/ui/src/features/task-tour/content/README.md Illustrates the frontmatter and body structure for a tour section file, including supported fields and markdown usage. ```markdown --- id: evals # never change this without engineering title: Look at evals # tab label / progress headline kicker: Section 3 of 7 # small overline above the section heading intro: heading: Measure before you change # big modal heading cta: Open Evaluate # primary button label in the modal showFlywheel: false # set to true for the ADLC flywheel diagram hero: # optional banner illustration src: ./assets/evals-banner.png alt: Screenshot of the Evaluate page width: 480 # optional, in pixels scenario: # optional "what you'll do" callout label: What you'll do steps: - id: open-evaluate # must match a "## step: open-evaluate" below title: Open Evaluate # appears in the floating checklist - id: review-evaluator title: Review an evaluator --- ## intro Long-form prose that appears in the section's welcome modal. Supports **bold**, _italic_, [links](https://docs.arthur.ai), inline `code`, lists, and images. ## scenario Required only when `intro.scenario.label` is set above. This text appears in the dashed callout box at the bottom of the modal. ## step: open-evaluate Instructions for the first step. Marketing controls this prose; engineering controls which UI element the spotlight points at (see wiring.ts). ## step: review-evaluator Instructions for the second step. Each `## step: ` heading must match a step entry in the frontmatter above and an entry in wiring.ts. ``` -------------------------------- ### Run Locust UI Source: https://github.com/arthur-ai/arthur-engine/blob/dev/genai-engine/locust/README.md Start the Locust performance testing tool in UI mode. ```bash locust ```