This file provides instructions for AI agents working in this repository.
- Install:
uv sync --all-groups - Install (specific groups):
uv sync --group dev --group examples
- Build:
uv build - Lint:
uv run black --check .uv run flake8 .uv run mypy --config-file .mypy.ini .uv run bandit -c .bandit.yaml -r .
- Test:
- Run all tests:
uv run pytest - Run a single test file:
uv run pytest path/to/test_file.py - Run a single test function:
uv run pytest path/to/test_file.py::test_function
- Run all tests:
- Codestyle:
uv run black --check . && uv run flake8 . && uv run mypy --config-file .mypy.ini . && uv run bandit -c .bandit.yaml -r . - Pre-commit:
pre-commit run --all-files - Lock check:
uv lock --check
- Formatting: Use
blackfor code formatting. - Imports: Use
isortconventions (though not explicitly enforced). - Types: Use type hints for all function signatures.
- Naming: Follow PEP 8 naming conventions (snake_case for variables and functions, PascalCase for classes).
- Error Handling: Use try/except blocks for code that may raise exceptions.
- Dependencies: Use
uvfor dependency management. Add new dependencies topyproject.toml.
rogue/: The main Python package.tests/: Contains all tests.examples/: Example agent implementations..github/: CI/CD workflows.
- CLI:
uv run python -m rogue - With Example Agent:
uv run rogue-ai --example=tshirt_store(starts rogue with the t-shirt store example agent running on port 10001)
- T-Shirt Store:
uv run python -m examples.tshirt_store_agent - T-Shirt Store (via script):
uv run rogue-ai-example-tshirt(oruvx rogue-ai-example-tshirtif installed) - T-Shirt Store (all-in-one):
uv run rogue-ai --example=tshirt_store(starts rogue with the agent running automatically)- Custom host/port:
uv run rogue-ai --example=tshirt_store --example-host localhost --example-port 10001
- Custom host/port:
- T-Shirt Store (LangGraph):
uv run python -m examples.tshirt_store_langgraph_agent
- Evaluator Agent:
uv run python -m rogue.evaluator_agent - Prompt Injection Evaluator:
uv run python -m rogue.prompt_injection_evaluator
- Rogue Agent:
uv run python -m rogue.common.agent_model_wrapper - Rogue Agent with specific model:
uv run python -m rogue.common.agent_model_wrapper --model <model_name> - Rogue Agent with specific model and scenario:
uv run python -m rogue.common.agent_model_wrapper --model <model_name> --scenario <scenario_name> - Rogue Agent with specific model, scenario and retries:
uv run python -m rogue.common.agent_model_wrapper --model <model_name> --scenario <scenario_name> --retries <retries> - Rogue Agent with specific model, scenario, retries and log file:
uv run python -m rogue.common.agent_model_wrapper --model <model_name> --scenario <scenario_name> --retries <retries> --log-file <log_file> - Rogue Agent with specific model, scenario, retries, log file and config file:
uv run python -m rogue.common.agent_model_wrapper --model <model_name> --scenario <scenario_name> --retries <retries> --log-file <log_file> --config-file <config_file> - Rogue Agent with specific model, scenario, retries, log file, config file and output file:
uv run python -m rogue.common.agent_model_wrapper --model <model_name> --scenario <scenario_name> --retries <retries> --log-file <log_file> --config-file <config_file> --output-file <output_file> - Rogue Agent with specific model, scenario, retries, log file, config file, output file and workdir:
uv run python -m rogue.common.agent_model_wrapper --model <model_name> --scenario <scenario_name> --retries <retries> --log-file <log_file> --config-file <config_file> --output-file <output_file> --workdir <workdir>