### Start OGX Server Source: https://github.com/ogx-ai/ogx/blob/main/docs/docs/building_applications/rag.mdx Installs dependencies and starts the OGX server. Run this in one terminal. ```bash ogx list-deps starter | xargs -L1 uv pip install ogx run starter ``` -------------------------------- ### Setup Benchmark Environment Source: https://github.com/ogx-ai/ogx/blob/main/docs/docs/building_applications/rag_benchmarks.mdx Initializes a virtual environment, installs dependencies, and configures environment variables for running benchmarks. ```bash cd benchmarking/rag uv venv && source .venv/bin/activate uv pip install -r requirements.txt # Copy and configure environment cp .env.example .env # Edit .env with your OPENAI_API_KEY ``` -------------------------------- ### Install Project Dependencies Source: https://github.com/ogx-ai/ogx/blob/main/src/ogx_ui/README.md Run this command to install all necessary project dependencies before starting development. ```bash npm install ``` -------------------------------- ### Run OGX Starter Source: https://github.com/ogx-ai/ogx/blob/main/docs/blog/2026-05-12-ogx-v1.md Quickly start an OGX instance with starter configurations. This command is used to get a local development environment running. ```bash uvx --from 'ogx[starter]' ogx run starter ``` -------------------------------- ### Install ogx-open-client Source: https://github.com/ogx-ai/ogx/blob/main/client-sdks/openapi/USAGE_EXAMPLES.md Install the SDK from PyPI, TestPyPI, or from source for local development. ```bash # From PyPI (once published) pip install ogx-open-client # From TestPyPI (for testing) pip install --index-url https://test.pypi.org/simple/ ogx-open-client # From source (local development) cd client-sdks/openapi make sdk OPEN=1 cd sdks/python pip install -e . ``` -------------------------------- ### Start the OGX Server Source: https://github.com/ogx-ai/ogx/blob/main/docs/docs/index.mdx Run this command in your terminal to start the OGX server after installation. Ensure any necessary configurations are in place. ```bash # Start the server ogx stack run ``` -------------------------------- ### Install and Run OGX Server Dependencies Source: https://github.com/ogx-ai/ogx/blob/main/docs/getting_started_ogx_api.ipynb Installs all required dependencies for the Llama stack server using 'uv' and then starts the Llama API server. Ensure you have 'uv' installed first. ```python import os import subprocess import time !pip install uv !uv pip install requests if "UV_SYSTEM_PYTHON" in os.environ: del os.environ["UV_SYSTEM_PYTHON"] # this command installs all the dependencies needed for the llama stack server !uv run --with ogx llama stack list-deps llama_api | xargs -L1 uv pip install !uv run --with ogx llama stack run llama_api ``` -------------------------------- ### Install and Run OGX Server Source: https://github.com/ogx-ai/ogx/blob/main/README.md Installs the OGX server using a curl script and starts the server with the starter distribution, which includes Ollama. ```bash # One-line install curl -LsSf https://github.com/ogx-ai/ogx/raw/main/scripts/install.sh | bash ``` ```bash # Or install via uv uv pip install ogx[starter] ``` ```bash # Start the server (uses the starter distribution with Ollama) uv run ogx run starter ``` -------------------------------- ### Local Development Setup with OGX and Ollama Source: https://github.com/ogx-ai/ogx/blob/main/docs/blog/2026-03-20-open-responses-openai-compatibility.md Provides bash commands to set up a local development environment, including installing OGX, configuring dependencies, and running Ollama with a model. ```bash # Set up your environment uv venv --python 3.12 --seed source .venv/bin/activate uv pip install -U ogx uv run ogx list-deps starter | xargs -L1 uv pip install # Start Ollama and pull a model ollama serve ollama run gpt-oss:20b # Launch OGX with the starter distribution OLLAMA_URL=http://localhost:11434/v1 uv run ogx run starter ``` -------------------------------- ### Run OGX UI from Source for Development Source: https://github.com/ogx-ai/ogx/blob/main/docs/docs/distributions/ogx_ui.mdx Set up and run the OGX UI from its source code for development purposes. This includes installing dependencies, setting environment variables, and starting the development server. ```bash # From the project root cd src/ogx_ui # Install dependencies npm install # Set environment variables export OGX_BACKEND_URL=http://localhost:8321 # Start the development server npm run dev ``` -------------------------------- ### Install and Configure API (Bash) Source: https://github.com/ogx-ai/ogx/blob/main/docs/docs/concepts/apis/external.mdx Install the external API package using `uv pip install -e .` and configure the OGX run configuration to include the API. ```bash uv pip install -e . ``` -------------------------------- ### Install Dependencies Source: https://github.com/ogx-ai/ogx/blob/main/benchmarking/rag/README.md Sets up a virtual environment and installs necessary Python packages from the requirements file. ```bash cd benchmarking/rag # Create a virtual environment and install dependencies uv venv && source .venv/bin/activate uv pip install -r requirements.txt # Copy and edit the environment file cp .env.example .env # Edit .env with your OPENAI_API_KEY ``` -------------------------------- ### Install OGX Dependencies Source: https://github.com/ogx-ai/ogx/blob/main/docs/zero_to_hero_guide/README.md Installs necessary dependencies for the OGX starter project using uv and pip. ```bash ogx list-deps starter | xargs -L1 uv pip install ``` -------------------------------- ### Install OGX and Client Packages Source: https://github.com/ogx-ai/ogx/blob/main/docs/getting_started.ipynb Installs the necessary `ogx` and `ogx-client` Python packages using `uv`. It also installs dependencies for the starter distribution. ```python !pip install uv !uv pip install ogx ogx-client # Installs dependencies for the starter distribution !uv run --with ogx llama stack list-deps starter | xargs -L1 uv pip install ``` -------------------------------- ### Install OGX CLI Source: https://github.com/ogx-ai/ogx/blob/main/docs/docs/references/ogx_cli_reference/index.md Install the OGX package from PyPI. This is the recommended method for most users. ```bash pip install ogx ``` -------------------------------- ### Install ogx-client from PyPI Source: https://github.com/ogx-ai/ogx/blob/main/client-sdks/openapi/README.md Install the ogx-client package from the official PyPI repository after successful production release. ```bash pip install ogx-client ``` -------------------------------- ### Project Setup for OGX Source: https://github.com/ogx-ai/ogx/blob/main/docs/docs/getting_started/quickstart.mdx Initialize a new project, add OGX and OpenAI dependencies, set the Ollama URL, and run the starter. ```bash uv init my-ai-app && cd my-ai-app uv add 'ogx[starter]' openai export OLLAMA_URL=http://localhost:11434/v1 uv run ogx run starter ``` -------------------------------- ### Install Sqlite-Vec Source: https://github.com/ogx-ai/ogx/blob/main/docs/docs/providers/vector_io/inline_sqlite-vec.mdx Install the sqlite-vec package using pip. This is the initial setup step required to use the provider. ```bash pip install sqlite-vec ``` -------------------------------- ### Start OGX Server with Different Providers Source: https://github.com/ogx-ai/ogx/blob/main/docs/docs/building_applications/claude_code_integration.mdx Use the `ogx run starter` command to launch your OGX server. Set the appropriate environment variables based on your chosen provider, such as OpenAI API key, vLLM URL, or Ollama URL. ```bash export OPENAI_API_KEY="your-key-here" ogx run starter ``` ```bash export VLLM_URL="http://localhost:8000/v1" ogx run starter ``` ```bash export OLLAMA_URL="http://localhost:11434/v1" ogx run starter ``` -------------------------------- ### Start OGX Starter Distribution with vLLM Source: https://github.com/ogx-ai/ogx/blob/main/docs/blog/2026-06-30-codex-ogx-cli.md Run the OGX starter distribution pointed at a vLLM server. This enables the vLLM provider when VLLM_URL is set. ```bash export VLLM_URL="http://localhost:8000/v1" export VLLM_API_TOKEN="fake" uv run ogx run starter ``` -------------------------------- ### Install OGX and Dependencies Source: https://github.com/ogx-ai/ogx/blob/main/docs/notebooks/Llama_Stack_Agent_Workflows.ipynb Installs the OGX library and its client, along with any necessary dependencies for Fireworks. Run this in a Colab environment or your local setup. ```bash # NBVAL_SKIP !pip install -U ogx ogx-client llama stack list-deps fireworks | xargs -L1 uv pip install ``` -------------------------------- ### Run OGX Server Source: https://github.com/ogx-ai/ogx/blob/main/docs/notebooks/responses-api-agent-migration.ipynb Starts the OGX server using the 'starter' command. ```bash llama stack run starter ``` -------------------------------- ### Start OGX with OpenAI API Key Source: https://github.com/ogx-ai/ogx/blob/main/docs/blog/2026-05-19-codex-cli-integration.md Starts the OGX server using an OpenAI API key. Ensure you have OGX and Codex CLI installed. ```bash export OPENAI_API_KEY="your-key-here" ogx run starter ``` -------------------------------- ### Start Telemetry Stack Source: https://github.com/ogx-ai/ogx/blob/main/scripts/telemetry/README.md Run the setup script to start Jaeger, OTel Collector, Prometheus, and Grafana. Auto-detects container runtime or allows explicit specification. ```bash # Auto-detect container runtime (podman or docker) ./scripts/telemetry/setup_telemetry.sh # Or specify a container runtime explicitly ./scripts/telemetry/setup_telemetry.sh --container docker ./scripts/telemetry/setup_telemetry.sh --container podman ``` -------------------------------- ### Run Starter Distribution Source: https://github.com/ogx-ai/ogx/blob/main/docs/docs/distributions/list_of_distributions.mdx Use this command to run the general-purpose starter distribution for OGX. It's recommended for most use cases, including prototyping and production. ```bash uv run ogx run starter ``` -------------------------------- ### Start Development Server Source: https://github.com/ogx-ai/ogx/blob/main/src/ogx_ui/README.md Use one of these commands to launch the local development server. Open http://localhost:8322 in your browser to view the application. ```bash npm run dev ``` ```bash yarn dev ``` ```bash pnpm dev ``` ```bash bun dev ``` -------------------------------- ### Instantiate and Use Simple Agent for First Turn Source: https://github.com/ogx-ai/ogx/blob/main/docs/notebooks/responses-api-agent-migration.ipynb Demonstrates how to instantiate `SimpleExampleAgent` with model, instructions, client, and tools, create a session, and make the first turn with example input. Prints the output text from the response. ```python simple_agent = SimpleExampleAgent( model=OGX_MODEL_ID, instructions=NPS_INSTRUCTIONS, client=client, tools=[ { "type": "mcp", "server_url": NPS_MCP_URL, "server_label": "", "requires_approval": False, } ] ) simple_session = simple_agent.create_session() simple_agent_response1 = simple_session.create_turn(NPS_EXAMPLE_PROMPT) print(simple_agent_response1.output_text) ``` -------------------------------- ### Start Ollama Server Source: https://github.com/ogx-ai/ogx/blob/main/docs/blog/2026-06-30-codex-ogx-cli.md Launches the Ollama server, which is a prerequisite for using Ollama-backed models with the OGX CLI. Ensure Ollama is installed and accessible. ```bash ollama serve ``` -------------------------------- ### Production Deployment with OGX Starter Distribution Source: https://github.com/ogx-ai/ogx/blob/main/docs/blog/2026-03-20-open-responses-openai-compatibility.md Demonstrates how to deploy the OGX starter distribution using Docker for production environments. ```bash # Deploy with your preferred infrastructure # Docker, Kubernetes, or bare metal — your choice docker run -p 8321:8321 ogxai/distribution-starter:latest ``` -------------------------------- ### Example Starter Distribution Configuration Source: https://github.com/ogx-ai/ogx/blob/main/src/ogx/distributions/README.md This YAML configuration defines the 'starter' distribution, specifying the APIs it serves and configuring the 'ollama' provider for inference. It demonstrates environment variable substitution for the Ollama base URL. ```yaml version: 2 distro_name: starter apis: [inference, responses, vector_io, ...] providers: inference: - provider_id: ollama provider_type: remote::ollama config: base_url: ${env.OLLAMA_URL:=http://localhost:11434/v1} ``` -------------------------------- ### Setup OGX Server Dependencies Source: https://github.com/ogx-ai/ogx/blob/main/docs/quick_start.ipynb Installs all necessary dependencies for the Llama stack server with the Ollama inference provider using uv. This prepares the environment for running the OGX server. ```python import os import subprocess if "UV_SYSTEM_PYTHON" in os.environ: del os.environ["UV_SYSTEM_PYTHON"] # this command installs all the dependencies needed for the llama stack server with the ollama inference provider !uv run --with ogx llama stack list-deps starter | xargs -L1 uv pip install ``` -------------------------------- ### Run a Simple Agent Example with OGX Client Source: https://github.com/ogx-ai/ogx/blob/main/docs/zero_to_hero_guide/07_Agents101.ipynb Initialize the LlamaStackClient, create an Agent with specific instructions and tools, manage conversational sessions, and stream responses from the agent. This example uses the 'builtin::websearch' tool. ```python import os from ogx_client import LlamaStackClient from ogx_client.lib.agents.agent import Agent from ogx_client.lib.agents.event_logger import EventLogger from ogx_client.types import UserMessage from typing import cast, Iterator async def agent_example(): client = LlamaStackClient( base_url=f"http://{HOST}:{PORT}", provider_data={ "tavily_search_api_key": TAVILY_SEARCH_API_KEY, } ) agent = Agent( client, model=MODEL_NAME, instructions="You are a helpful assistant! If you call builtin tools like brave search, follow the syntax brave_search.call(…)", sampling_params={ "strategy": { "type": "greedy", }, }, tools=["builtin::websearch"], ) session_id = agent.create_session("test-session") print(f"Created session_id={session_id} for Agent({agent.agent_id})") user_prompts = [ "I am planning a trip to Switzerland, what are the top 3 places to visit?", "What is so special about #1?", ] for prompt in user_prompts: response = agent.create_turn( messages=[ UserMessage(role="user", content=prompt) ], session_id=session_id, stream=True, ) for log in EventLogger().log(cast(Iterator, response)): log.print() await agent_example() ``` -------------------------------- ### Run OGX Server Locally Source: https://github.com/ogx-ai/ogx/blob/main/docs/notebooks/oci/OCI_ObjectStore_Demo.ipynb Execute this command to start the OGX server locally, loading environment variables from the .env file. Refer to the CONTRIBUTING document for initial setup. ```bash !uv run --env-file=.env llama stack run oci ``` -------------------------------- ### Example Project Structure for Configurations Source: https://github.com/ogx-ai/ogx/blob/main/docs/docs/distributions/customizing_run_yaml.mdx Illustrates a common project structure for managing different environment-specific configuration files. ```yaml your-project/ ├── configs/ │ ├── dev-config.yaml │ ├── prod-config.yaml └── README.md ``` -------------------------------- ### Define Few-Shot Examples for Chat Completion Source: https://github.com/ogx-ai/ogx/blob/main/docs/zero_to_hero_guide/02_Prompt_Engineering101.ipynb Create a list of message dictionaries representing user prompts and assistant responses to guide the LLM. Each pair demonstrates the desired input-output format. ```python few_shot_examples = [ {"role": "user", "content": 'Have shorter, spear-shaped ears.'}, { "role": "assistant", "content": "That's Alpaca!", "stop_reason": 'end_of_message', "tool_calls": [] }, { "role": "user", "content": 'Known for their calm nature and used as pack animals in mountainous regions.' }, { "role": "assistant", "content": "That's Llama!", "stop_reason": 'end_of_message', "tool_calls": [] }, { "role": "user", "content": 'Has a straight, slender neck and is smaller in size compared to its relative.' }, { "role": "assistant", "content": "That's Alpaca!", "stop_reason": 'end_of_message', "tool_calls": [] }, { "role": "user", "content": 'Generally taller and more robust, commonly seen as guard animals.' } ] ``` -------------------------------- ### Run OGX Distribution Starter with Docker Source: https://github.com/ogx-ai/ogx/blob/main/docs/docs/distributions/starting_ogx_server.mdx Execute the OGX distribution starter using a pre-built Docker container. Mounts the .ogx directory and sets the Ollama URL. ```bash docker run -it \ -p 8321:8321 \ -v ~/.ogx:/root/.ogx \ -e OLLAMA_URL=http://host.docker.internal:11434 \ ogxai/distribution-starter ``` -------------------------------- ### Start Local File System MCP Server Source: https://github.com/ogx-ai/ogx/blob/main/docs/docs/building_applications/tools.mdx Run a local MCP server using 'supergateway' to expose a file system as tools. This example sets up a server on port 8000 that can access files in `/tmp/content`. ```shell # Start your MCP server mkdir /tmp/content touch /tmp/content/foo touch /tmp/content/bar npx -y supergateway --port 8000 --stdio 'npx -y @modelcontextprotocol/server-filesystem /tmp/content' ``` -------------------------------- ### MCP Server Configuration Example Source: https://github.com/ogx-ai/ogx/blob/main/docs/notebooks/ogx_agents_getting_started_examples.ipynb Provides an example of how to configure MCP server connection details, including the server URL and access token. Remember to replace placeholder values with your actual credentials. ```python # MCP server configuration # Replace with your actual MCP server URL and credentials MCP_SERVER_URL = "https://api.example.com/mcp" # Your MCP server endpoint MCP_ACCESS_TOKEN = "your-token-here" # Your authentication token MCP_ACCESS_TOKEN = "YOUR_ACCESS_TOKEN_HERE" ``` -------------------------------- ### Install OpenTelemetry Packages Source: https://github.com/ogx-ai/ogx/blob/main/docs/blog/2026-03-30-observability.md Install necessary OpenTelemetry packages for instrumentation. This command detects installed libraries and installs matching instrumentation packages. ```bash uv pip install opentelemetry-distro opentelemetry-exporter-otlp uv run opentelemetry-bootstrap -a requirements | uv pip install --requirement - ``` -------------------------------- ### Switch to OpenAI Provider Source: https://github.com/ogx-ai/ogx/blob/main/docs/docs/getting_started/detailed_tutorial.mdx Set the OPENAI_API_KEY environment variable to use OpenAI as the backend. Then run the OGX starter command. ```bash export OPENAI_API_KEY=sk-xxx uv run ogx run starter ``` -------------------------------- ### Install OGX Server with cURL Source: https://github.com/ogx-ai/ogx/blob/main/docs/docs/index.mdx Use this command to quickly install the OGX server by downloading and executing the installation script. This is a convenient one-line installation method. ```bash # One-line install curl -LsSf https://github.com/ogx-ai/ogx/raw/main/scripts/install.sh | bash ``` -------------------------------- ### Start OGX Starter Distribution with Ollama Source: https://github.com/ogx-ai/ogx/blob/main/docs/blog/2026-06-30-codex-ogx-cli.md Starts the OGX starter distribution, configured to use Ollama as the model provider. This involves pulling a model and setting the OLLAMA_URL environment variable. ```bash ollama pull llama3.2:3b export OLLAMA_URL="http://localhost:11434/v1" uv run ogx run starter ``` -------------------------------- ### Print Bedrock Configuration Instructions Source: https://github.com/ogx-ai/ogx/blob/main/docs/notebooks/bedrock_inference_example.ipynb Prints the minimal Bedrock configuration and instructions on how to save it to a file and start the OGX server. This includes setting environment variables and the command to run the server. ```python # Minimal config.yaml example for Bedrock # Copy this and save as your-config.yaml minimal_config = """ version: 2 providers: inference: - provider_id: bedrock provider_type: remote::bedrock config: api_key: ${env.AWS_BEARER_TOKEN_BEDROCK:=} region_name: ${env.AWS_DEFAULT_REGION:=us-west-2} registered_resources: models: - metadata: {} model_id: bedrock/openai.gpt-oss-20b-1:0 provider_id: bedrock provider_model_id: openai.gpt-oss-20b-1:0 model_type: llm """.strip() print("=" * 60) print("MINIMAL CONFIG.YAML FOR BEDROCK") print("=" * 60) print(minimal_config) print("=" * 60) print("\nSave this as 'config.yaml' and run:") print(" export AWS_BEARER_TOKEN_BEDROCK='your-token'") print(" export AWS_DEFAULT_REGION=us-west-2") print(" uv run llama stack run ./config.yaml") ``` -------------------------------- ### Install and Install Pre-commit Hooks Source: https://github.com/ogx-ai/ogx/blob/main/CONTRIBUTING.md Installs the pre-commit package and then installs the pre-commit hooks for the project. Ensures code quality checks are run automatically before each commit. ```bash uv pip install 'pre-commit>=4.4.0' uv run pre-commit install ``` -------------------------------- ### Run Starter Distribution with Ollama Source: https://github.com/ogx-ai/ogx/blob/main/docs/docs/concepts/distributions.mdx Use this command to run the starter distribution with Ollama for local inference. Ensure the OLLAMA_URL environment variable is set. ```bash # With Ollama (local inference) OLLAMA_URL=http://localhost:11434 uv run ogx run starter ``` -------------------------------- ### Install LangChain and Dependencies Source: https://github.com/ogx-ai/ogx/blob/main/docs/notebooks/langchain/Llama_Stack_LangChain.ipynb Installs necessary packages for LangChain, FastAPI integration, and FAISS vector store. Ensure you have uv installed. ```python !pip install uv !uv pip install fastapi uvicorn "langchain>=0.2" langchain-openai \ langchain-community langchain-text-splitters \ faiss-cpu ``` -------------------------------- ### Connect to vLLM with Qwen using OGX Source: https://github.com/ogx-ai/ogx/blob/main/docs/blog/2026-06-09-claude-code-integration.md Start the vLLM server, set the VLLM_URL, and then connect OGX to the specified vLLM model. ```bash # Start vLLM vllm serve Qwen/Qwen3-8B --api-key fake # Terminal 1 export VLLM_URL="http://localhost:8000/v1" ogx run starter # Terminal 2 ogx connect claude --model vllm/Qwen/Qwen3-8B ``` -------------------------------- ### Download Claude Code Installer Source: https://github.com/ogx-ai/ogx/blob/main/docs/blog/2026-06-16-claude-code-blog.md Use this curl command to download and install the Claude Code application. Ensure you have curl installed on your system. ```bash curl -fsSL https://claude.ai/install.sh | bash ``` -------------------------------- ### Build and Serve Documentation Source: https://github.com/ogx-ai/ogx/blob/main/CONTRIBUTING.md Commands to rebuild documentation pages and the OpenAPI spec, then start a local server for previewing changes. Requires Node.js and npm. ```bash # This rebuilds the documentation pages and the OpenAPI spec. cd docs/ npm install npm run gen-api-docs all npm run build # This will start a local server (usually at http://127.0.0.1:3000). npm run serve ``` -------------------------------- ### Install OGX and Dependencies Source: https://github.com/ogx-ai/ogx/blob/main/docs/docs/distributions/importing_as_library.mdx Install the OGX library and its dependencies using uv pip. This command also installs any necessary dependencies for the 'starter' distribution. ```bash uv pip install ogx ogx-client ogx list-deps starter | xargs -L1 uv pip install ``` -------------------------------- ### Install OGX Kubernetes Operator Source: https://github.com/ogx-ai/ogx/blob/main/docs/docs/deploying/kubernetes_deployment.mdx Apply the operator.yaml manifest to install the OGX Kubernetes operator. You can install from the latest main branch or a specific version. ```bash # Install from the latest main branch kubectl apply -f https://raw.githubusercontent.com/ogx-ai/ogx-k8s-operator/main/release/operator.yaml # Or install a specific version (e.g., v0.4.0) # kubectl apply -f https://raw.githubusercontent.com/ogx-ai/ogx-k8s-operator/v0.4.0/release/operator.yaml ``` -------------------------------- ### Run OGX Starter Distribution with Ollama Source: https://github.com/ogx-ai/ogx/blob/main/docs/blog/2026-03-01-building-agentic-flows.md Use this command to pull necessary models and start the OGX starter distribution, pointing it to an Ollama inference provider. ```bash ollama pull llama3.1:8b ollama pull gpt-oss:20b OLLAMA_URL=http://localhost:11434/v1 uv run --with ogx ogx run starter ``` -------------------------------- ### Install OGX CLI from Source Source: https://github.com/ogx-ai/ogx/blob/main/docs/docs/references/ogx_cli_reference/index.md Install OGX from its source code. This involves cloning the repository, setting up a virtual environment, and installing the package in editable mode. ```bash mkdir -p ~/local cd ~/local git clone git@github.com:meta-llama/ogx.git uv venv myenv --python 3.12 source myenv/bin/activate # On Windows: myenv\Scripts\activate cd ogx pip install -e . ``` -------------------------------- ### Install OGX Client and Termcolor Source: https://github.com/ogx-ai/ogx/blob/main/docs/zero_to_hero_guide/05_Memory101.ipynb Install the necessary Python packages for the OGX client library and colored terminal output. A kernel restart may be required after installation. ```python # Install the client library and a helper package for colored output #!pip install ogx-client termcolor # 💡 Note: If you're running this in a new environment, you might need to restart # your kernel after installation ``` -------------------------------- ### Run Starter Distribution with OpenAI Source: https://github.com/ogx-ai/ogx/blob/main/docs/docs/concepts/distributions.mdx Use this command to run the starter distribution with OpenAI for remote inference. Ensure the OPENAI_API_KEY environment variable is set. ```bash # With OpenAI (remote inference) OPENAI_API_KEY=sk-xxx uv run ogx run starter ``` -------------------------------- ### Compare Official and OpenAPI SDK Initialization Source: https://github.com/ogx-ai/ogx/blob/main/client-sdks/openapi/USAGE_EXAMPLES.md Shows how to initialize both the official ogx_client and the ogx-open-client. Both SDKs offer the same functionality and can be chosen based on tooling preferences. ```python # Official SDK (ogx_client) from ogx_client import OgxClient as OfficialClient official = OfficialClient(base_url="http://localhost:8000") # OpenAPI SDK (ogx-open-client) from ogx_open_client import OgxClient as OpenAPIClient openapi = OpenAPIClient(host="http://localhost:8000") # Both provide identical API surface # Choose based on your tooling preferences ``` -------------------------------- ### Install Unstructured File Processor Source: https://github.com/ogx-ai/ogx/blob/main/docs/docs/providers/file_processors/inline_unstructured.mdx Install the OGX library with Unstructured local support using pip. Ensure system dependencies are installed separately as per OS requirements. ```bash pip install "ogx[unstructured-local]" ``` -------------------------------- ### Run Response Tests with GPT Setup Source: https://github.com/ogx-ai/ogx/blob/main/tests/integration/README.md Execute response tests with the starter stack and GPT setup, suitable for fast responses with strong tool-calling models. This command uses verbose and silent modes. ```bash pytest -s -v tests/integration --stack-config=server:starter --suite=responses --setup=gpt ``` -------------------------------- ### Storage Configuration Example Source: https://github.com/ogx-ai/ogx/blob/main/ARCHITECTURE.md Defines the storage backend and database paths in the run configuration. Supports different stores like kvstore and inference. ```yaml storage: type: sqlite db_path: ${env.SQLITE_STORE_DIR}/registry.db stores: kvstore: type: kv_sqlite db_path: ${env.SQLITE_STORE_DIR}/kvstore.db inference: type: sql_sqlite db_path: ${env.SQLITE_STORE_DIR}/inference_store.db ``` -------------------------------- ### Install ogx-api Package Source: https://github.com/ogx-ai/ogx/blob/main/src/ogx_api/README.md Install the ogx-api package using pip or uv. ```bash pip install ogx-api ``` ```bash uv pip install ogx-api ``` -------------------------------- ### Run All Inference Tests with Server Source: https://github.com/ogx-ai/ogx/blob/main/tests/integration/README.md Starts a server with the 'starter' config and runs all inference tests. Specify the Ollama URL, text model, and embedding model. ```bash OLLAMA_URL=http://localhost:11434 \ pytest -s -v tests/integration/inference \ --stack-config=server:starter \ --text-model=ollama/llama3.2:3b-instruct-fp16 \ --embedding-model=nomic-embed-text-v1.5 ``` -------------------------------- ### Install ChromaDB with uv Source: https://github.com/ogx-ai/ogx/blob/main/docs/zero_to_hero_guide/README.md Use the uv package manager to install the ChromaDB library. ```bash uv pip install chromadb ``` -------------------------------- ### Run Base Suite with VLLM Setup Source: https://github.com/ogx-ai/ogx/blob/main/tests/integration/README.md Execute the base integration tests suite using the starter stack and VLLM setup for performance. This command uses verbose and silent modes. ```bash pytest -s -v tests/integration --stack-config=server:starter --suite=base --setup=vllm ```