### Setup and Run Orion Web UI Source: https://github.com/phoenixlink-cloud/orion-agent/blob/main/README.md Navigate to the web UI directory, install its dependencies, and start the development server. The UI will be available at http://localhost:3000. ```bash cd orion-web npm install npm run dev ``` -------------------------------- ### Install Dependencies and Start Orion API Server Source: https://github.com/phoenixlink-cloud/orion-agent/blob/main/orion-web/README.md Installs development dependencies and starts the Orion API server. Ensure you are in the orion-agent root directory. ```bash pip install -e ".[dev]" uvicorn orion.api.server:app --reload --port 8001 ``` -------------------------------- ### Install Dependencies and Start Web UI Development Server Source: https://github.com/phoenixlink-cloud/orion-agent/blob/main/orion-web/README.md Navigates to the orion-web directory, installs Node.js dependencies, and runs the development server for the Orion Web UI. This is typically done once for dependency installation. ```bash cd orion-web npm install npm run dev ``` -------------------------------- ### CLI Setup Wizard for Google OAuth Source: https://github.com/phoenixlink-cloud/orion-agent/blob/main/docs/GOOGLE_SETUP.md Initiates the CLI wizard to guide through Google Cloud OAuth app creation and saves credentials. ```bash /google setup ``` -------------------------------- ### Setup Python Virtual Environment and Install Dependencies Source: https://github.com/phoenixlink-cloud/orion-agent/blob/main/README.md Set up a Python virtual environment and install development dependencies for the Orion Agent backend. This includes installing the project in editable mode with development extras. ```bash cd orion-agent python -m venv .venv .venv\Scripts\activate pip install -e ".[dev]" ``` -------------------------------- ### Install Orion Agent on Windows Source: https://github.com/phoenixlink-cloud/orion-agent/blob/main/docs/INSTALLATION.md Instructions for installing Orion Agent on Windows, including Python setup, virtual environment activation, and pip installation. ```powershell python -m venv .venv .venv\Scripts\activate pip install orion-agent ``` -------------------------------- ### Example Prompt Injection Context Source: https://github.com/phoenixlink-cloud/orion-agent/blob/main/docs/LEARNING_SYSTEM.md Illustrates how Orion injects relevant success and anti-patterns into the LLM prompt to guide response generation. Anti-patterns are weighted to be avoided. ```text [Memory Context] Success patterns for this task type: - This project uses custom exception classes for error handling - Always include type hints in function signatures - Tests follow pytest conventions with fixtures Anti-patterns to avoid: - Don't use bare except clauses (rated 1/5 on 2025-01-15) - Don't modify __init__.py without checking circular imports ``` -------------------------------- ### Start Web Frontend Source: https://github.com/phoenixlink-cloud/orion-agent/blob/main/docs/USER_GUIDE.md Command to start the Orion web frontend development server using npm. Navigate to the 'orion-web' directory before running this command. ```bash cd orion-web npm run dev ``` -------------------------------- ### Start Orion Agent Web Frontend Source: https://github.com/phoenixlink-cloud/orion-agent/blob/main/docs/FAQ.md Starts the development server for the Orion Agent Web UI. Navigate to the `orion-web` directory and run this command. ```bash cd orion-web && npm run dev ``` -------------------------------- ### Start Orion Web UI Source: https://github.com/phoenixlink-cloud/orion-agent/blob/main/docs/USER_GUIDE.md Navigate to the web UI directory and run this command to start the development server for the Orion Agent's web interface. ```bash cd orion-web npm run dev ``` -------------------------------- ### Install Orion Agent from source for development Source: https://github.com/phoenixlink-cloud/orion-agent/blob/main/docs/INSTALLATION.md Clones the repository, sets up a virtual environment, and installs the agent in development mode. Includes development dependencies. ```bash git clone https://github.com/phoenixlink-cloud/orion-agent.git cd orion-agent python -m venv .venv # Windows: .venv\Scripts\activate # macOS/Linux: source .venv/bin/activate pip install -e ".[dev]" ``` -------------------------------- ### Install Development Dependencies Source: https://github.com/phoenixlink-cloud/orion-agent/blob/main/CONTRIBUTING.md Install the project in development mode with all specified dependencies. This is typically done before running tests or making code changes. ```bash pip install -e ".[dev,web,training]" ``` -------------------------------- ### Start Ollama Serve Source: https://github.com/phoenixlink-cloud/orion-agent/blob/main/docs/TROUBLESHOOTING.md Ensure the Ollama service is running to enable local LLM connections. This command starts the Ollama server. ```bash ollama serve ``` -------------------------------- ### Install Orion Agent from source Source: https://github.com/phoenixlink-cloud/orion-agent/blob/main/docs/GETTING_STARTED.md Clone the repository and install the Orion Agent from source. This is useful for development or if you need the latest unreleased features. ```bash git clone https://github.com/phoenixlink-cloud/orion-agent.git cd orion-agent pip install -e ".[dev]" ``` -------------------------------- ### Install All Orion Agent Integrations Source: https://github.com/phoenixlink-cloud/orion-agent/blob/main/docs/INTEGRATIONS.md Use this command to install all available integrations for the Orion Agent. This is useful for setting up the agent with the maximum number of supported services. ```bash pip install orion-agent[all] ``` -------------------------------- ### Project Memory Example (JSON) Source: https://github.com/phoenixlink-cloud/orion-agent/blob/main/docs/MEMORY_SYSTEM.md An example of a JSON object stored in Project Memory, detailing a learned coding pattern. ```json { "patterns": [ { "id": "auth-error-handling", "content": "This project uses custom AuthError exceptions", "confidence": 0.85, "access_count": 12, "created": "2025-02-01T10:30:00Z" } ] } ``` -------------------------------- ### Install Orion Agent Source: https://github.com/phoenixlink-cloud/orion-agent/blob/main/README.md Install the Orion Agent using pip. Use the '[all]' extra for full integrations. ```bash pip install orion-agent ``` ```bash pip install orion-agent[all] ``` -------------------------------- ### Conventional Commit Examples Source: https://github.com/phoenixlink-cloud/orion-agent/blob/main/data/seed/skills/git-workflow/SKILL.md Examples demonstrating the application of conventional commit messages for different types of changes. These examples illustrate how to structure commit messages effectively. ```git feat(auth): add OAuth2 login flow ``` ```git fix(api): handle null response from payment provider ``` ```git docs(readme): add deployment instructions ``` -------------------------------- ### Start API Server Source: https://github.com/phoenixlink-cloud/orion-agent/blob/main/docs/USER_GUIDE.md Command to start the Orion API server using Uvicorn. Ensure the application entry point and port are correctly specified. ```bash uvicorn orion.api.server:app --port 8001 ``` -------------------------------- ### Example Complete Orion Agent Configuration Source: https://github.com/phoenixlink-cloud/orion-agent/blob/main/docs/CONFIGURATION.md A comprehensive example of the Orion agent's config.yaml file, demonstrating settings for LLM, governance, memory, agents, sandbox, and logging. ```yaml # ~/.orion/config.yaml llm: provider: openai model: gpt-4o temperature: 0.3 max_tokens: 4096 governance: mode: pro memory: tier2_retention_days: 30 promotion_threshold: 0.85 auto_consolidate: true agents: enable_table_of_three: true sandbox: mode: auto timeout: 60 network: false logging: level: INFO structured: false ``` -------------------------------- ### Install Orion Agent Source: https://context7.com/phoenixlink-cloud/orion-agent/llms.txt Install the Orion Agent package using pip. Use the `[all]` extra for full integrations or install from source for development. ```bash pip install orion-agent ``` ```bash pip install orion-agent[all] ``` ```bash git clone https://github.com/phoenixlink-cloud/orion-agent.git cd orion-agent pip install -e ".[dev]" ``` -------------------------------- ### Troubleshoot 'Permission denied' during installation Source: https://github.com/phoenixlink-cloud/orion-agent/blob/main/docs/INSTALLATION.md Advises using a virtual environment to avoid permission errors when installing Orion Agent, especially when using system Python. ```bash python -m venv .venv source .venv/bin/activate # or .venv\Scripts\activate on Windows pip install orion-agent ``` -------------------------------- ### Start Orion API Server Source: https://context7.com/phoenixlink-cloud/orion-agent/llms.txt Provides commands to start the Orion API server using uvicorn. Use the --reload flag for development to automatically restart the server on code changes. The Web UI can be started separately in another terminal. ```bash # Start FastAPI server uvicorn orion.api.server:app --port 8001 ``` ```bash # Start with auto-reload for development uvicorn orion.api.server:app --port 8001 --reload ``` ```bash # Start Web UI (separate terminal) cd orion-web npm install npm run dev # http://localhost:3000 ``` -------------------------------- ### Position Size Calculation Example Source: https://github.com/phoenixlink-cloud/orion-agent/blob/main/data/seed/skills/risk-management-position-sizing/SKILL.md An example demonstrating the calculation of position size for a specific trade scenario. This helps in understanding how to apply the formula with real trading parameters. ```text Position Size = / (50 pips x ) = / = 0.20 lots (2 mini lots) ``` -------------------------------- ### Start Orion Agent CLI Source: https://github.com/phoenixlink-cloud/orion-agent/blob/main/docs/CLI_REFERENCE.md Use these commands to start the Orion Agent in interactive mode, with a specific workspace, or in a particular mode. The `--version` and `--help` flags display agent version and usage information, respectively. ```bash # Start interactive REPL orion ``` ```bash # Start with specific workspace orion --workspace /path/to/project ``` ```bash # Start in specific mode orion --mode pro ``` ```bash # Show version orion --version ``` ```bash # Show help orion --help ``` -------------------------------- ### Install Orion Agent with specific integration groups Source: https://github.com/phoenixlink-cloud/orion-agent/blob/main/docs/INSTALLATION.md Installs Orion Agent with specific sets of integrations. Choose the group that matches your needs. ```bash pip install orion-agent[voice] ``` ```bash pip install orion-agent[image] ``` ```bash pip install orion-agent[messaging] ``` ```bash pip install orion-agent[dev] ``` -------------------------------- ### Starting Orion Agent Source: https://github.com/phoenixlink-cloud/orion-agent/blob/main/docs/CLI_REFERENCE.md Commands to start the Orion Agent in various modes, including interactive REPL, with a specific workspace, or in a specific mode. Also includes commands to display version and help information. ```APIDOC ## Starting Orion Agent ### Description Commands to start the Orion Agent in various modes, including interactive REPL, with a specific workspace, or in a specific mode. Also includes commands to display version and help information. ### Commands - `orion` - Starts the Orion Agent in interactive REPL mode. - `orion --workspace ` - Starts the Orion Agent with a specific workspace directory. - `orion --mode ` - Starts the Orion Agent in a specific mode (e.g., `pro`). - `orion --version` - Displays the current version of the Orion Agent. - `orion --help` - Displays the help information for the Orion Agent CLI. ``` -------------------------------- ### Start Orion Agent CLI Source: https://context7.com/phoenixlink-cloud/orion-agent/llms.txt Launch the Orion Agent command-line interface. Options include starting an interactive REPL, specifying a workspace, or setting a specific operational mode. ```bash orion ``` ```bash orion --workspace /path/to/project ``` ```bash orion --mode pro ``` -------------------------------- ### Get Skill Details Source: https://context7.com/phoenixlink-cloud/orion-agent/llms.txt Fetches detailed information for a specific skill, including full instructions. ```bash # Get skill with full instructions curl http://localhost:8001/api/ara/skills/code-review ``` -------------------------------- ### Get Orion Agent Version Source: https://github.com/phoenixlink-cloud/orion-agent/blob/main/docs/TROUBLESHOOTING.md Use the `orion --version` command to retrieve the installed Orion Agent version. This is required when opening a new issue or contacting support. ```bash orion --version ``` -------------------------------- ### Dockerfile for Orion Agent Source: https://github.com/phoenixlink-cloud/orion-agent/blob/main/docs/DEPLOYMENT.md Defines the Dockerfile for building the Orion Agent image. It installs system dependencies, Python packages, exposes the API port, and sets up a health check and the command to start the API server. ```dockerfile FROM python:3.11-slim WORKDIR /app # Install system dependencies RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/* # Install Orion COPY . . RUN pip install --no-cache-dir -e ".[all]" # Expose API port EXPOSE 8001 # Health check HEALTHCHECK --interval=30s --timeout=5s --retries=3 \ CMD python -c "import urllib.request; urllib.request.urlopen('http://localhost:8001/health')" # Start API server CMD ["uvicorn", "orion.api.server:app", "--host", "0.0.0.0", "--port", "8001"] ``` -------------------------------- ### Configure Provider and Model Settings via CLI Source: https://context7.com/phoenixlink-cloud/orion-agent/llms.txt Manage LLM provider, model, and generation parameters like temperature using the `/settings` command. ```bash > /settings key openai sk-your-key-here API key set for openai ``` ```bash > /settings provider anthropic Provider set: anthropic ``` ```bash > /settings model claude-3-5-sonnet-20241022 Model set: claude-3-5-sonnet-20241022 ``` ```bash > /settings temperature 0.3 Temperature set: 0.3 ``` -------------------------------- ### Install C++ Build Tools on Windows Source: https://github.com/phoenixlink-cloud/orion-agent/blob/main/docs/TROUBLESHOOTING.md Install the necessary C++ build tools for Windows if you encounter build errors during installation. This command uses winget to install Visual Studio 2022 Build Tools. ```powershell winget install Microsoft.VisualStudio.2022.BuildTools ``` -------------------------------- ### Install Orion Agent on macOS Source: https://github.com/phoenixlink-cloud/orion-agent/blob/main/docs/INSTALLATION.md Instructions for installing Orion Agent on macOS using Homebrew for Python and pip for the agent installation. ```bash brew install python@3.11 pip3 install orion-agent ``` -------------------------------- ### Install Orion Agent on Linux (Debian/Ubuntu) Source: https://github.com/phoenixlink-cloud/orion-agent/blob/main/docs/INSTALLATION.md Instructions for installing Orion Agent on Debian/Ubuntu systems, including system package updates and pip installation. ```bash sudo apt update sudo apt install python3.11 python3.11-venv python3-pip git pip3 install orion-agent ``` -------------------------------- ### Initiate Google Account Login via CLI Source: https://github.com/phoenixlink-cloud/orion-agent/blob/main/docs/GOOGLE_SETUP.md Starts the Google OAuth login flow using the CLI command. ```bash /google login ``` -------------------------------- ### Install Orion Agent via pip Source: https://github.com/phoenixlink-cloud/orion-agent/blob/main/docs/GETTING_STARTED.md Use this command to install the Orion Agent package. Recommended for most users. ```bash pip install orion-agent ``` -------------------------------- ### User Feedback Example Source: https://github.com/phoenixlink-cloud/orion-agent/blob/main/docs/MEMORY_SYSTEM.md Illustrates how a user provides feedback on Orion's response, which aids in learning and pattern storage. ```text > Add error handling to the API endpoint [Orion provides solution] Rate this response (1-5, or skip): 5 Feedback recorded. Pattern stored. ``` -------------------------------- ### AEGIS Audit Log Example Source: https://github.com/phoenixlink-cloud/orion-agent/blob/main/docs/AEGIS.md Example entries from the AEGIS audit log, showing validation decisions, actions, and reasons. ```log 2025-02-10 14:23:45 | AEGIS | PASS | read | src/main.py | mode=pro 2025-02-10 14:23:52 | AEGIS | PASS | modify | src/main.py | mode=pro | approved=user 2025-02-10 14:24:01 | AEGIS | FAIL | modify | /etc/passwd | reason=path_escape 2025-02-10 14:24:15 | AEGIS | FAIL | run | rm -rf / | reason=dangerous_pattern ``` -------------------------------- ### Manage Skills Programmatically with SkillLibrary Source: https://context7.com/phoenixlink-cloud/orion-agent/llms.txt Demonstrates how to initialize, load, list, create, import, and resolve skills using the SkillLibrary. Skills can be managed programmatically for custom AI agent configurations. Ensure the skill path is correct when importing. ```python from pathlib import Path from orion.ara.skill_library import SkillLibrary # Initialize library library = SkillLibrary() loaded, warnings = library.load_all() print(f"Loaded {loaded} skills, {library.group_count} groups") # List approved skills skills = library.list_skills(approved_only=True) for skill in skills: print(f"{skill.name}: {skill.description} (trust: {skill.trust_level})") # Create a new custom skill skill, scan_result = library.create_skill( name="my-deployment", description="Deploy to staging environment", instructions="""## Deployment Procedure 1. Run tests: `pytest tests/` 2. Build: `npm run build` 3. Deploy: `kubectl apply -f k8s/staging/` """, tags=["devops", "deployment"], author="my-team" ) print(f"Created: {skill.name}, approved: {skill.aegis_approved}") # Import skill from external directory imported, scan, warnings = library.import_skill(Path("/path/to/skill-folder")) if imported: print(f"Imported: {imported.name}, trust: {imported.trust_level}") # Resolve skills for a role role_skills = library.resolve_skills_for_role( assigned_skills=["code-review"], assigned_skill_groups=["developer-core"] ) for s in role_skills: print(f"Role has skill: {s.name}") ``` -------------------------------- ### Verify Orion Agent installation Source: https://github.com/phoenixlink-cloud/orion-agent/blob/main/docs/INSTALLATION.md Checks the installed Orion Agent version and runs a diagnostic command to ensure all components are functioning correctly. ```bash # Check version orion --version # Run diagnostics orion > /doctor ``` -------------------------------- ### Connect to Orion API Source: https://github.com/phoenixlink-cloud/orion-agent/blob/main/docs/CLI_REFERENCE.md Use `/connect` to establish a connection from the CLI to the Orion API server, displaying the connection endpoint. ```bash > /connect Connected to Orion API at http://localhost:8001 ``` -------------------------------- ### Display Evolution Summary Source: https://github.com/phoenixlink-cloud/orion-agent/blob/main/docs/LEARNING_SYSTEM.md Use the /evolution command to view a summary of the agent's performance, including key metrics, strengths, weaknesses, and recommendations for improvement. ```bash > /evolution Evolution Summary: Total tasks: 847 Approval rate: 82.3% Quality trend: Improving (+3.2% this month) Strengths: - Python refactoring (94% approval) - Bug fixing (89% approval) Weaknesses: - Test generation (68% approval) - Documentation (71% approval) Recommendations: [HIGH] Improve test generation by studying project test patterns [MEDIUM] Review documentation style preferences ``` -------------------------------- ### Start and Monitor Docker Compose Services Source: https://github.com/phoenixlink-cloud/orion-agent/blob/main/docs/DEPLOYMENT.md Commands to start the Docker Compose services in detached mode and to follow the logs of the Orion API service. ```bash docker-compose up -d docker-compose logs -f orion-api ``` -------------------------------- ### Start Orion Agent API Server Source: https://github.com/phoenixlink-cloud/orion-agent/blob/main/README.md Launch the Orion Agent API server using Uvicorn. The server will be accessible on port 8001. ```bash uvicorn orion.api.server:app --port 8001 ``` -------------------------------- ### Structured Log Example Source: https://github.com/phoenixlink-cloud/orion-agent/blob/main/docs/DEPLOYMENT.md An example of a structured log entry in JSON format, showing timestamp, level, correlation ID, component, event, and detailed information. ```json { "timestamp": "2025-02-10T14:23:45Z", "level": "INFO", "correlation_id": "abc-123", "component": "aegis", "event": "validation_pass", "details": { "action": "modify", "path": "src/main.py", "mode": "pro" } } ``` -------------------------------- ### Workspace Confinement Examples Source: https://github.com/phoenixlink-cloud/orion-agent/blob/main/docs/AEGIS.md Illustrates file operations that are inside or outside the workspace directory. Operations escaping the workspace or using absolute paths outside are rejected. ```text /home/user/project/src/main.py (inside workspace -- PASS) /home/user/project/../.ssh/id_rsa (escapes workspace -- FAIL) /etc/passwd (absolute path outside -- FAIL) ``` -------------------------------- ### Configure Ollama for local LLM Source: https://github.com/phoenixlink-cloud/orion-agent/blob/main/docs/GETTING_STARTED.md Install Ollama and pull a model like Llama3 for local LLM usage. This option is free and does not require an external API key. ```bash # Install Ollama from https://ollama.ai ollama pull llama3 ```