Last updated

Agent Workspace

Interactive walkthrough: Inside RedAmon Agent

Watch the demo: RedAmon Agent Workspace: AI Runs 4 Parallel Pentests and Writes Its Own Report (YouTube) — one prompt, four concurrent job_spawn scans, live FileSystem Drawer activity, auto-generated notes/REPORT.md, and a downloadable evidence bundle. Shows every concept on this page in action against a deliberately vulnerable lab target.

The Agent Workspace is a per-project filesystem that the AI agent, your Kali sandbox, and you (through the web UI) all see at the same time. Every project gets its own isolated /workspace/<projectId>/ directory with five purpose-built folders, 24 filesystem tools the agent can call, 5 background-job tools for long-running scans, and a browser drawer to drag files in, preview results, monitor jobs, and download archives.

This page explains how to use the drawer, what every folder is for, and every workspace tool the agent has at its disposal.

Operator guide vs. technical deep dive. This page is the operator-facing guide — what the drawer looks like, what each folder is for, what every tool does. For implementation details (path validation, undo stacks, atomic writes, job lifecycle state machine), read agentic/workspace_fs.py and agentic/job_runner.py in the project repository.


Table of Contents

  1. What the Workspace Is
  2. Opening the FileSystem Drawer
  3. Workspace Layout — the Five Folders
  4. Files Tab — Walkthrough
  5. Jobs Tab — Walkthrough
  6. Uploading Files for the Agent
  7. Importing from a URL
  8. How the Agent Uses the Workspace
  9. Filesystem Tools Reference — 24 fs_*
  10. Background-Job Tools Reference — 5 job_*
  11. Tool-Output Auto-Offload
  12. Safety, Protected Paths, and Path Validation
  13. Next Steps

What the Workspace Is

Until v4.10.0, the agent reasoned over a graph database and a chat transcript, but had nowhere to persist intermediate work between turns. Long nuclei outputs blew up the LLM context window. Files you wanted the agent to read had to be pasted into the chat. Long-running scans blocked the agent from doing anything else until they finished. And there was no place for the agent to keep notes across iterations, so each session started from a blank slate.

The Agent Workspace closes every one of those gaps in one piece of infrastructure. It gives the agent a real working surface it can read, write, search, diff, and archive across iterations. It gives you a drag-and-drop inbox the agent checks on every turn, with a CHECK THESE NOW directive that pushes the agent to read what you just dropped before continuing whatever else it was doing. It gives long-running scans a background-job lane so the agent can spawn a 30-minute nuclei sweep, keep reasoning on a different angle of the target, and search the partial output mid-flight with fs_grep. And it auto-routes huge tool outputs to disk so the LLM gets a head/tail stub plus a file path instead of a 5 MB blob that would derail its reasoning or get truncated mid-sentence.

Everything is per-project. The workspace for project A is invisible to project B, and the path-validation layer rejects every traversal trick (see Safety, Protected Paths, and Path Validation).

What This Unlocks in Practice

A few scenarios that were painful or impossible before v4.10.0, and now just work:

Scenario 1: Multi-day investigation with continuity. You start a pentest on Monday. The agent maps the auth surface, finds three candidate CVEs, and drafts initial notes in notes/auth-surface.md and notes/cve-shortlist.md. On Tuesday you reopen the project, ask "where were we?", and the agent reads its own notes back and resumes exactly where it stopped, including the rationale for the candidates it shortlisted. No transcript scrolling, no re-explaining context, no lost reasoning when a session is closed.

Scenario 2: Custom credential or wordlist drop. You have a leaked employee list from a breach you are authorized to test against. Drag the .txt file into uploads/ (or into the wordlists folder's creds/users subfolder, where the agent's wordlists tool lists it as one of this project's lists). On the agent's next think step the workspace block surfaces the new file under CHECK THESE NOW. The agent reads it with fs_read, deduplicates against the graph's existing user nodes, and uses it as the seed for execute_hydra or a targeted OSINT pass. No copy-paste into chat, no truncation when the list is 50,000 lines long.

Scenario 3: Background nuclei scan with mid-flight triage. The agent needs to run a broad execute_nuclei template sweep that will take 30 minutes. It calls job_spawn, gets job_abc123 back, and immediately keeps working on a different angle of the target. Five minutes in, it runs fs_grep "critical|high" jobs/abc123.log to peek at hits so far, sees one CVE-2024-XXXX flagged, and pivots into manual verification of that finding while the bulk scan keeps running in the background. The blocking-sequential pattern is gone.

Scenario 4: Document-driven scoping. You upload the engagement's Rules of Engagement PDF or a vendor security advisory into uploads/. The agent reads it with fs_read, extracts the in-scope domains and prohibited techniques, drops a notes/roe-summary.md for itself, and references it on every subsequent decision. This complements rather than replaces the formal Rules of Engagement enforcement layer: RoE governs hard-coded scope at the tool executor; uploaded documents give the agent the softer context (business hours, contact escalation paths, customer-specific caveats) it needs to reason within those rails.

Scenario 5: Iterative payload crafting. The agent writes a candidate SSTI payload to notes/payloads/jinja2-rce.txt with fs_write, tests it via execute_curl, sees a sanitizer block one variant, uses fs_edit to tweak the encoding, tests again, then calls fs_undo_edit to roll back when the new version regresses. The payload's iteration history is preserved on disk for you to inspect, hand to a teammate, or paste into the final report.

Scenario 6: Pre-existing recon ingest. You already ran a Burp scan or have an nmap XML from a prior engagement window. Drop both into uploads/. The agent parses them with fs_read plus a quick fs_grep for findings of interest, cross-references against the live graph, and surfaces deltas: services present in the old export but missing now, new endpoints since the last sweep, ports that changed banners between scans. The agent does the diff so you don't have to.

Scenario 7: Fireteam coordination across specialists. A four-member fireteam wave deploys: one specialist on auth, one on routing, one on headers, one on JS recon. All four write to the same notes/ directory in parallel. Each member uses fs_diff vs_last_read to detect when another member has updated a shared file (notes/shared-context.md), avoiding lost-update races without needing explicit locks. The chat stays clean while the coordination happens through the filesystem. See Fireteam — Parallel Specialists for the wave-deployment model that makes this work.

Scenario 8: Huge tool output that would have killed context. execute_playwright returns a 4 MB DOM dump after a deep crawl. The auto-offload writes it to tool-outputs/2026-05-15T14-22-08Z-execute_playwright.txt. The LLM sees the file path plus a head/tail stub (the first 80 lines and last 40 lines, char-capped) and then surgically pulls only what it cares about with fs_grep "csrf|api_key|/admin" tool-outputs/.... Pre-workspace, that one tool call would have either truncated mid-sentence or eaten the entire context window.

Scenario 9: Long hydra brute-force without losing visibility. The agent spawns execute_hydra against a discovered SSH service as a background job. The drawer's Jobs tab shows it running with a live byte-count badge so you can see at a glance that the scan is still making progress. You click View log to jump straight to jobs/<id>.log and read live output without interrupting the agent. If the job goes sideways, Cancel stops it cleanly and the status flips to cancelled. If the agent container restarts mid-scan, the recover_on_boot hook flips orphan running jobs to interrupted so the UI never shows a forever-spinning row.

Scenario 10: Operator handoff at engagement end. You click the download icon on the workspace root and pull a tar.gz of the entire workspace to your laptop. Inside is the agent's complete working memory: every notes/ file, every offloaded scan output in tool-outputs/, every job log in jobs/, every artifact you uploaded. You hand it to a co-operator, attach it as supporting evidence to the engagement report, or archive it for the customer's record. Reproducible, auditable, no information loss.


Opening the FileSystem Drawer

There are two entry points for the FileSystem Drawer. Both open the same drawer; both close the Node Drawer first if it's open, to avoid overlap.

Entry pointLocation
Folder icon in the graph toolbarTop row of the Red Zone toolbar, near the AI Agent button. Always available.
Folder icon in the AI Agent drawer headerInside the AI Agent drawer header, to the left of the chat. Convenient when you're already chatting and want to drop a file mid-conversation.

The drawer slides in from the left side of the screen (the AI Agent drawer slides from the right), so you can have chat and files visible at the same time on a wide monitor. You can resize the drawer by dragging its right edge; the width is remembered per user.

The drawer has two tabs: Files and Jobs. Both auto-refresh every 5 seconds while open. The Jobs tab also receives instant job_update events over the agent WebSocket, so status flips are visible without waiting for the poll.

Agent Workspace — Files tab


Workspace Layout — the Five Folders

When a project is created, the workspace is empty. On first access, five subdirectories are auto-created. All five are protected: the drawer will refuse to rename or delete them, and the backend enforces the same rule (the lock badge in the UI is backed by a server-side check, not just a frontend hint). The files inside them remain fully editable — only the folders themselves are pinned.

FolderWhat it's forWho writes hereProtected?
notes/Agent scratch space — investigation notes, draft reports, generated payloads, anything the agent wants to keep across iterations.Agent (via fs_write / fs_edit) and you (via upload or rename into it).Folder yes, contents no
tool-outputs/Auto-managed. When a tool's stdout exceeds 20 KB, the executor writes it here as <utc-iso>-<tool>.txt and gives the LLM a head/tail stub plus the file path.The agent runtime (automatic).Folder yes, contents no
jobs/Auto-managed. Background-job logs (<job_id>.log) and metadata (<job_id>.meta.json). The agent reads these via job_status / job_wait or directly with fs_grep mid-flight.The job_runner (automatic).Folder yes, contents no
uploads/Your inbox for the agent. Drag files here for the agent to read on its next think step.You (via the drawer).Folder yes, contents no
wordlists/This project's own wordlists, each in the subfolder of its category (web/dirs, creds/passwords, ...), created when first needed. The agent's wordlists tool lists them for this project only, beside the built-in wordlist catalog.You (via the drawer) and the agent (for example cewl -w).Folder yes, contents no

The agent is taught this layout on every think step via the WORKSPACE_LAYOUT_BLOCK prepended to its prompt. When uploads/ holds files or folders, a separate inbox block adds a CHECK THESE NOW directive listing them (newest first, capped at 20), so the agent reads what you've just dropped before continuing whatever else it was doing.


Files Tab — Walkthrough

The Files tab is a familiar file-manager surface, scoped to the project workspace.

FeatureWhat it does
Breadcrumb navigationClick any path segment to jump back up the tree. The root crumb takes you to /workspace/<projectId>/.
Sort columnsClick Name, Size, or Modified to toggle ascending/descending. Directories are always grouped on top.
Filter boxReal-time, case-insensitive substring match on the current directory's entries.
Long foldersA folder lists its first 2,000 entries (folders first). When it holds more, a line under the list says "Showing the first N of M entries"; narrow the folder or download it. The filter searches only the entries shown.
Multi-selectCheckbox on each row plus a header checkbox for select-all. Selected rows are highlighted.
Drag-and-drop uploadDrop files or folders anywhere on the drawer to upload them into the current folder, or on a folder row to upload into that folder. A folder keeps its tree. See Uploading Files for the Agent.
Upload button and menuOne click on the upload icon opens the file picker. The chevron beside it opens a menu: Upload files…, Upload folder… and Upload archive and extract….
Inline previewClick any file row to open a preview pane. Text files render with syntax highlighting; binary files fall back to a base64 hex view. Hard cap of 1 MB so the drawer never hangs on a huge file.
Properties popoverThe info icon on each row opens a popover with size, mtime, mode (octal), SHA-256, and the symlink target if applicable.
Per-folder tar.gz downloadThe download icon on any folder row packages the entire subtree into a tar.gz stream — useful for shipping notes/ to a co-operator or grabbing all tool-outputs/. The archive is built on disk and streamed, so a big folder takes a moment before the download starts; when the disk lacks room for it, the download is refused with "not enough free disk space".
Rename inlinePencil icon on each row. Inline input field. Rejected on protected folders, on / or \ in the new name, and on .. segments.
DeleteTrash icon. Themed confirmation modal (not the native browser dialog). Recursive flag required when deleting a non-empty folder.
Bulk downloadWhen multiple rows are selected, the bulk-download button packages every selected path into a single tar.gz archive. Useful for pulling specific files from across the tree.
Bulk deleteSame selection model. Mixed selections that include protected folders are silently filtered — the confirmation modal explains exactly what will and won't be removed.
Lock badgesThe five default folders show a Lock badge so the protected-status is obvious before you try to rename or delete.
New FolderCreates a subdirectory in the current path. Parent directories auto-create if missing.

Every download (a file, a folder, a bulk selection) is streamed and saved as a file, never opened in the browser, so an HTML or SVG file from a target cannot run in RedAmon's page.

The Files tab auto-refreshes every 5 seconds while open. Refresh is paused while you have a preview open, so you don't get flicker on a file you're reading. Switching projects (via the project selector) resets the drawer state — preview, selection, filter, and current path all clear, so you never see project A's SHA-256 leak into project B's view.

File preview and properties


Jobs Tab — Walkthrough

The Jobs tab lists every background job ever spawned for this project, newest first.

ColumnWhat you see
ToolThe tool that was spawned (execute_nuclei, execute_curl, etc.), plus an optional human-readable label the agent set on job_spawn.
StatusColor-coded badge: running (yellow), done (green), failed (red), cancelled (orange), interrupted (gray — agent restart while it was running).
ElapsedWall-clock duration. Live for running jobs; frozen for terminal ones.
Log sizeCurrent byte count of jobs/<id>.log. Tells you at a glance whether a job is making progress.
ActionsView log jumps to the Files tab and opens jobs/<id>.log in the preview pane. Cancel is shown for running jobs only — themed confirm, then the asyncio task is cancelled and status flips to cancelled.

The Jobs tab also receives WebSocket job_update events pushed by the agent runtime whenever a job transitions (spawned → running → done/failed/cancelled). The 5-second poll is the fallback if the WebSocket isn't connected.

Jobs survive agent restarts: their <id>.meta.json is persisted to disk, so when the agent container reboots, orphan running jobs are flipped to interrupted by the recover_on_boot hook — they don't show up as forever-spinning in the UI.

Agent Workspace — Jobs tab


Uploading Files for the Agent

The uploads/ folder is your inbox for the agent. Typical things to drop here:

  • Credentials — a .env snippet, a SSH key, a service-account JSON.
  • Wordlists — a custom list of usernames or paths for fuzzing.
  • Screenshots — UI screenshots of an unauthenticated page you want the agent to reason about.
  • PDFs / docs — a vendor advisory, a target's privacy policy, an RoE document.
  • Existing recon output — a Burp export, a nmap XML, a Nuclei JSON.

On the agent's next think step, its prompt lists the contents of uploads/ (the newest 20 files and folders, folders shown as name/) under a CHECK THESE NOW directive, pushing the agent to read them with fs_read / fs_read_many, or fs_list / fs_tree for a folder, before doing anything else. The listing sits in the part of the prompt that is rebuilt on every step, so staging a file never invalidates the cached part of the prompt. You don't need to tell the agent in chat that you've dropped a file — but you can if you want extra steering ("the file I just uploaded is the production OpenAPI spec; map all endpoints from it").

Uploads are not limited to uploads/: any folder of the workspace can receive one, but only uploads/ is listed for the agent.

Ways to Upload

HowWhere it lands
Upload icon (one click) or Upload files…The file picker; the files go into the current folder.
Upload folder…A folder picker; the folder goes into the current folder with its whole tree, empty folders included.
Upload archive and extract…A zip, tar, tar.gz, tar.bz2 or tar.xz file, extracted on the server into a folder named after the archive (site.tar.gz becomes site/).
Drop on the drawerFiles and folders, into the current folder.
Drop on a folder rowFiles and folders, into that folder. The row highlights while you hover over it.

A file of 32 MiB or less is sent in one request, as before: when its name is taken you get the overwrite prompt. A larger file, a folder or an archive is sent in 8 MiB chunks, so the 60 MB request cap does not limit it, and a chunk that gets no answer is retried. The server then places it with Keep both: when the name is taken, the new copy is saved beside the old one as name-2 (then name-3, and so on), and nothing is overwritten.

Limits

LimitDefaultWhat happens
Size of one upload2 GiB (the archive, and its extracted content, each)Refused with "The content is larger than the server allows (too_large)".
Entries in one upload50,000Refused with too_many_entries; a folder over the limit is refused before any byte is sent.
Free diskThe scan floor (10 GiB, JOB_QUEUE_MIN_FREE_DISK) plus 1 GiB must remain free after the uploadA chunked upload is refused before any byte is sent, with "Not enough free disk space on the server (insufficient_storage)". The scan floor is the free space recon keeps for its scans, so an upload never stops a scan from starting.
Uploads placed at once4 per serverThe next one waits until one finishes.
The project's jobs/ folderA plain folderReplaced by a link or anything else (a Kali sandbox writes the project folder), it refuses every upload and import: "The project's jobs folder is not a plain folder (a link, say), so no upload or import can start. Remove it from the workspace" (jobs_folder_refused). A job log that cannot be created fails it with job_store_error.

The defaults are environment variables of the agent service; see README.DEV §8.

An archive is extracted with care: a path that leaves its folder (../evil.txt) refuses the whole archive with unsafe_path; links, devices and pipes inside it are skipped; and a name nested more than 64 levels deep, or too long, refuses it too. Nothing of a refused archive is written.

The Transfers Panel

Each upload sent in chunks appears in a Transfers panel above the file list:

  • Queued until it may send, then Uploading with the bytes sent so far; a Cancel button stays until it ends;
  • Waiting for the server… while the server has no free slot, then the server's phases: Extracting, Placing;
  • at the end: Saved as <path>, a link that opens the new folder or file, or the failure in a sentence with its code (unsafe_path, insufficient_storage, ...), so a screenshot names the cause.

At most two transfers send at once; the others wait their turn. The panel is kept per project, and Dismiss removes a finished line.

Agent Workspace — transfers panel

Leaving the Page During an Upload

The bytes come from your browser, so leaving the graph page stops every upload still sending them:

  • closing or reloading the tab first asks you to confirm;
  • the stopped uploads' partial files are deleted on the server. If the closing page could not reach the server, they are deleted the next time you open the graph page in that tab, or by the server after an hour without activity;
  • an upload whose bytes were all sent keeps going on the server: it finishes on its own, and shows in the Jobs tab.

"Busy" Folders

While an upload is being placed, its destination folder and every folder above it are busy: renaming, deleting or moving them answers "busy" with the job's id, and so do the agent's fs_* tools that would write there. This keeps a folder from moving under a job that is writing into it. A folder that a Re-sync or a Replace is replacing is busy as a whole: uploads into it and new folders inside it are refused too, because the swap would delete them. Wait for the job to finish, or cancel it in the Jobs tab.

When a Project Is Deleted

Deleting a project deletes its workspace too: its files, its partial uploads and its running workspace jobs. Every Kali sandbox that mounts the project's folder (its owner's and its collaborators') is stopped first, so no shell is still writing there when the folder goes. Deleting a user does the same for each of their projects. If the agent cannot be reached at that moment, the project is still deleted and its workspace folder stays on disk, in agentic/agent-workspace/<projectId>/.


Importing from a URL

Import from URL… in the upload menu opens a dialog. Paste a link, or pick one of the quick-import chips (SecLists, PayloadsAllTheThings, the OWASP cheat sheets, GTFOBins, ...), and Check it. The server inspects the link and shows a preview; nothing is downloaded until you click Import.

Agent Workspace — import from a URL

What Can Be Imported

LinkWhat lands in the workspace
A GitHub repository (github.com/owner/repo, or /tree/<branch, tag or commit>)Its files at that commit, without the git history
A GitHub folder (/tree/<ref>/<folder>)Only that folder. The Subfolder field changes it; empty means the whole repository
A GitHub file (/blob/<ref>/<path>)That one file
A GitHub gistIts files
A GitLab, Bitbucket or Codeberg repositoryThe files of its default branch
Any other git link (.git, https only)A shallow clone of its default branch, without history or submodules
An archive link (zip, tar, tar.gz, tar.bz2, tar.xz)Extracted, as an uploaded archive is
A file link (a PDF, a wordlist, ...)That file
A website or a documentation siteA bounded copy of the site: see Websites and Documentation Sites

The preview shows the kind, the host, the branch and commit, the number of files and their size, and warnings: no git history, a GitHub listing cut short (the real size is larger), a large download, submodules left out. Name starts with a suggestion and Destination folder with the folder the drawer shows. If the name is taken: Keep both (the default) saves the new copy as name-2; Replace swaps the old entry for the new one in one step, once the new one is complete.

Following an Import

Import closes the dialog, and the import joins the Transfers panel: Resolving, Downloading, Extracting, Placing, then Saved as <path>. It runs on the server as a workspace_import job, listed in the Jobs tab (an upload's extraction is a workspace_upload job), so leaving the page does not stop it. A source that sends less than 64 KiB in a minute is treated as not answering, and the import ends with timeout. Cancel stops it and leaves nothing behind. A project runs at most two imports at once. The upload limits apply: 2 GiB, 50,000 entries, and the free-disk reserve.

Imported Folders and Re-sync

An imported folder shows a badge (a branch for a repository, a globe for anything else), and Properties shows where it came from: the host and path, the branch and commit, and when it was fetched. Its record, .import.json, is signed by the server for this project: a record edited by hand, or copied from another project, no longer counts, and the folder becomes a plain folder.

Agent Workspace — an imported folder

Re-sync, the circular-arrows action on an imported folder's row, fetches it again from its source and replaces its contents in one step, after you confirm. Changes made inside the folder are lost. While it runs, the drawer and the agent's file tools refuse to change the folder (busy), but a kali_shell command can still write into it, and that write is lost too. A folder whose link had a query string cannot be re-synced: the query is never stored, because it can hold a token.

Changing INTERNAL_API_KEY changes the key that signs these records, so existing imported folders lose their badge and Re-sync, and the agent no longer lists them as imported sources. Their files stay.

The GitHub Token

GitHub imports use your GitHub Access Token from Global Settings → API Keys. The browser never sends it: the server adds it for each request to GitHub's own hosts only.

  • Public repositories need no token.
  • Private repositories need a token that can read them: a classic token with the repo scope, or a fine-grained one with read access to Contents.
  • Without a token GitHub allows this server 60 requests an hour, and an import uses several. A token lifts that to 5,000 an hour.

The dialog says when a token would help, and can save one in place; the link is then checked again with it. A failed import that a token could fix links to API Keys from the Transfers panel. An administrator acting as another user imports with no token at all: neither the user's token nor the administrator's is used.

White-box source code. A folder you uploaded or imported here can be attached as the project's source code for white-box conversations (Project Settings → AI Agent → Source Code). RedAmon copies it into a snapshot outside the project folder, so later edits here change nothing until you press Refresh there. A GitHub repository can also be attached directly; it uses the same token.

What Is Never Fetched

Only public internet addresses: a link to a private, loopback or cloud-metadata address is refused (blocked_address), on the link itself and on every redirect, and so is a link with a user name or password in it. An administrator can turn URL import off for the whole server with WORKSPACE_URL_IMPORT_ENABLED=false; the dialog then says so. Folder and archive uploads stay available.

Websites and Documentation Sites

A website or a documentation-site link imports a bounded copy of the site. The preview names the scope: the pages kept are those on the same host, under the folder of the link (https://docs.example.com/guide/ keeps the pages under /guide/). Assets (styles, scripts, images) may come from anywhere on that host.

Agent Workspace — website copy options

OptionWebsiteDocumentation siteWhat it does
OutputRaw filesReadable copyRaw files: the exact pages and assets. Readable copy: pages as Markdown and PDFs as text, nothing else; the lightest copy for the agent to read
Max pages3001,000At most 2,000
Max depth36How many links away from the first page; at most 10
Respect robots.txtOffOffOn: the site's robots.txt is read and followed. When it cannot be read, nothing is fetched
English onlyOffOnWhen a sitemap lists translated copies under /en/, /fr/, ..., only the English ones are kept
Also fetch assets from other hostsOffOffRaw only: styles, scripts and images from other hosts (CDNs), saved under _external/<host>/

A copy also stops at 500 MB in all, 25 MB a file, and 30 minutes, and, for a site that is one of your targets, when the Rules of Engagement window closes (it is checked again on every request); what it saved until then is kept. The Transfers panel counts pages, assets and bytes while it runs, and says when the copy stopped at a limit or because the Rules of Engagement window closed. Pages are saved as the server sends them: their JavaScript is not run, and their links are not rewritten. _manifest.jsonl in the folder lists every URL the copy handled, with where it was saved, its status, type, size and SHA-256, or why it was skipped (robots, redirect_offsite, too_large, roe, roe_window, ...).

What a copy never fetches. Government, military, education and intergovernmental domains (the same hard guardrail the agent obeys), the hosts your project's Rules of Engagement exclude, and pages outside the scope. When the link itself is excluded, the import fails and says why; any other excluded URL is skipped and listed in the manifest. When the site is one of your project's targets and the Rules of Engagement are on, the copy also keeps to the engagement dates and time window and to the RoE rate limit, and stealth mode slows it to one request a second. A copy of some other site that fetches assets from one of your targets keeps the same window, rate limit and stealth pace for those requests; outside the window it skips them (roe_window in the manifest). RedAmon identifies itself as RedAmon-WorkspaceImport/1.0. Copy only sites you are allowed to copy.

What the Agent Sees

On every think step, after the user inbox, the agent's prompt lists the project's imported folders (the newest 15) under IMPORTED SOURCES: path, kind, source, branch and commit, file count, size and fetch date. That is only what RedAmon recorded when it imported them, never text from the files: the prompt calls them third-party content, whose instructions are data, and has the agent read them only when a task needs them. Imported folders do not appear in the CHECK THESE NOW inbox, which is for what you upload by hand.


How the Agent Uses the Workspace

When you ask the agent something, the workspace participates in three roles:

  1. Memory across iterations. The agent uses notes/ like a scratchpad. A typical investigation will leave behind notes/auth-surface-summary.md, notes/cve-shortlist.md, notes/draft-report.md, etc. — and the agent reads its own notes back later. This is why long sessions on the same project get smarter over time.
  2. Tool-output overflow buffer. Heavy tools like execute_nuclei and execute_playwright dump megabytes of output. The runtime offloads everything over 20 KB to tool-outputs/<utc-iso>-<tool>.txt and gives the LLM a head/tail stub. The agent then uses fs_grep / fs_read to drill in surgically instead of carrying the whole blob in context.
  3. Background scan staging area. When the agent decides a scan will take more than 60 seconds and it has other useful work to do, it uses job_spawn to detach the scan as a background job. Output streams to jobs/<id>.log in real time. The agent can call fs_grep "critical" jobs/<id>.log mid-flight to see if the scan has hit anything interesting yet, without blocking.

The Kali tools see the same folder. Each person's Kali sandbox mounts /workspace/<projectId>/ for every project that person may run the agent on (their own, and the ones shared with them with Use AI agent or Exploitation & shells) and nothing above it, so a kali_shell command writes straight into the project's workspace. Anything a shell writes outside those folders and its output folder (/tmp included) is lost when the sandbox stops; keep what must last in the workspace.

Fireteam members share the same workspace as the root agent — see Fireteam — Parallel Specialists for how multiple specialists coordinate via shared files (fs_diff vs_last_read detects concurrent edits between members).


Filesystem Tools Reference — 24 fs_*

These 24 tools are available to the agent in all three operational phases (Informational, Exploitation, Post-Exploitation). They operate only on paths inside the project workspace; any attempt to escape via .. or symlink resolution returns a clean error. A project folder is also written by the Kali sandbox of everyone who may run the agent on it, so each tool works through the folder it opened, never through a path a sandbox could swap for a link in the meantime: no link is followed at the end of a path, only regular files are read, and every read and copy is bounded.

Read & Inspect

ToolPurpose
fs_readRead a file with line numbers, a page at a time (offset / limit, 2000 lines by default), whatever its size. Auto-detects binary content, returned whole as base64 up to 32 MiB. Stores an internal snapshot for fs_diff vs_last_read.
fs_read_manyBatched read of multiple files in one call, capped at max_total_bytes (default 200 KB).
fs_statMetadata only — size, mtime, mode, type, optional SHA-256.

Write & Mutate

ToolPurpose
fs_writeAtomic create / overwrite / append. Auto-creates parent directories.
fs_editExact-string replacement with uniqueness check (refuses if the search string appears more than once). Records an undo entry.
fs_multi_editMultiple ordered edits to one file as a single all-or-nothing transaction. One undo snapshot per call.
fs_undo_editRoll back the last fs_edit / fs_multi_edit. In-memory undo stack, capped at 20 entries per file, cleared on agent restart.
fs_deleteDelete a file or directory. Recursive flag required for directories.
fs_moveMove / rename a path. Auto-creates destination parents. Works across subdirectories.
fs_copyCopy a file or directory tree. Recursive flag required for directories. Permissions normalized so the host user can edit the copy. Links stay links, pipes and devices are left out, and a copy writes at most 2 GiB (FS_COPY_MAX_BYTES).
fs_mkdirCreate a directory. Idempotent. The five default subdirectories are auto-created on first workspace access.
fs_chmodChange permission bits, octal (0o755) or symbolic (+x, -w).
fs_symlink_createCreate a symlink. Refuses if the link already exists or if either endpoint would escape the workspace.

Search & Navigate

ToolPurpose
fs_grepRegex search over the workspace, in Python re syntax (no \p{L}-style classes). The glob takes {a,b} alternatives and a leading ! to exclude; .gitignore is not read, and hidden and binary files are skipped. 25s per search (what was found by then comes back, marked incomplete), 2s per line (a backtracking pattern is refused), 256 MiB per file (16 MiB with multiline), 1000 matches per file, 64 folder levels, at most 2 searches at once. Works on in-flight job logs in jobs/.
fs_globGlob pattern search (**/*.json, notes/*.md) sorted newest-first. Capped at 500 results.
fs_findMetadata-driven search — name glob plus filters on mtime, size, type. 30s walk timeout, 5000-result ceiling.
fs_listSingle-directory listing with type, size, mtime. Capped at 200 entries per call.
fs_treeDepth-limited ASCII tree view. Skips .git, node_modules, __pycache__. Bounded by both depth and total entry count.
fs_symbolsTree-sitter AST outline — function / class / method names and their line ranges. 15 languages: Python, JS, TS, TSX, JSX, Java, Go, Rust, Ruby, PHP, C, C++, C#, Kotlin, Swift, Scala.
fs_symlink_readResolve a symlink to its raw target without following it.

Integrity & Archive

ToolPurpose
fs_hashSHA-256 or MD5 hash of a file, streamed, up to 256 MiB (FS_HASH_MAX_BYTES).
fs_diffUnified diff between two files, or between a file and its last fs_read snapshot (vs_last_read mode — catches concurrent writes in fireteam sessions).
fs_extractSafe extraction of tar / zip / gz archives. Refuses zip-slip and tar-slip paths that would write outside the destination, and a member nested deeper than 64 levels; at most 5,000 entries and 500 MB.
fs_archiveBundle workspace paths into a tar.gz or zip for one-click operator download. Reads at most 2 GiB (FS_ARCHIVE_MAX_BYTES).

For deeper UI use of files and notes, see also the dedicated Pentest Reports page — agent-drafted reports typically land in notes/ before being exported.


Background-Job Tools Reference — 5 job_*

Background jobs let the agent detach long-running tools and keep reasoning in parallel.

ToolPurpose
job_spawnSpawn a tool call as an asyncio background task. Returns {job_id, output_path, status: running} immediately. Output is tee'd to jobs/<job_id>.log in real time. Phase restrictions and RoE checks are enforced at spawn time, not when results are read.
job_statusNon-blocking status query. Returns current status, log size, and the last 40 lines of output. Survives agent restart via <id>.meta.json.
job_waitBlock up to N seconds for the job to finish. Returns the same shape as job_status whether the timeout fired or the job completed.
job_cancelCancel a running job. No-op on terminal jobs. Status flips to cancelled.
job_listList jobs for the project. Filter by active=true (running), active=false (terminal), or omit for all. Sorted by start time, newest first.

The agent is steered (via WORKSPACE_LAYOUT_BLOCK) to use job_spawn when a tool will likely take longer than 60 seconds and there's other useful work to do in parallel and live feedback isn't critical. For everything else — quick HTTP probes, graph queries, KB / CVE lookups, single-file edits — synchronous tool calls remain the default.


Tool-Output Auto-Offload

When a tool returns more than 20,000 bytes of output, the runtime automatically:

  1. Writes the full output to tool-outputs/<utc-iso>-<tool>.txt.
  2. Replaces the LLM-facing result with a stub that contains the file path, the byte count, the first ~80 lines (4 KB cap), and the last ~40 lines (2 KB cap).
  3. Tells the agent it can use fs_read for the full output or fs_grep over tool-outputs/ to search.

The char-capped head and tail prevent single-line blobs (base64 dumps, minified JSON) from defeating the offload by being technically "small in line count."

Auto-offload is governed by a per-tool policy map:

ModeBehaviorExamples
auto (default)Offload only if output exceeds 20 KB.Most execute_* tools.
alwaysAlways offload, even small outputs.execute_nuclei, execute_playwright (consistently huge).
neverAlways inline, regardless of size.query_graph, web_search, cve_intel, shodan, google_dork, tradecraft_lookup, tradecraft_search, tradecraft_ask (structured, small, want full context).

The agent can also force the mode on a per-call basis with an output_mode parameter set to inline, file, or auto. The executor strips this parameter before dispatch so the underlying tool / MCP server never sees it.


Safety, Protected Paths, and Path Validation

Several layers of validation keep the workspace contained and inert against directory traversal, symlink escape, and archive-slip attacks.

ConcernDefense
Project-id injection (projectId="../etc" in the API query string)_validate_project_id rejects /, \, NUL byte, leading ., and .. before the path is joined to the workspace root.
Path traversal (fs_read ../etc/passwd)Every fs_* tool resolves the requested path against the project root and rejects anything outside it.
Symlink escapeThe path resolver follows symlinks and re-checks containment — a symlink to /etc/passwd inside the workspace can't be read through fs_read.
Zip-slip / tar-slip on extractfs_extract rejects entries whose resolved destination falls outside the target directory.
URL importsOnly public internet addresses, judged at connect time on every hop and redirect; a website copy also obeys the hard guardrail and the project's Rules of Engagement on every request. See Importing from a URL.
Uploaded archivesEvery entry is written one by one, opened relative to its own folder without following links, so an entry can never write outside the folder or through a link; a path that leaves the folder refuses the whole archive, links and devices are skipped, and the size and entry caps count the bytes really written, not what the archive claims.
Archive symlink leakArchive builders (fs_archive, drawer downloads) skip symlinks so a workspace symlink to a host file can't be smuggled into a downloaded zip.
Protected-folder bypass via normalization (./notes, notes/, notes//)is_protected_path normalizes the path with os.path.normpath before checking — 11 variants are regression-pinned.
Host-user lockoutThe agent container runs as root, but os.umask(0) at startup ensures files it creates are mode 0o666 / dirs 0o777, so your host user (UID 1000) can edit and remove them. fs_copy re-applies the same modes explicitly to defeat shutil.copy2's metadata copy.
Download-error navigationThe drawer uses an <a download> anchor rather than window.location.href, so a backend error never navigates the page away from the graph view.

Path validation is server-enforced, not a frontend convenience. Even a direct HTTP call to /workspace/... with projectId=../etc is rejected with a clean 400 — the lock badges in the drawer mirror the same rule but are not the gate.


Next Steps

  • AI Agent Guide — how the agent reasons about which tool to call (including when to spawn a job_* vs. call a tool synchronously).
  • Fireteam — Parallel Specialists — how multiple specialist sub-agents share the same workspace and coordinate via fs_diff vs_last_read.
  • Red Zone — the toolbar where the folder icon lives.
  • Pentest Reports — agent-drafted reports usually originate as notes/draft-report.md before export.
  • Project Settings Reference — every configurable parameter, including the tool-phase matrix that gates which fs_* and job_* tools are available in each phase.
  • Anatomy of a Think Step — where the workspace layout block (and the live uploads/ listing) sits in the agent's system prompt, section by section.