MCPcopy Index your code
hub / github.com/Stanford-Trinity/ARTEMIS

github.com/Stanford-Trinity/ARTEMIS @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
2,722 symbols 7,604 edges 295 files 659 documented · 24%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

🏹 ARTEMIS

Automated Red Teaming Engine with Multi-agent Intelligent Supervision

ARTEMIS is an autonomous agent created by the Stanford Trinity project to automate vulnerability discovery.

Quickstart

Install uv if you haven't already:

curl -LsSf https://astral.sh/uv/install.sh | sh

Install the latest version of Rust (required for building):

# Remove old Rust if installed via apt
sudo apt remove rustc cargo
sudo apt install libssl-dev

# Install rustup (the official Rust toolchain installer)
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

# Restart shell or source the environment
source ~/.cargo/env

# Install latest stable Rust
rustup install stable
rustup default stable

First, we have to build the codex binary:

cargo build --release --manifest-path codex-rs/Cargo.toml

Now we can setup the Python environment:

uv sync
source .venv/bin/activate

Environment Configuration

Copy the example configuration and add your API keys:

cp .env.example .env
# Edit .env with your API keys

Required environment variables: - OPENROUTER_API_KEY or OPENAI_API_KEY - For the supervisor and LLM calls - SUBAGENT_MODEL - Model to use for spawned Codex instances (e.g., anthropic/claude-sonnet-4)

Quick Test Run

Try a simple CTF challenge to verify everything works:

python -m supervisor.supervisor \
  --config-file configs/tests/ctf_easy.yaml \
  --benchmark-mode \
  --duration 10 \
  --skip-todos

This runs a 10-minute test on an easy CTF challenge in benchmark mode (no triage process).

For detailed configuration options and usage, see supervisor-usage.md.


Docker

Docker Quickstart

Build the Docker image:

docker build -t artemis .

Environment Configuration

Same as above - copy the example configuration and add your API keys:

cp .env.example .env
# Edit .env with your API keys

Required environment variables: - OPENROUTER_API_KEY or OPENAI_API_KEY - For the supervisor and LLM calls - SUBAGENT_MODEL - Model to use for spawned Codex instances (e.g., anthropic/claude-sonnet-4)

Codex Configuration for OpenRouter

If using OpenRouter, you'll need to configure the codex binary. Create ~/.codex/config.toml:

mkdir -p ~/.codex
cat > ~/.codex/config.toml <<'EOF'
model_provider = "openrouter"

[model_providers.openrouter]
name = "OpenRouter"
base_url = "https://openrouter.ai/api/v1"
env_key = "OPENROUTER_API_KEY"

[sandbox]
mode = "workspace-write"
network_access = true
EOF

Running with Docker

Use the provided run_docker.sh script:

# Run with OpenRouter (mounts ~/.codex/config.toml)
./run_docker.sh openrouter

# Run with OpenAI only (no config mount needed)
./run_docker.sh openai

The script will: - Mount your ~/.codex/config.toml (if using OpenRouter) - Mount the ./logs directory for persistent logs - Use your .env file for API keys - Run a 10-minute test on an easy CTF challenge

Manual Docker Run:

If you prefer to run docker manually:

# With OpenRouter
docker run -it \
  --env-file .env \
  -v $HOME/.codex/config.toml:/root/.codex/config.toml:ro \
  -v $(pwd)/logs:/app/trinity/ARTEMIS/logs \
  artemis \
  python -m supervisor.supervisor \
    --config-file configs/tests/ctf_easy.yaml \
    --benchmark-mode \
    --duration 10 \
    --skip-todos

# With OpenAI only
docker run -it \
  --env-file .env \
  -v $(pwd)/logs:/app/trinity/ARTEMIS/logs \
  artemis \
  python -m supervisor.supervisor \
    --config-file configs/tests/ctf_easy.yaml \
    --benchmark-mode \
    --duration 10 \
    --skip-todos

Acknowledgments

This project uses OpenAI Codex as a base, forked from commit c221eab.


License

This repository is licensed under the Apache-2.0 License.

Extension points exported contracts — how you extend this code

ModelContextProtocolRequest (Interface)
Paired request/response types for the Model Context Protocol (MCP). [16 implementers]
codex-rs/mcp-types/src/lib.rs
HistoryCell (Interface)
Represents an event to display in the conversation history. Returns its `Vec >` representation to make it e [4 implementers]
codex-rs/tui/src/history_cell.rs
PullProgressReporter (Interface)
A simple observer for pull progress events. Implementations decide how to render progress (CLI, TUI, logs, ...). [2 implementers]
codex-rs/ollama/src/pull.rs
MutexExt (Interface)
A convenience extension trait for acquiring mutex locks where poisoning is unrecoverable and should abort the program. T [1 …
codex-rs/core/src/codex.rs
EventProcessor (Interface)
(no doc) [2 implementers]
codex-rs/exec/src/event_processor.rs
Reporter (Interface)
(no doc) [1 implementers]
codex-rs/file-search/src/lib.rs
ModelContextProtocolNotification (Interface)
One-way message in the Model Context Protocol (MCP). [9 implementers]
codex-rs/mcp-types/src/lib.rs
KeyboardHandler (Interface)
(no doc) [4 implementers]
codex-rs/tui/src/onboarding/onboarding_screen.rs

Core symbols most depended-on inside this repo

append
called by 174
codex-rs/mcp-types/generate_mcp_types.py
is_empty
called by 142
codex-rs/apply-patch/src/lib.rs
as_str
called by 129
codex-rs/core/src/turn_diff_tracker.rs
send
called by 122
codex-rs/tui/src/app_event_sender.rs
insert
called by 110
codex-rs/file-search/src/lib.rs
is_empty
called by 94
codex-rs/tui/src/bottom_pane/textarea.rs
assert_parsed
called by 79
codex-rs/core/src/parse_command.rs
set_cursor
called by 71
codex-rs/tui/src/bottom_pane/textarea.rs

Shape

Function 1,149
Method 962
Class 445
Enum 154
Interface 12

Languages

Rust93%
Python7%

Modules by API surface

codex-rs/mcp-types/src/lib.rs129 symbols
codex-rs/core/src/parse_command.rs93 symbols
codex-rs/tui/src/chatwidget.rs92 symbols
codex-rs/tui/src/bottom_pane/textarea.rs74 symbols
codex-rs/core/src/codex.rs72 symbols
codex-rs/protocol/src/protocol.rs62 symbols
codex-rs/tui/src/bottom_pane/chat_composer.rs57 symbols
codex-rs/apply-patch/src/lib.rs48 symbols
codex-rs/tui/src/history_cell.rs41 symbols
codex-rs/tui/src/bottom_pane/mod.rs41 symbols
codex-rs/protocol/src/mcp_protocol.rs38 symbols
codex-rs/login/src/lib.rs36 symbols

For agents

$ claude mcp add ARTEMIS \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact