๐ฎ Interaction Modes¶
Note
๐ Hey there! Siyarix is a personal passion project built by a single developer that is growing and under active development. Some of the architectural components and features described on this page might currently be Planned, Work in Progress, or basic implementations. Stay tuned as it evolves! ๐
Siyarix is designed to adapt to your workflow. We support four distinct interaction modes: REGISTRY, AUTONOMOUS, HYBRID, and INTERACTIVE.
These modes are available across our two primary interfaces: - ๐ป CLI: A powerful command-line interface with intuitive subcommands. - ๐ฌ REPL: An interactive, conversational shell for dynamic engagement.
Note
Mode selection typically happens at invocation time, but if you're using the REPL, you can easily switch modes on the fly using natural language commands!
๐๏ธ Mode Selection¶
๐ป CLI Mode¶
When invoking Siyarix from your terminal, the mode is seamlessly selected by the main_callback() function located in cli/main.py.
Here are a few examples of how you can invoke different modes:
# ๐ฏ Registry mode (default): Execute a single command from our template registry
siyarix scan 10.0.0.1
siyarix recon example.com
# ๐ค Autonomous mode: Let Siyarix achieve a goal autonomously
siyarix --mode autonomous "Enumerate all services on 10.0.0.0/24"
# ๐ฌ Interactive (REPL) mode: Jump into the conversational shell
siyarix --interactive
# or simply use the shorthand:
siyarix -i
# ๐ฆ Batch mode: Process a list of commands from stdin or a file
siyarix --batch commands.txt
# โน๏ธ Other useful commands
siyarix --version # Check your current version
siyarix --help # Display help and available options
๐ฌ REPL Mode Switching¶
Once inside the REPL, you don't need to memorize complex flags. You can seamlessly switch modes using natural language or simple slash commands:
โญโ Siyarix v2.0.0 โ INTERACTIVE โโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ โ
โ โน Type 'help' for commands, 'exit' to quit. โ
โ โน Use '/mode <mode>' or simply say: 'switch to autonomous'โ
โ โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
> switch to autonomous mode
โ Mode set to AUTONOMOUS โ I'll now operate autonomously.
> what mode am i in?
You're in AUTONOMOUS mode.
Tip
Natural language parsing makes mode switching incredibly fast and intuitive. Just talk to Siyarix like a human teammate!
โ๏ธ Mode Comparison¶
Wondering which mode is right for your current task? Here's a quick comparison to help you decide:
| Aspect | ๐ฏ REGISTRY | ๐ค AUTONOMOUS | ๐ค HYBRID | ๐ฌ INTERACTIVE |
|---|---|---|---|---|
| AI Required | No | Yes | Yes | Yes |
| User Approval | No | No | No | Yes (every step) |
| Planning | Heuristic templates | LLM-driven | LLM + Registry | Registry + Approval |
| Execution | Deterministic | Full Loop | Auto + Guided | Step-by-step |
| Best for | Known operations | Reconnaissance | Complex goals | Teaching & Auditing |
| Speed | โก Fastest | ๐ Fast | ๐ถ Moderate | ๐ข Slowest |
| Risk Profile | Low | Medium | Medium | Lowest |
| Autonomy Level | None | High | Medium | None |
1๏ธโฃ REGISTRY Mode (Default)¶
REGISTRY Mode executes commands using predefined plan templates directly from our tool registry. It operates completely independently of AI.
โจ Characteristics¶
- No AI Dependency: Works perfectly in air-gapped, offline, or degraded network environments.
- Deterministic: The same input will always produce the same plan. Reliability you can count on.
- Lightning Fast: Zero LLM latency ensures instant execution.
- Maximum Safety: No AI hallucination and zero unexpected behaviors.
๐ Execution Flow¶
Input (e.g., scan 10.0.0.1)
โ IntentRouter classifies intent as "scan"
โ RegistryPlanner finds match: "scan" โ ["nmap -sV 10.0.0.1", "nmap -sC 10.0.0.1"]
โ PermissionGate validates the action
โ RegistryExecutor safely runs the commands
โ Output is parsed, and findings are stored in the KnowledgeGraph
๐๏ธ Tool Hierarchy (RegistryPlanner)¶
To ensure robustness, templates are carefully organized with primary tools and built-in fallbacks (alternatives):
scan:
primary: nmap
alternatives: [masscan, rustscan]
commands:
- nmap -sV {target} -oX {output}
- nmap -sC {target} -oX {output}
Note
If the primary tool isn't installed or fails, Siyarix automatically attempts to use the listed alternatives.
2๏ธโฃ AUTONOMOUS Mode¶
AUTONOMOUS Mode is our full-autonomy engine. You provide the goal, and the AI handles the planning and execution loop without needing per-step confirmation.
โจ Characteristics¶
- Goal-Driven: Give Siyarix an objective, sit back, and let it work.
- LLM-Driven Planning: Plans are generated dynamically and adapt to real-time environmental feedback.
- Observe-Reason-Act (ORA) Loop: Features a continuous feedback cycle with integrated reflection for smart decision-making.
- Budget Enforcement: Strict token and cost limits are applied per session to prevent runaway tasks.
- Multi-Wave Execution: The agent progressively refines its understanding across multiple execution waves.
Warning
Because AUTONOMOUS mode operates independently, it carries a medium risk profile. Always ensure your target scopes and budgets are clearly defined!
๐ Execution Flow¶
Input ("Enumerate 10.0.0.1")
โ IntentRouter classifies the request
โ Context Manager builds the environmental context
โ AutonomousPlanner drafts the initial ExecutionPlan
โ PermissionGate & DLP (Data Loss Prevention) validate
โ AutonomousExecutor begins the ORA loop
โ Loops until: Objective Met / Max Iterations Hit / Budget Reached / User Interrupts
โ Generates a final summary and comprehensive report
๐ The Autonomous Loop in Action¶
Here is an example of how the AI reasons through a task:
Iteration 1: nmap -sV 10.0.0.1 โ finds ports 22, 80, 443 are open
โ Observe: Apache 2.4.41 running on port 80
โ Reason: Apache version is outdated and has known CVEs
โ Act: Execute `nikto -h 10.0.0.1:80`
Iteration 2: nikto discovers /phpmyadmin and /wp-admin
โ Observe: phpMyAdmin detected, WordPress installation found
โ Reason: phpMyAdmin is high-risk; the WordPress version is currently unknown
โ Act: Execute `curl /wp-json` to determine the WordPress version
Iteration 3: WordPress version identified as 5.6.2
โ Observe: Version 5.6.2 confirmed
โ Reason: Version 5.6.2 is vulnerable to known RCE CVEs (e.g., CVE-2021-29447)
โ Act: Verify if the target is in-scope for active exploitation
โ Conclusion: Objective achieved. Target fully enumerated. Report generated!
3๏ธโฃ HYBRID Mode¶
HYBRID Mode is the sweet spot. It offers a balanced approach by combining the dynamic reasoning of AI planning with the reliable reliability of registry fallbacks.
โจ Characteristics¶
- Default AI Mode: Automatically engaged when no explicit mode is selected but AI capabilities are active.
- Integrated Planner: Traditional registry templates are enriched and guided by LLM reasoning.
- Graceful Degradation: If the AI fails or loses connection, the system seamlessly falls back to the deterministic registry.
- Moderate Autonomy: The AI suggests the best steps, but you can always override them via the Permission Gate.
๐ Execution Flow¶
Input
โ IntentRouter
โ Context Manager builds context
โ Integrated Planner (Blends Registry + LLM Augmentation)
โ PermissionGate & DLP
โ AgentCore._execute_hybrid():
- Uses RegistryExecutor for known, predictable patterns
- Uses LLM augmentation for novel, complex situations
- Shifts to AutonomousExecutor when appropriate
โ Observe-Reason-Act (capped at limited iterations)
โ Final Report
4๏ธโฃ INTERACTIVE Mode¶
INTERACTIVE Mode puts you entirely in the driver's seat. Every single planned step requires your explicit confirmation before it executes.
โจ Characteristics¶
- Maximum Safety: You see and approve every command. Nothing happens without your green light.
- Educational: An incredible tool for learning, live demonstrations, and CTF (Capture The Flag) events.
- Audit-Friendly: Every step is transparent, reviewed, and logged.
- Slow & Steady: Operations are deliberate and step-by-step.
Tip
If you are learning a new tool or auditing a highly sensitive environment, INTERACTIVE mode is your best friend.
๐ Execution Flow¶
Input
โ IntentRouter
โ RegistryPlanner (Forced into INTERACTIVE mode)
โ PermissionGate & DLP
โ ๐ User Approval Prompt for EVERY step
โ RegistryExecutor runs the approved steps
โ Results displayed โ User decides the next action
๐๏ธ REPL Architecture¶
The REPL isn't just a basic prompt; it's a full-featured conversational shell housed in siyarix/chat/. Hereโs a breakdown of its core components:
| Module | Purpose |
|---|---|
repl.py |
The main entrypoint, handling the event loop and graceful Ctrl+C exits. |
engine.py |
ReplEngine: Processes messages, routes modes, and dispatches agents. |
console.py |
Manages gorgeous console formatting and theme applications. |
commands.py |
Handles built-in commands (e.g., /help, /mode, /theme, /export, /clear). |
handlers.py |
The message handler chain (Mode โ Command โ Intent โ Fallback). |
event_stream.py |
Manages real-time event streaming for silky-smooth LLM responses. |
ui.py |
Powers terminal UI elements like progress bars, spinners, and status bars. |
prompts.py |
Manages prompt templates and core system prompts. |
platform_utils.py |
Ensures cross-platform compatibility (clipboard, terminal size, OS detection). |
stubs.py |
Stub agents primarily used for quick demos and testing. |
openai_compat.py |
A streaming adapter ensuring OpenAI compatibility. |
session.py |
ChatSession: Handles conversation branching and exporting. |
๐ REPL Event Loop¶
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ REPL Event Loop โ
โ โ
โ Wait for user input (prompt_async) โ
โ โ โ
โ Check for built-in commands (/, exit) โ
โ โ โ
โ Check for natural language mode switch keywords โ
โ โ โ
โ Route to appropriate agent dispatch โ
โ โ โ
โ AgentCore.process_instruction() โ
โ โ โ
โ Display real-time streaming response โ
โ โ โ
โ Return to prompt โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
๐ฅ๏ธ A Glimpse of the Console¶
We take pride in our UI. Here is what you can expect to see in the terminal:
โญโ Siyarix v2.0.0 โ AUTONOMOUS โ 10.0.0.1 โโโโโโโโโโโโโโโโฎ
โ โ
โ โน [14:32:01] Starting autonomous reconnaissance... โ
โ โน [14:32:02] Mode: AUTONOMOUS | Target: 10.0.0.1 โ
โ โ
โ โญโ Plan โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ โ
โ โ Step 1: nmap -sV -sC -O 10.0.0.1 โ โ
โ โ Step 2: nikto -h 10.0.0.1 โ โ
โ โ Step 3: enum4linux -a 10.0.0.1 โ โ
โ โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ โ
โ โ
โ โ Step 1: nmap scanning... โ
โ โ Step 1 complete โ 6 open ports found โ
โ โ
โ โ Step 2: nikto scanning... โ
โ โ Step 2 complete โ 2 findings โ
โ โ
โ โญโ Findings โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ โ
โ โ 10.0.0.1:80 โ Apache 2.4.41 (CVE-2024-1234 Medium) โ โ
โ โ 10.0.0.1:443 โ OpenSSL 1.1.1 (CVE-2024-5678 High) โ โ
โ โ 10.0.0.1:22 โ OpenSSH 8.9p1 โ โ
โ โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ โ
โ โ
โ > _ โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
๐ช Onboarding Wizard¶
First time using Siyarix? If no settings.toml is found, Siyarix automatically launches the Onboarding Wizard (siyarix/onboarding.py). This interactive 11-step process ensures your environment is perfectly tuned:
| Step | Description |
|---|---|
| 0 | ๐ Welcome & Introduction |
| 1 | ๐จ Theme Selection (Live previews included!) |
| 2 | โ๏ธ Default Mode Selection |
| 3 | ๐ Provider Configuration (API Keys setup) |
| 4 | ๐งช Provider Testing (Verifies your connections) |
| 5 | ๐ก๏ธ Security Preferences (Auto-confirm settings, DLP sensitivity) |
| 6 | ๐ Output Preferences (Format and verbosity levels) |
| 7 | ๐ Path Configuration (Workspace, output dirs, offline store) |
| 8 | ๐ง Learning System (Opt-in/out of auto-suggestions) |
| 9 | ๐ Review Preferences Summary |
| 10 | โ Apply Configuration & Restart |
Info
The onboarding wizard is critical for securely handling your API keys and setting up your Data Loss Prevention (DLP) baseline. Don't skip the security preferences!
๐ฆ Batch Mode¶
Need to run Siyarix as part of a larger pipeline? Batch mode allows for robust, non-interactive execution from stdin or a provided file.
Each line in your file is processed as a completely separate instruction.
Tip
For seamless programmatic consumption in CI/CD or automation scripts, pair batch mode with the JSON output flag: --output-format json.
๐ ๏ธ REPL Built-in Commands Reference¶
Keep this handy! Here are the core built-in slash commands available within the REPL:
| Command | Aliases | Description |
|---|---|---|
/mode <mode> |
/m |
Switch your current agent mode |
/theme <theme> |
/t |
Change your UI theme on the fly |
/model <model> |
โ | Switch the active AI model |
/provider <provider> |
/p |
Switch your LLM provider |
/export <format> |
/e |
Export the current session data |
/clear |
/c |
Clear the current conversation history |
/save |
โ | Save your current session state |
/load <id> |
โ | Load a previously saved session |
/help |
/h, /? |
Display the help menu |
exit |
quit, /q |
Gracefully exit the REPL |