### Setup development environment Source: https://github.com/alex8791-cyber/cognithor/wiki/Development Commands to clone the repository, install dependencies in development mode, and verify the installation with tests and checks. ```bash # Clone and install in development mode git clone https://github.com/Alex8791-cyber/cognithor.git cd cognithor pip install -e ".[dev]" # Run tests to verify setup make test # Run all checks make check ``` -------------------------------- ### Install via pip Source: https://github.com/alex8791-cyber/cognithor/blob/main/docs/quickstart/00-installation.en.md Standard installation steps for Linux, macOS, and manual Windows setups using pip. ```bash # 1. Install Ollama (one-time) # Linux: curl -fsSL https://ollama.com/install.sh | sh # macOS: brew install ollama # Win: installer from https://ollama.com # 2. Pull the Ollama model ollama pull qwen3:8b # 3. Install Cognithor pip install "cognithor[all]" # 4. Verify cognithor --version # → Cognithor 0.93.0 ``` -------------------------------- ### Run the tool example Source: https://github.com/alex8791-cyber/cognithor/blob/main/examples/quickstart/02_first_tool/README.md Install the required dependencies and execute the main Python script. ```bash pip install -r requirements.txt python main.py ``` -------------------------------- ### Setup Development Environment Source: https://github.com/alex8791-cyber/cognithor/blob/main/CONTRIBUTING.md Commands to clone the repository, set up a virtual environment, and install dependencies. ```bash # Fork and clone git clone https://github.com/YOUR_USERNAME/cognithor.git cd cognithor # Create virtual environment python -m venv .venv source .venv/bin/activate # Linux/macOS .venv\Scripts\activate # Windows # Install with dev dependencies pip install -e ".[all,dev]" # Verify setup python -m pytest tests/ -x -q ``` -------------------------------- ### Run the PKV Report Example Source: https://github.com/alex8791-cyber/cognithor/blob/main/examples/quickstart/05_pkv_report/README.md Commands to install dependencies, pull required models, and execute the main script. ```bash pip install -r requirements.txt ollama pull qwen3:8b ollama pull qwen3:32b # for the analyst python main.py # → writes output/pkv_report.md ``` -------------------------------- ### Start UI Development Server Source: https://github.com/alex8791-cyber/cognithor/blob/main/DEVELOPER.md Commands to install UI dependencies and launch the development server. ```bash cd ui npm install npm run dev # Starts Vite + auto-launches backend ``` -------------------------------- ### Install and Launch vLLM Server Source: https://github.com/alex8791-cyber/cognithor/blob/main/scripts/arc_agi3_live_validation.md Installs the vLLM library and starts the model server with specific memory utilization settings for an RTX 5090. ```bash # Install vLLM (OpenAI-compatible server) pip install vllm>=0.6.3 # Launch the FP8 model on the RTX 5090. Reserve 92 % of VRAM for # weights + KV-cache; reduce to 0.85 if you also need the GPU for # something else simultaneously. vllm serve Qwen/Qwen3.6-27B-FP8 \ --port 8000 \ --max-model-len 16384 \ --gpu-memory-utilization 0.92 \ --dtype auto ``` -------------------------------- ### Install Cognithor Source: https://github.com/alex8791-cyber/cognithor/blob/main/FAQ.md Standard installation procedure using the interactive script or manual virtual environment setup. ```bash git clone cognithor cd cognithor ./install.sh # Interactive installer (Linux/macOS) # or manually: python -m venv .venv source .venv/bin/activate # Linux/macOS .venv\Scripts\activate # Windows pip install -e ".[all,dev]" ``` -------------------------------- ### Run the First Crew Example Source: https://github.com/alex8791-cyber/cognithor/blob/main/examples/quickstart/01_first_crew/README.md Install dependencies, pull the required model, and execute the main script. ```bash pip install -r requirements.txt ollama pull qwen3:8b # one-time python main.py ``` -------------------------------- ### Local Ollama Setup Source: https://github.com/alex8791-cyber/cognithor/wiki/Getting-Started Pulls required models and starts the application locally. ```bash # Install Ollama (https://ollama.com) ollama pull qwen3:32b # Planner model (20GB VRAM) ollama pull qwen3:8b # Executor model (6GB VRAM) ollama pull nomic-embed-text # Embedding model (0.5GB VRAM) # Start Cognithor python -m jarvis ``` -------------------------------- ### Setup and Installation for ARC-AGI-3 Source: https://github.com/alex8791-cyber/cognithor/blob/main/docs/superpowers/reports/sprint11_arc_agi_3_complete.md Commands to clone the official harness and install Cognithor as an editable dependency. ```bash # 1. Clone and bootstrap the harness git clone https://github.com/arcprize/ARC-AGI-3-Agents.git cd ARC-AGI-3-Agents uv sync # 2. Install Cognithor as an editable dependency uv pip install -e /path/to/cognithor # 3. Drop a registration shim into the harness: ``` -------------------------------- ### Quick Installation via Git Source: https://github.com/alex8791-cyber/cognithor/wiki/Getting-Started Clones the repository and installs the package with all dependencies. ```bash git clone https://github.com/Alex8791-cyber/cognithor.git cd cognithor pip install -e ".[all]" ``` -------------------------------- ### Install Cognithor from Source Source: https://github.com/alex8791-cyber/cognithor/blob/main/README.md Use these commands to clone the repository and run the interactive installer or perform a manual pip installation. ```bash # Clone git clone https://github.com/Alex8791-cyber/cognithor.git cd cognithor # Linux/macOS: Interactive installer (venv, Ollama, models, systemd) chmod +x install.sh && ./install.sh # Windows (from source): Double-click install.bat # Or manual: pip install pip install -e ".[all,dev]" ``` -------------------------------- ### Installation Extras Documentation Source: https://github.com/alex8791-cyber/cognithor/blob/main/docs/cognithor_refactor_prompt.md Document the installation process by explicitly listing the core engine and available extras to manage dependencies effectively. ```bash pip install cognithor # Core engine only: PGE, CLI, Ollama pip install cognithor[slack] # + Slack channel pip install cognithor[discord] # + Discord channel pip install cognithor[openai] # + OpenAI provider pip install cognithor[all] # Everything (large install) ``` -------------------------------- ### Tool Plan Examples Source: https://github.com/alex8791-cyber/cognithor/blob/main/FIRST_BOOT.md Example queries for triggering agent tool planning. ```text cognithor> Show me the files in my workspace. cognithor> What do you know about me? cognithor> Create a file with a checklist for new client meetings. ``` -------------------------------- ### Install and Run Voice Interface Source: https://github.com/alex8791-cyber/cognithor/wiki/Voice Installation command for voice dependencies and startup command for the application. ```bash pip install -e ".[voice]" python -m jarvis # Say "Jarvis" to activate ``` -------------------------------- ### Install Cognithor via script Source: https://github.com/alex8791-cyber/cognithor/blob/main/QUICKSTART.md Use the provided install script to set up the environment automatically. ```bash git clone cognithor cd cognithor chmod +x install.sh ./install.sh ``` -------------------------------- ### Installation Rules Source: https://github.com/alex8791-cyber/cognithor/blob/main/flutter_app/linux/CMakeLists.txt Defines the installation process for the application bundle, including libraries, assets, and plugins. ```cmake set(BUILD_BUNDLE_DIR "${PROJECT_BINARY_DIR}/bundle") if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) set(CMAKE_INSTALL_PREFIX "${BUILD_BUNDLE_DIR}" CACHE PATH "..." FORCE) endif() install(CODE " file(REMOVE_RECURSE \"${BUILD_BUNDLE_DIR}/\") " COMPONENT Runtime) set(INSTALL_BUNDLE_DATA_DIR "${CMAKE_INSTALL_PREFIX}/data") set(INSTALL_BUNDLE_LIB_DIR "${CMAKE_INSTALL_PREFIX}/lib") install(TARGETS ${BINARY_NAME} RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}" COMPONENT Runtime) install(FILES "${FLUTTER_ICU_DATA_FILE}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" COMPONENT Runtime) install(FILES "${FLUTTER_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" COMPONENT Runtime) foreach(bundled_library ${PLUGIN_BUNDLED_LIBRARIES}) install(FILES "${bundled_library}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" COMPONENT Runtime) endforeach(bundled_library) set(NATIVE_ASSETS_DIR "${PROJECT_BUILD_DIR}native_assets/linux/") install(DIRECTORY "${NATIVE_ASSETS_DIR}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" COMPONENT Runtime) set(FLUTTER_ASSET_DIR_NAME "flutter_assets") install(CODE " file(REMOVE_RECURSE \"${INSTALL_BUNDLE_DATA_DIR}/${FLUTTER_ASSET_DIR_NAME}\") " COMPONENT Runtime) install(DIRECTORY "${PROJECT_BUILD_DIR}/${FLUTTER_ASSET_DIR_NAME}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" COMPONENT Runtime) if(NOT CMAKE_BUILD_TYPE MATCHES "Debug") install(FILES "${AOT_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" COMPONENT Runtime) endif() ``` -------------------------------- ### Interactive Installer Source: https://github.com/alex8791-cyber/cognithor/wiki/Getting-Started Runs the interactive script to select installation profiles. ```bash ./scripts/install.sh ``` -------------------------------- ### Install and Test Pack Locally Source: https://github.com/alex8791-cyber/cognithor/blob/main/docs/superpowers/plans/2026-04-18-pack-sdk-documentation.md Commands to install a pack from a local directory and launch the Cognithor environment. ```bash cognithor pack install ~/.cognithor/packs/my-namespace/my-weather/ cognithor ``` -------------------------------- ### Install Cognithor from Source Source: https://github.com/alex8791-cyber/cognithor/wiki/Installation Clone the repository and install in editable mode with development dependencies. ```bash git clone https://github.com/Alex8791-cyber/cognithor.git cd cognithor pip install -e ".[all,dev]" ``` -------------------------------- ### Setup ElevenLabs TTS Source: https://github.com/alex8791-cyber/cognithor/wiki/Voice Installation and configuration for using the ElevenLabs cloud-based TTS service. ```bash pip install -e ".[elevenlabs]" ``` ```yaml voice: tts_backend: "elevenlabs" elevenlabs_api_key: "..." ``` -------------------------------- ### Run the tool example Source: https://github.com/alex8791-cyber/cognithor/blob/main/docs/quickstart/02-first-tool.en.md Execute the main script via the command line. ```bash python main.py # → word_count: 3 # → Registered: word_count — Count words in a text # → Input schema: {'type': 'object', 'properties': ..., 'required': ['text']} ``` -------------------------------- ### Install Minimal Dependencies Source: https://github.com/alex8791-cyber/cognithor/blob/main/FAQ.md Use this command if the full installation fails due to native compilation issues with optional dependencies. ```bash pip install -e ".[search,documents]" # Instead of [all] ``` -------------------------------- ### Install Channel Dependencies Source: https://github.com/alex8791-cyber/cognithor/blob/main/TROUBLESHOOTING.md Install necessary extras for Discord or Slack integration. ```bash pip install -e ".[discord]" # discord.py pip install -e ".[slack]" # slack-sdk ``` -------------------------------- ### Execute reset output example Source: https://github.com/alex8791-cyber/cognithor/blob/main/docs/superpowers/plans/2026-04-01-memory-preprocessing-pipeline.md Example output when running the script with the --execute flag. ```text File: C:\Users\ArtiCall\.cognithor\identity\jarvis\memories.json Total memories: 3172 Genesis (keep): 7 Cognithor (remove): 3165 Backup created: C:\Users\ArtiCall\.cognithor\identity\jarvis\memories.json.bak [OK] Reset complete. 7 genesis memories retained, 3165 removed. ``` -------------------------------- ### Add Cognithor.exe to Inno Setup Files Source: https://github.com/alex8791-cyber/cognithor/blob/main/docs/superpowers/plans/2026-04-17-windows-app-shell.md Include the compiled executable in the installer files section with a conditional check for existence. ```ini ; App shell (tray launcher) Source: "{#BuildDir}\Cognithor.exe"; DestDir: "{app}"; Components: core; Flags: ignoreversion; Check: FileExists(ExpandConstant('{#BuildDir}\Cognithor.exe')) ``` -------------------------------- ### Install Community Skills Source: https://github.com/alex8791-cyber/cognithor/blob/main/SKILLS_GUIDE.md Install a specific skill by name. Installed skills are stored in ~/.jarvis/skills/community/. ```text User > Installiere den Community-Skill "data-analysis" ``` ```python install_community_skill(name="data-analysis") ``` -------------------------------- ### Deploy Executable to Installer Directory Source: https://github.com/alex8791-cyber/cognithor/blob/main/docs/superpowers/plans/2026-04-17-windows-app-shell.md Copy the newly built executable into the installer build directory. ```bash cp launcher/Cognithor/bin/Release/net8.0-windows/win-x64/publish/Cognithor.exe installer/build/ ``` -------------------------------- ### Feature-Specific Installation Source: https://github.com/alex8791-cyber/cognithor/wiki/Getting-Started Installs specific subsets of features based on requirements. ```bash # Core only pip install -e . # With memory features pip install -e ".[memory]" # With voice pip install -e ".[voice]" # With Telegram channel pip install -e ".[telegram]" # With web UI pip install -e ".[web]" # Everything pip install -e ".[all]" ``` -------------------------------- ### Install the insurance-agent-pack Source: https://github.com/alex8791-cyber/cognithor/blob/main/examples/insurance-agent-pack/README.md Install the package directly from the local directory using pip. ```bash pip install ./examples/insurance-agent-pack ``` -------------------------------- ### Installation and Bundle Configuration Source: https://github.com/alex8791-cyber/cognithor/blob/main/flutter_app/windows/CMakeLists.txt Defines installation paths and rules for the application executable, Flutter assets, and native libraries. ```cmake set(BUILD_BUNDLE_DIR "$") # Make the "install" step default, as it's required to run. set(CMAKE_VS_INCLUDE_INSTALL_TO_DEFAULT_BUILD 1) if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) set(CMAKE_INSTALL_PREFIX "${BUILD_BUNDLE_DIR}" CACHE PATH "..." FORCE) endif() set(INSTALL_BUNDLE_DATA_DIR "${CMAKE_INSTALL_PREFIX}/data") set(INSTALL_BUNDLE_LIB_DIR "${CMAKE_INSTALL_PREFIX}") install(TARGETS ${BINARY_NAME} RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}" COMPONENT Runtime) install(FILES "${FLUTTER_ICU_DATA_FILE}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" COMPONENT Runtime) install(FILES "${FLUTTER_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" COMPONENT Runtime) if(PLUGIN_BUNDLED_LIBRARIES) install(FILES "${PLUGIN_BUNDLED_LIBRARIES}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" COMPONENT Runtime) endif() # Copy the native assets provided by the build.dart from all packages. set(NATIVE_ASSETS_DIR "${PROJECT_BUILD_DIR}native_assets/windows/") install(DIRECTORY "${NATIVE_ASSETS_DIR}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" COMPONENT Runtime) # Fully re-copy the assets directory on each build to avoid having stale files # from a previous install. set(FLUTTER_ASSET_DIR_NAME "flutter_assets") install(CODE " file(REMOVE_RECURSE \"${INSTALL_BUNDLE_DATA_DIR}/${FLUTTER_ASSET_DIR_NAME}\") " COMPONENT Runtime) install(DIRECTORY "${PROJECT_BUILD_DIR}/${FLUTTER_ASSET_DIR_NAME}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" COMPONENT Runtime) # Install the AOT library on non-Debug builds only. install(FILES "${AOT_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" CONFIGURATIONS Profile;Release COMPONENT Runtime) ``` -------------------------------- ### Install Cognithor on Bare-Metal Source: https://github.com/alex8791-cyber/cognithor/blob/main/deploy/README.md Execute the installation script on Ubuntu or Debian systems with options for domain configuration and TLS certificates. ```bash # Download and run sudo bash deploy/install-server.sh \ --domain jarvis.example.com \ --email admin@example.com # Or with self-signed certificate sudo bash deploy/install-server.sh \ --domain test.local \ --self-signed ``` -------------------------------- ### Procedure Trigger Examples Source: https://github.com/alex8791-cyber/cognithor/blob/main/FIRST_BOOT.md Example queries for triggering specific agent procedures. ```text cognithor> I have an appointment tomorrow with a new lead: John Smith, IT entrepreneur. cognithor> Prepare a meeting with TechCorp -- topic: cloud migration. cognithor> What's on the agenda today? ``` -------------------------------- ### Add Few-Shot Example to Decompose Prompt Source: https://github.com/alex8791-cyber/cognithor/blob/main/docs/superpowers/specs/2026-04-03-computer-use-2d-security-robustness-design.md Includes a content-extraction and file-writing example in the few-shot prompt configuration. ```json Beispiel fuer 'Lies 3 Nachrichten und speichere sie': [ {"name": "read_messages", "goal": "Lies die Nachrichten", "completion_hint": "Nachrichten sichtbar", "max_iterations": 10, "tools": ["computer_scroll", "extract_text"], "extract_content": true, "content_key": "messages", "output_file": ""}, {"name": "save_file", "goal": "Speichere in Datei", "completion_hint": "Datei geschrieben", "max_iterations": 5, "tools": ["write_file"], "extract_content": false, "content_key": "", "output_file": "messages_{date}.txt"} ] ``` -------------------------------- ### Activate Environment and Install Package Source: https://github.com/alex8791-cyber/cognithor/blob/main/FAQ.md Use these commands to ensure the virtual environment is active and the package is installed in editable mode. ```bash source .venv/bin/activate # or .venv\Scripts\activate on Windows pip install -e ".[all]" ``` -------------------------------- ### Install Cognithor Repository Source: https://github.com/alex8791-cyber/cognithor/blob/main/FIRST_BOOT.md Commands to clone the repository and set up the Python environment. ```bash # Clone the repository git clone cognithor cd cognithor # Recommended: Interactive installer ./install.sh # Or manually: python -m venv .venv source .venv/bin/activate pip install -e ".[all,dev]" ``` -------------------------------- ### Implement Pack Installed Page Source: https://github.com/alex8791-cyber/cognithor/blob/main/docs/superpowers/specs/2026-04-15-agent-pack-architecture-design.md Handles the post-purchase redirect, extracting order details and providing the user with CLI installation commands or direct download links. ```tsx export default function PackInstalledPage({ searchParams, }: { searchParams: { order_id?: string; token?: string }; }) { const { order_id, token } = searchParams; if (!order_id || !token) return ; const zipUrl = `https://assets.lemonsqueezy.com/${token}`; const installCmd = `cognithor pack install ${zipUrl}`; return (

Thanks for buying Reddit Lead Hunter Pro

Your order: {order_id}

Option 1 — One-line install

Paste this into your Cognithor CLI and hit enter. Done.

Option 2 — Download the zip manually

Download reddit-lead-hunter-pro.zip

Then run cognithor pack install ~/Downloads/reddit-lead-hunter-pro.zip

Save this email

Lemon Squeezy sent you a copy. Keep it for re-downloading the pack later.

); } ``` -------------------------------- ### Install Cognithor manually Source: https://github.com/alex8791-cyber/cognithor/blob/main/QUICKSTART.md Perform a manual installation using a virtual environment and pip. ```bash python -m venv .venv source .venv/bin/activate pip install -e ".[all,dev]" ``` -------------------------------- ### GET /api/v1/skill-registry/list Source: https://github.com/alex8791-cyber/cognithor/blob/main/FLUTTER_API_CONTRACT.md Lists installed skills. ```APIDOC ## GET /api/v1/skill-registry/list ### Description Lists installed skills. ### Method GET ### Endpoint /api/v1/skill-registry/list ``` -------------------------------- ### GET /api/v1/sessions/should-new Source: https://github.com/alex8791-cyber/cognithor/blob/main/FLUTTER_API_CONTRACT.md Checks if a new session should be started. ```APIDOC ## GET /api/v1/sessions/should-new ### Description Checks if a new session should be started. ### Method GET ### Endpoint /api/v1/sessions/should-new ### Parameters #### Query Parameters - **channel** (string) - Optional - Channel filter. - **timeout_minutes** (integer) - Optional - Timeout threshold. ``` -------------------------------- ### Install via Docker Compose Source: https://github.com/alex8791-cyber/cognithor/blob/main/docs/quickstart/00-installation.en.md Deployment method for headless or server environments. ```bash git clone https://github.com/Alex8791-cyber/cognithor.git cd cognithor docker compose up -d # → Ollama + Cognithor API on http://localhost:8741 ``` -------------------------------- ### Install Cognithor Beta Source: https://github.com/alex8791-cyber/cognithor/blob/main/CONTRIBUTING.md Commands to install the beta version of Cognithor either from a GitHub release wheel or from the source repository. ```bash # From the beta GitHub release: pip install https://github.com/Alex8791-cyber/cognithor/releases/download/v0.90.0-beta/cognithor-0.90.0-py3-none-any.whl # Or from source: git clone -b beta https://github.com/Alex8791-cyber/cognithor.git cd cognithor pip install -e ".[all]" ``` -------------------------------- ### Project Setup and Build Commands Source: https://github.com/alex8791-cyber/cognithor/blob/main/docs/superpowers/plans/2026-04-12-server-logs-in-ui.md Commands for creating the directory structure, building the web release, and committing changes. ```bash mkdir -p flutter_app/lib/widgets/monitoring ``` ```bash cd flutter_app && flutter build web --release 2>&1 | tail -3 ``` ```bash git add flutter_app/lib/widgets/monitoring/live_logs_tab.dart flutter_app/lib/screens/monitoring_screen.dart git commit -m "feat(flutter): add Live Logs tab to MonitoringScreen (#108)" ``` -------------------------------- ### Install Cognithor via PyPI Source: https://github.com/alex8791-cyber/cognithor/wiki/Installation Use pip to install the core package or specific feature sets. ```bash pip install cognithor # Core pip install cognithor[all] # All features pip install cognithor[full] # Everything incl. voice + PostgreSQL ``` -------------------------------- ### Launch Qwen3-VL-32B-Instruct with FP8 Source: https://github.com/alex8791-cyber/cognithor/blob/main/docs/superpowers/spikes/2026-05-04-qwen3-vl-quant-spike.md Recommended launch command for Qwen3-VL-32B-Instruct using FP8 quantization and KV cache optimization. ```bash # RECOMMENDED Qwen3-VL-32B-Instruct-FP8 default source vllm-env/bin/activate export HF_HOME=/home/articall/hf_cache export VLLM_USE_V1=1 # vLLM 0.6+ engine vllm serve Qwen/Qwen3-VL-32B-Instruct-FP8 \ --quantization fp8 \ --kv-cache-dtype fp8 \ --gpu-memory-utilization 0.93 \ --max-model-len 32768 \ --enable-prefix-caching \ --num-speculative-tokens 1 \ --port 8000 \ --served-model-name qwen3-vl-32b-fp8 \ --limit-mm-per-prompt '{"image":4,"video":1}' ``` -------------------------------- ### Create directory structure and copy icon Source: https://github.com/alex8791-cyber/cognithor/blob/main/docs/superpowers/plans/2026-04-17-windows-app-shell.md Initial setup commands to create the project directory and copy the application icon. ```bash mkdir -p "launcher/Cognithor/Resources" cp "flutter_app/windows/runner/resources/app_icon.ico" "launcher/Cognithor/Resources/app_icon.ico" ``` -------------------------------- ### Full tool registration and execution example Source: https://github.com/alex8791-cyber/cognithor/blob/main/docs/quickstart/02-first-tool.en.md A complete script demonstrating tool definition, direct execution, and registry discovery. ```python """First Tool — register a custom @tool via the Cognithor SDK.""" from __future__ import annotations import asyncio from cognithor.sdk import tool from cognithor.sdk.decorators import get_registry @tool(name="word_count", description="Count words in a text") async def word_count(text: str) -> int: return len(text.split()) async def main() -> None: # Callable directly — tools are regular coroutines. result = await word_count("Hello Cognithor world") print(f"word_count: {result}") # Discoverable via the SDK registry (for discovery / tool catalog). registry = get_registry() defn = registry.get_tool("word_count") assert defn is not None print(f"Registered: {defn.name} — {defn.description}") print(f"Input schema: {defn.input_schema}") if __name__ == "__main__": asyncio.run(main()) ``` -------------------------------- ### Tool Start Source: https://github.com/alex8791-cyber/cognithor/blob/main/FLUTTER_API_CONTRACT.md Indicates that a tool execution process has begun. ```json { "type": "tool_start", "tool": "web_search", "data": { "status": "Searching..." }, "session_id": "flutter_", "timestamp": "2026-03-17T12:34:56.789Z" } ``` -------------------------------- ### List Optional Dependencies Source: https://github.com/alex8791-cyber/cognithor/blob/main/TESTING.md Available extra dependencies for CI installation. ```text dev, memory, search, mcp, telegram, discord, slack, matrix, web, documents, cron, vector, postgresql, irc, twitch ``` -------------------------------- ### Initialize Development Environment Source: https://github.com/alex8791-cyber/cognithor/blob/main/DEVELOPER.md Commands to clone the repository, set up a virtual environment, install dependencies, and pull required Ollama models. ```bash # 1. Clone git clone https://github.com/Alex8791-cyber/cognithor.git cd cognithor # 2. Create virtual environment python -m venv .venv source .venv/bin/activate # Linux/macOS .venv\Scripts\activate # Windows # 3. Install in development mode (all extras) pip install -e ".[dev,search,documents,telegram,discord]" # 4. Pull required Ollama models ollama pull qwen3:8b # Executor ollama pull nomic-embed-text # Embeddings # 5. Run preflight check python scripts/preflight_check.py # 6. Start Cognithor python -m cognithor ``` -------------------------------- ### Switching LLM Providers Source: https://github.com/alex8791-cyber/cognithor/wiki/LLM-Providers Example of switching from a local Ollama setup to an OpenAI provider by updating the API key. ```yaml # Before: using Ollama locally # ollama running on localhost # After: switch to OpenAI openai_api_key: "sk-..." # Models auto-detected, no other changes needed ``` -------------------------------- ### Create project directory Source: https://github.com/alex8791-cyber/cognithor/blob/main/docs/quickstart/01-first-crew.en.md Initialize a new directory for the project and navigate into it. ```bash mkdir my_first_crew && cd my_first_crew ``` -------------------------------- ### Deploy on Bare-Metal Source: https://github.com/alex8791-cyber/cognithor/blob/main/QUICKSTART.md Command to execute the installation script on Ubuntu or Debian systems. ```bash sudo bash deploy/install-server.sh --domain cognithor.example.com --email admin@example.com ``` -------------------------------- ### Retrieve Loaded Packs via REST API Source: https://github.com/alex8791-cyber/cognithor/blob/main/docs/superpowers/specs/2026-04-16-deep-research-analyst-design.md Example response from the GET /api/v1/packs/loaded endpoint used to verify currently active packs. ```json { "packs": [ {"qualified_id": "cognithor-official/reddit-lead-hunter-pro", "version": "1.2.0"}, {"qualified_id": "cognithor-official/deep-research-analyst", "version": "1.0.0"} ] } ``` -------------------------------- ### Setup virtual environment Source: https://github.com/alex8791-cyber/cognithor/blob/main/docs/quickstart/00-installation.en.md Recommended practice for isolating dependencies using Python virtual environments. ```bash python -m venv .venv source .venv/bin/activate # Linux/macOS # or .venv\Scripts\activate # Windows pip install "cognithor[all]" ``` -------------------------------- ### Conventional Commit Examples Source: https://github.com/alex8791-cyber/cognithor/blob/main/CONTRIBUTING.md Examples of conventional commit messages. ```text feat: Add Grok-4 model defaults to xAI provider config fix: Correct Python version check in deploy script ``` -------------------------------- ### Initialize ArcVisionGuide class Source: https://github.com/alex8791-cyber/cognithor/blob/main/docs/superpowers/specs/2026-04-04-arc-agi3-vision-guided-design.md Sets up the vision guide with model configuration and internal state tracking for adaptive call intervals. ```python class ArcVisionGuide: """Consults qwen3-vl:32b to understand game frames and suggest actions.""" def __init__(self, model: str = "qwen3-vl:32b", call_interval: int = 50): self.model = model self.call_interval = call_interval self._steps_since_last_call = 0 self._pixels_since_last_call = 0 self._last_strategy: dict | None = None self._call_count = 0 ``` -------------------------------- ### Manage Models via CLI Source: https://github.com/alex8791-cyber/cognithor/blob/main/CONFIG_REFERENCE.md Commands for listing and installing models from the registry or HuggingFace. ```bash cognithor models list # show the registry cognithor models install qwen3.6:35b # pull an Ollama tag cognithor models install unsloth/Qwen3.6-27B-GGUF # HF GGUF → Ollama via ollama create ``` -------------------------------- ### Verify Installation Source: https://github.com/alex8791-cyber/cognithor/blob/main/skills/test/SKILL.md Command to verify the installation of the Cognithor package and its dependencies. ```bash pip install -e ".[all]" ``` -------------------------------- ### Install vLLM Source: https://github.com/alex8791-cyber/cognithor/blob/main/docs/superpowers/reports/sprint10_track_b_vllm_deployment.md Install the required vLLM version via pip. ```bash pip install vllm==0.6.3 # or build from source for cutting-edge model support ``` -------------------------------- ### Launch vLLM Server Source: https://github.com/alex8791-cyber/cognithor/blob/main/docs/superpowers/reports/sprint10_track_b_vllm_deployment.md Start the vLLM server with specific quantization settings for different VRAM constraints. ```bash # Q5_K_M quantisation (preferred): vllm serve sakamakismile/Qwen3.6-27B-NVFP4 \ --quantization awq \ --port 8000 \ --max-model-len 8192 \ --gpu-memory-utilization 0.92 # Or Q4_K_M fallback for tighter VRAM: vllm serve Qwen/Qwen3.6-27B \ --quantization awq \ --port 8000 \ --max-model-len 4096 \ --gpu-memory-utilization 0.85 ``` -------------------------------- ### Install ARC Dependencies Source: https://github.com/alex8791-cyber/cognithor/blob/main/README.md Install the necessary dependencies for ARC-AGI-3 functionality. ```bash pip install cognithor[arc] ``` ```bash pip install cognithor[arc-gpu] ``` -------------------------------- ### Start Ollama service Source: https://github.com/alex8791-cyber/cognithor/blob/main/QUICKSTART.md Launch the Ollama server if it is not already running. ```bash ollama serve ``` -------------------------------- ### Start Media Services Source: https://github.com/alex8791-cyber/cognithor/blob/main/docs/superpowers/plans/2026-04-23-video-input-vllm.md Asynchronous startup sequence for the media server and cleanup worker. ```python if self._media_server is not None: port = await self._media_server.start() if self._vllm_orchestrator is not None: self._vllm_orchestrator.media_url = f"http://host.docker.internal:{port}" if self._video_cleanup is not None: await self._video_cleanup.start() ``` -------------------------------- ### File Backend Initialization Source: https://github.com/alex8791-cyber/cognithor/blob/main/docs/superpowers/plans/2026-03-29-vault-dual-backend.md Initial imports and setup for the file-based vault backend. ```python """Vault File Backend — Obsidian-compatible .md files on disk.""" from __future__ import annotations import json import re from pathlib import Path from typing import Any ``` -------------------------------- ### Example interaction Source: https://github.com/alex8791-cyber/cognithor/blob/main/skills/test_skill/SKILL.md A sample interaction demonstrating successful discovery, matching, and execution. ```text User > cognithor test_skill Prüfe den Lifecycle Cognithor > {"status": "ok", "result": "TODO"} # Success: skill was discovered, matched, and executed asynchronously ``` -------------------------------- ### Direct Answer Examples Source: https://github.com/alex8791-cyber/cognithor/blob/main/FIRST_BOOT.md Example queries for direct information retrieval. ```text cognithor> What is a REST API? cognithor> Explain the difference between Docker and Podman. cognithor> How are you? ``` -------------------------------- ### Update Inno Setup Run Section Source: https://github.com/alex8791-cyber/cognithor/blob/main/docs/superpowers/plans/2026-04-17-windows-app-shell.md Configure the post-install behavior to launch the application shell. ```ini [Run] ; Post-install: offer to start Cognithor Filename: "{app}\Cognithor.exe"; Description: "Start Cognithor"; \ Flags: nowait postinstall skipifsilent; Check: FileExists(ExpandConstant('{app}\Cognithor.exe')) ``` -------------------------------- ### CLI Launch Source: https://github.com/alex8791-cyber/cognithor/blob/main/FIRST_BOOT.md Start the Cognithor agent using the command line interface. ```bash python -m jarvis ``` -------------------------------- ### Smoke-test the tool Source: https://github.com/alex8791-cyber/cognithor/blob/main/examples/quickstart/02_first_tool/README.md Install testing dependencies and run the provided test suite. ```bash pip install pytest pytest-asyncio python -m pytest test_example.py -v ``` -------------------------------- ### Commit installer changes Source: https://github.com/alex8791-cyber/cognithor/blob/main/docs/superpowers/plans/2026-04-12-server-logs-in-ui.md Git commands to stage and commit the installer modifications. ```bash git add installer/build_installer.py git commit -m "feat(installer): use pythonw.exe for invisible backend in --ui mode (#108)" ``` -------------------------------- ### Run Development Environment Source: https://github.com/alex8791-cyber/cognithor/blob/main/flutter_app/README.md Commands to initialize dependencies and launch the application in a browser with hot reload enabled. ```bash cd flutter_app flutter pub get flutter run -d chrome # Development with hot reload ``` -------------------------------- ### Deploy with Docker Compose Source: https://github.com/alex8791-cyber/cognithor/blob/main/docs/quickstart/05-deployment.en.md Set up a production-ready environment including Ollama, Redis, and Cognithor. ```bash git clone https://github.com/Alex8791-cyber/cognithor.git cd cognithor cp .env.example .env # edit .env — COGNITHOR_API_PORT=8741, etc. docker compose up -d docker compose logs -f cognithor ``` -------------------------------- ### Deploy with Docker Source: https://github.com/alex8791-cyber/cognithor/blob/main/QUICKSTART.md Commands to initialize environment variables and start the production container stack. ```bash cp .env.example .env # Edit: set JARVIS_API_TOKEN docker compose -f docker-compose.prod.yml up -d # Optional: add PostgreSQL or Nginx docker compose -f docker-compose.prod.yml --profile postgres --profile nginx up -d ``` -------------------------------- ### Install Cognithor Python Package Source: https://github.com/alex8791-cyber/cognithor/blob/main/extensions/vscode/docs/IDE_COMPAT.md Install the required Python package on the system PATH. ```bash pip install --upgrade cognithor ``` -------------------------------- ### Commit Installer Changes Source: https://github.com/alex8791-cyber/cognithor/blob/main/docs/superpowers/plans/2026-04-17-windows-app-shell.md Version control command to save changes to the installer script. ```bash git add installer/cognithor.iss git commit -m "feat(installer): switch shortcuts from .bat to Cognithor.exe" ``` -------------------------------- ### Initialize RedditLeadService Source: https://github.com/alex8791-cyber/cognithor/blob/main/docs/superpowers/plans/2026-04-09-reddit-lead-hunter-backend.md Constructor for setting up the service with database path, LLM function, and configuration for product details and reply tone. ```python def __init__( self, db_path: str, llm_fn: Callable[..., Awaitable[dict[str, Any]]] | None = None, product_name: str = "", product_description: str = "", reply_tone: str = "helpful, technically credible, no sales pitch", browser_agent: Any = None, notification_callback: Callable[[Lead], None] | None = None, ) -> None: self._store = LeadStore(db_path) self._scanner = RedditScanner(llm_fn=llm_fn) self._poster = ReplyPoster(browser_agent=browser_agent) self._notification_cb = notification_callback self._scan_config = ScanConfig( product_name=product_name, product_description=product_description, reply_tone=reply_tone, ) ``` -------------------------------- ### Install Cognithor v0.94.0 Source: https://github.com/alex8791-cyber/cognithor/blob/main/docs/marketing/v0.94.0-launch-copy.md Use pip to install the latest version of the Cognithor package. ```bash pip install cognithor==0.94.0 ``` -------------------------------- ### Install Cognithor in editable mode Source: https://github.com/alex8791-cyber/cognithor/blob/main/TROUBLESHOOTING.md Resolves ModuleNotFoundError by installing the package in editable mode. ```bash pip install -e ".[dev]" ``` -------------------------------- ### Initialize SDK Package Source: https://github.com/alex8791-cyber/cognithor/blob/main/docs/superpowers/plans/2026-04-18-pack-sdk-documentation.md Exposes core SDK components through the package's __init__.py file. ```python """Cognithor SDK — type stubs and interfaces for building agent packs. Usage: pip install cognithor-sdk from cognithor_sdk import AgentPack, PackContext, PackManifest from cognithor_sdk import LeadSource, Lead, LeadStatus """ from cognithor_sdk.interface import ( AgentPack, PackContext, PackManifest, PricingTier, Publisher, RevenueShare, ) from cognithor_sdk.leads import Lead, LeadSource, LeadStatus __all__ = [ "AgentPack", "Lead", "LeadSource", "LeadStatus", "PackContext", "PackManifest", "PricingTier", "Publisher", "RevenueShare", ] ``` -------------------------------- ### Initialize LeadStore implementation Source: https://github.com/alex8791-cyber/cognithor/blob/main/docs/superpowers/plans/2026-04-09-reddit-lead-hunter-backend.md Boilerplate code for the LeadStore module using SQLite. ```python """SQLite-backed lead persistence with encryption support.""" from __future__ import annotations import json import sqlite3 import time from typing import Any from jarvis.social.models import Lead, LeadStats, LeadStatus, ScanResult from jarvis.utils.logging import get_logger log = get_logger(__name__) ``` -------------------------------- ### Run QuantTrio/Qwen3.6-35B-A3B-AWQ in Docker Source: https://github.com/alex8791-cyber/cognithor/blob/main/docs/superpowers/spikes/2026-04-23-video-input-vllm-spike-findings.md Deployment command for the 35B AWQ model, currently in progress. ```bash docker run -d --name vllm-spike --gpus all \ --add-host host.docker.internal:host-gateway \ -v cognithor-spike-hf-cache:/root/.cache/huggingface \ -p 8765:8000 \ vllm/vllm-openai:v0.19.1 \ --model QuantTrio/Qwen3.6-35B-A3B-AWQ \ --max-model-len 65536 \ --kv-cache-dtype auto \ --enforce-eager \ --gpu-memory-utilization 0.90 \ --reasoning-parser qwen3 \ --trust-remote-code \ --media-io-kwargs '{"video": {"num_frames": -1}}' ``` -------------------------------- ### Initialize Registry Signing Keys Source: https://github.com/alex8791-cyber/cognithor/blob/main/scripts/registry_signing/README.md Generate initial Root and Targets keypairs on an offline machine and sign the initial root.json file. ```bash # All on an offline machine. python scripts/registry_signing/generate_root_key.py --out-dir ./keys/root python scripts/registry_signing/generate_targets_key.py --out-dir ./keys/targets # Sign the initial root.json delegating to the brand-new Targets key. python scripts/registry_signing/sign_root.py \ --root-key ./keys/root/root_private.pem \ --targets-pubkey ./keys/targets/targets_public.b64 \ --version 1 \ --valid-days 365 \ --min-client-version 0.97.0 \ --out ./registry/root.json ``` -------------------------------- ### Install cognithor-bench Source: https://github.com/alex8791-cyber/cognithor/blob/main/cognithor_bench/README.md Install the package in editable mode, optionally including the AutoGen adapter dependency. ```bash pip install -e . # Optional: pull the AutoGen adapter dependency pip install -e ".[autogen]" ``` -------------------------------- ### Start Cognithor Source: https://github.com/alex8791-cyber/cognithor/wiki/Installation Launch the application using the CLI or the Python module with optional flags. ```bash cognithor # Interactive CLI python -m jarvis # Alternative (always works) python -m jarvis --lite # Lite mode (6 GB VRAM) ``` -------------------------------- ### Configure vLLM for Qwen3-VL-32B-Instruct-FP8 Source: https://github.com/alex8791-cyber/cognithor/blob/main/docs/superpowers/spikes/2026-05-04-qwen3-vl-quant-spike.md Recommended launch parameters for vLLM to optimize memory usage and performance on an RTX 5090. ```bash --quantization fp8 --kv-cache-dtype fp8 --max-model-len 32768 --gpu-memory-utilization 0.93 --enable-prefix-caching ``` -------------------------------- ### Initialize cognithor_home Source: https://github.com/alex8791-cyber/cognithor/blob/main/docs/quickstart/07-troubleshooting.en.md Commands to bootstrap or reset the Cognithor configuration directory. ```text RuntimeWarning: cognithor config load failed (...); using temp-dir tool registry ``` ```bash # One-time bootstrap initialization cognithor --init-only # Or: manually nuke if corrupted rm -rf ~/.cognithor/.cognithor_initialized cognithor --init-only ``` -------------------------------- ### StrategyPlanner Unit Test Setup Source: https://github.com/alex8791-cyber/cognithor/blob/main/docs/superpowers/plans/2026-03-28-evolution-phase5a-data-model-strategy-planner.md Initial test setup for the StrategyPlanner using pytest fixtures. ```python # tests/unit/test_strategy_planner.py """Tests fuer StrategyPlanner.""" from __future__ import annotations import json from unittest.mock import AsyncMock import pytest from jarvis.evolution.models import LearningPlan, SeedSource from jarvis.evolution.strategy_planner import StrategyPlanner @pytest.fixture() def mock_llm(): """LLM function that returns valid plan JSON.""" ``` -------------------------------- ### Commit Installer Changes Source: https://github.com/alex8791-cyber/cognithor/blob/main/docs/superpowers/plans/2026-04-23-video-input-vllm.md Run linting and commit the installer build script and CI workflow updates. ```bash python -m ruff check installer/build_installer.py git add installer/build_installer.py .github/workflows/build-windows-installer.yml git commit -m "feat(installer): bundle LGPL ffmpeg for Windows + CI verification step" ``` -------------------------------- ### Build the application Source: https://github.com/alex8791-cyber/cognithor/blob/main/docs/superpowers/plans/2026-04-17-windows-app-shell.md Compiles the project using the .NET CLI. ```bash cd launcher/Cognithor dotnet build ``` -------------------------------- ### Initialize SDK directory structure Source: https://github.com/alex8791-cyber/cognithor/blob/main/docs/superpowers/plans/2026-04-18-pack-sdk-documentation.md Create the base directory for the Cognithor SDK source files. ```bash mkdir -p "D:/Jarvis/jarvis complete v20/sdk/src/cognithor_sdk" ``` -------------------------------- ### Install optional dependencies Source: https://github.com/alex8791-cyber/cognithor/blob/main/TROUBLESHOOTING.md Installs specific optional features required for functionality like Telegram integration. ```bash pip install -e ".[telegram]" ``` -------------------------------- ### Install Voice Dependencies Source: https://github.com/alex8791-cyber/cognithor/wiki/Voice Commands to install core voice processing libraries and optional ElevenLabs support. ```bash # Core voice pip install -e ".[voice]" # Includes: faster-whisper, piper-tts, sounddevice, webrtcvad # ElevenLabs (optional) pip install -e ".[elevenlabs]" ``` -------------------------------- ### First Boot Expected Output Source: https://github.com/alex8791-cyber/cognithor/blob/main/FIRST_BOOT.md Example of the console output indicating a successful system check. ```text +----------------------------------------------+ | Cognithor - First Boot | | First start with real Ollama | +----------------------------------------------+ -------------------------------------------------- 1. System Check -------------------------------------------------- [OK] Python 3.12.x [OK] jarvis package importable [OK] Ollama binary found [OK] GPU: NVIDIA GeForce RTX 5090 -- 32 GB total, 28.5 GB free ... [OK] FIRST BOOT SUCCESSFUL 12/12 checks passed Cognithor is ready! Start with: start_cognithor.bat (or: python -m jarvis) ``` -------------------------------- ### Install Claude Code Bridge Source: https://github.com/alex8791-cyber/cognithor/blob/main/contrib/claude-code-bridge/README.md Run the installer script to automatically configure ~/.claude/settings.json with the necessary hooks. ```bash python contrib/claude-code-bridge/install.py ``` -------------------------------- ### Verify gateway integration Source: https://github.com/alex8791-cyber/cognithor/blob/main/docs/superpowers/plans/2026-03-27-evolution-phase1-system-detector.md Commands to verify the gateway startup and run unit tests. ```bash cd "D:\Jarvis\jarvis complete v20" && python -c "from jarvis.gateway.gateway import Gateway; print('OK')" python -m pytest tests/unit/ -q --tb=short ``` -------------------------------- ### Create documentation directory Source: https://github.com/alex8791-cyber/cognithor/blob/main/docs/superpowers/plans/2026-04-18-pack-sdk-documentation.md Create the directory structure for the new packs documentation. ```bash mkdir -p "D:/Jarvis/cognithor-site/content/docs/packs" ``` -------------------------------- ### Initialize and Launch Cognithor Source: https://github.com/alex8791-cyber/cognithor/blob/main/docs/index.html Commands to clone the repository, install dependencies, pull required Ollama models, and launch the agent in full or lite mode. ```bash # Clone & install git clone https://github.com/Alex8791-cyber/cognithor.git cd cognithor pip install -e ".[all,dev]" # Pull local models (Ollama) ollama pull qwen3:32b # Planner (20 GB VRAM) ollama pull qwen3:8b # Executor (6 GB VRAM) ollama pull qwen3-embedding:0.6b # Embeddings # Launch cognithor # Full mode cognithor --lite # 6 GB VRAM mode ``` -------------------------------- ### Dry run output example Source: https://github.com/alex8791-cyber/cognithor/blob/main/docs/superpowers/plans/2026-04-01-memory-preprocessing-pipeline.md Example output when running the script without the --execute flag. ```text File: C:\Users\ArtiCall\.cognithor\identity\jarvis\memories.json Total memories: 3172 Genesis (keep): 7 Cognithor (remove): 3165 [DRY RUN] No changes made. Use --execute to perform the reset. ``` -------------------------------- ### Implement MediaUploadServer start and stop methods Source: https://github.com/alex8791-cyber/cognithor/blob/main/docs/superpowers/plans/2026-04-23-video-input-vllm.md Defines the server lifecycle, including ephemeral port selection and FastAPI app configuration. ```python async def start(self) -> int: """Bind to 127.0.0.1:, serve /media/. as static files. Returns the bound port. Call `await stop()` at shutdown. """ # Pick an ephemeral port ourselves so we can tell the orchestrator before # uvicorn actually binds (uvicorn accepts 0 but only reports after start). with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as probe: probe.bind(("127.0.0.1", 0)) self._port = probe.getsockname()[1] app = FastAPI(title="Cognithor MediaUploadServer", openapi_url=None, docs_url=None) @app.get("/media/{filename}") async def serve(filename: str) -> FileResponse: # Very strict: no paths, only flat . names if "/" in filename or ".." in filename: raise HTTPException(status_code=400, detail="invalid filename") path = self._media_dir / filename if not path.is_file(): raise HTTPException(status_code=404, detail="not found") return FileResponse(path) config = uvicorn.Config( app, host="127.0.0.1", port=self._port, log_level="warning", access_log=False, ) self._server = uvicorn.Server(config) self._serve_task = asyncio.create_task(self._server.serve()) # Wait for startup (server.started flips true when uvicorn is ready) for _ in range(50): if self._server.started: break await asyncio.sleep(0.05) log.info("media_server_started", port=self._port) return self._port async def stop(self) -> None: """Shut down the uvicorn serving loop. Idempotent.""" if self._server is None: return self._server.should_exit = True try: await self._serve_task except Exception as exc: log.warning("media_server_stop_error", error=str(exc)) self._server = None self._serve_task = None log.info("media_server_stopped") ``` -------------------------------- ### Install FFmpeg for Video Processing Source: https://github.com/alex8791-cyber/cognithor/blob/main/docs/vllm-user-guide.md Commands to install FFmpeg on Linux or macOS to enable video duration detection. ```bash apt install ffmpeg ``` ```bash brew install ffmpeg ``` -------------------------------- ### Gatekeeper Integration Examples Source: https://github.com/alex8791-cyber/cognithor/blob/main/docs/cognithor_refactor_prompt.md Examples showing how to replace legacy regex checks with AST-based security analysis in the Gatekeeper. ```python if any(re.search(pat, code) for pat in _DANGEROUS_PYTHON_PATTERNS): raise SecurityViolation(f"Dangerous pattern detected in code block") ``` ```python from cognithor.security.python_ast_guard import analyse_python, Violation violations = analyse_python(code) if violations: details = "; ".join(v.detail for v in violations) raise SecurityViolation( f"Security analysis found {len(violations)} violation(s): {details}" ) ``` ```python if _file_command_pattern.search(shell_cmd): raise SecurityViolation("Blocked file command in shell string") ``` ```python from cognithor.security.shell_ast_guard import analyse_shell, ShellViolation violations = analyse_shell(shell_cmd) if violations: details = "; ".join(v.detail for v in violations) raise SecurityViolation( f"Shell security analysis found {len(violations)} violation(s): {details}" ) ``` -------------------------------- ### Run full test suite Source: https://github.com/alex8791-cyber/cognithor/blob/main/docs/superpowers/plans/2026-04-19-observer-audit-layer.md Verify the changes with the full test suite after implementation. ```bash python -m pytest tests/ -x --tb=short ``` -------------------------------- ### Install Extension via CLI Source: https://github.com/alex8791-cyber/cognithor/blob/main/extensions/vscode/docs/IDE_COMPAT.md Install the Cognithor VSIX extension using the command line interface for specific IDEs. ```bash code --install-extension cognithor-vscode-.vsix ``` ```bash cursor --install-extension cognithor-vscode-.vsix ``` ```bash windsurf --install-extension cognithor-vscode-.vsix ```