CLI AGENT · PYTHON · PLATFORM

From first prompt to system insight.

Installation, models, and workflows for the Anomx agent. These examples cover package version 0.2.34. The public API is under active development.

01. Quick start

You need Python 3.11 or newer and an interactive terminal. Install the package in a virtual environment:

python3 -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade anomx

Start the agent in the directory you want to work in:

anomx
  1. Connect a model provider during onboarding. Change it later with /config → Manage Backends.
  2. Choose an available model with /model. Start in Standard mode.
  3. Describe your question, for example: “Inspect the CSV files in this directory. Which channels show unusual behavior?”

Local analysis does not require a platform connection. A configured model provider is required. Cloud providers may have their own access requirements and usage costs.

02. Models & providers

Use /config → Manage Backends to configure provider access and /model to choose a model. /effort changes reasoning effort where supported by the provider.

ProviderCLI key
OpenAIopenai
Anthropicanthropic
Kimikimi
Ollamaollama
DESY Assistantdesy
JSC Blabladorblablador
anomx --provider openai

For Ollama, the local service must be running and the chosen model installed. Replace MODEL_ID with a model actually served by your provider:

anomx --ollama --model MODEL_ID

Startup flags: --provider, --model, --ollama, --home, --print-home, --no-color, --version. ANOMX_PROVIDER and ANOMX_MODEL supply startup defaults; explicit flags take precedence.

03. Execution modes

Press Shift+Tab to cycle through four interactive modes. The active mode appears in the prompt bar.

ModeBehavior
PlanRead operations only. No changes to files, processes, or platform state.
StandardDefault mode. Commands not already remembered as approved require permission.
AutomaticRead operations run automatically. The risk classifier approves low-risk commands; medium- and high-risk commands require permission.
AutonomousBypasses the command policy and approval prompts, including host-control and sudo commands. Choose deliberately in an appropriate environment.

Background is not part of the interactive mode cycle. It is activated by scheduled platform runs. Earlier labels such as Observer, Confirm, and Recommend are not current interactive modes.

04. Commands & skills

CommandPurpose
/newStart a new session
/renameRename the current session
/configManage backends, platform, skills, memories, instructions, sandbox, and settings
/modelChoose a model
/effortChoose reasoning effort
/feedbackSend feedback to the connected Anomx platform
/exitExit Anomx

Repeatable work as a skill

Manage your own skills with /config → Manage Skills. Platform skills include manage-data, retrieve-data, manage-jobs, manage-systems, manage-recommendations, and use-anomx-api. Their availability depends on the platform connection.

Interrupt work

While the agent is working, Ctrl+C or Ctrl+X requests an interruption. Confirm it when prompted by the interface. Esc returns to the previous view.

05. Connect the platform

  1. Open /config → Manage Platform.
  2. Enter your Anomx instance URL and sign in with your platform account.
  3. The platform issues a dedicated CLI-agent token. Requests stay linked to your user and organization context.

The connected agent can retrieve platform data, investigate jobs and systems, and work through permitted APIs. The local CLI and background agent share the agent foundation but have different execution policies.

06. Background agent

Configure a scheduled prompt in the platform. Describe what to monitor, the cadence, and the results that would be useful. Background runs work without interactive questions or approval dialogs.

What the agent can do

  • Read data, investigate system state, and inspect previous background runs.
  • Create recommendations by default, instead of making operational changes directly.
  • Directly create, update, or delete platform objects only when the team explicitly allows that operation for the object type.

Permissions, budgets, and history

Existing access permissions still apply. Background agents cannot change credentials or automation permissions. Hourly and daily token limits can pause runs; paused work is rechecked later. Earlier runs help avoid duplicate findings.

Background is not unattended full control of machines. File and process changes and arbitrary host commands are outside this mode. Direct control requires appropriate integrations and explicitly authorized execution paths.

07. Sessions & storage

The agent stores state under ~/.anomx by default. ANOMX_HOME or --home overrides this location.

anomx --print-home
PathContents
config.tomlSettings and model selection
auth.jsonProvider and platform authentication
brain/Durable local memories
skills/Custom skills
sessions/Session transcripts organized by date
session_index.jsonlIndex of saved sessions

auth.json and session transcripts may contain sensitive data. Keep them out of public repositories and unredacted support uploads.

08. Python API

The package provides reusable components for forecasting, reconstruction, and representation. Platform orchestration and persistence remain in the platform.

Detect isolated observations · synthetic example data
import pandas as pd
from anomx.components.models import IsolationForestModel

training = pd.DataFrame({
    "temperature": [20.0, 20.2, 19.9, 20.1, 20.3, 19.8],
    "flow": [10.0, 10.1, 9.9, 10.2, 10.0, 9.8],
})
observations = pd.DataFrame({
    "temperature": [20.1, 35.0],
    "flow": [10.1, 2.0],
})
model = IsolationForestModel({"random_state": 42})
model.fit(training)
result = model.predict(observations)
print(result[["model_score", "model_prediction"]])

Higher model_score values are more unusual. model_prediction is 1 for inliers and −1 for outliers. This small example illustrates the API; production models need representative training data and their own validation.

Optional model libraries

pip install "anomx[darts]"
pip install "anomx[torch]"

Darts extends forecasting workflows; PyTorch is required for TorchAutoencoderModel. PCA reconstruction and Isolation Forest are standard components.

Explore the three approaches interactively