Multi-agent defense framework composed of three cooperating services:
agent/: Rust + eBPF responder that observes process starts and executes bounded remediation tasks.server/: Axum control plane that coordinates detections, queues actions, and brokers AI reasoning for agents.frontend/: Next.js 16 command console that renders the current posture and suggests next actions via Jina embeddings.
- Mission: shrink detection-to-containment time with cooperating agents.
- Pattern: sense activity → reason with policy/AI → act → verify.
- Role split: control plane plans, host agents execute, console validates.
- Benefit: closed-loop defense that records protection history instead of alert noise.
- Result: higher containment rates with fewer manual touches.
- Launch Elasticsearch and note the endpoint plus an API key.
- Start the control plane:
cd server && cargo run. It exposes the APIs on port 8080 and an interactivecmd>prompt for issuing agent instructions. - Build and run an agent on a Linux host with eBPF support:
cd agent && LIBBPF_SYS_USE_SYSTEM=1 cargo run --release(usually needssudo). - Bring up the console:
cd frontend && pnpm install && pnpm dev, then openhttp://localhost:3000.
- Purpose: Receives process docs from agents at
/v1/ingest/processes, forwards them to Elasticsearch, maintains a command queue (/v1/agent/commands), accepts agent results, and exposes/v1/openai/chatas a reasoning broker. - Environment:
ELASTIC_URL(required) – Elasticsearch node URLELASTIC_API_KEY(required) – API key for the clusterPROCESS_INDEX(defaultlogs-processstart) – index to write intoOPENAI_API_KEY(optional) – enables/v1/openai/chatOPENAI_MODEL/OPENAI_BASE(optional) – override model or base URL
- Run:
make runorcargo run. The CLI acceptslist(show agent IDs) and<agent_id> <instruction>to enqueue work.
- Purpose: Attaches the
bpf/execsnoop.bpf.cprogram tosys_enter_execve, buffers process metadata, and batches it to the server. It polls/v1/agent/commands, runs scoped tasks (5s timeout), and reports structured outcomes. - Environment:
SERVER_URL(defaulthttps://api.joingallop.com) – control plane base URLOPENAI_MODEL(optional) – model name passed to the server’s OpenAI proxy- Agent ID is the host name; ensure it matches commands you enqueue.
- Prereqs: Linux with eBPF enabled, kernel headers,
clang/llvm,libbpf(build expectsLIBBPF_SYS_USE_SYSTEM=1), and root privileges to load the BPF program. - Run:
cd agent && LIBBPF_SYS_USE_SYSTEM=1 cargo run --release(ormake run).
- Purpose: Reads Elasticsearch threat data, renders current defenses, lists agents, and provides
/api/jina/insightfor AI judgment on commands. - Environment (.env.local):
ELASTIC_URL– Elasticsearch endpointELASTIC_API_KEY– API keyPROCESS_INDEX– index to query (should match server)JINA_API_KEY/JINA_MODEL_ID(optional) – enable Jina-based command analysis
- Run:
pnpm install && pnpm dev(orpnpm build && pnpm start).
- Agents capture exec events via eBPF and post batches to
POST /v1/ingest/processes. - Control plane enriches/forwards events into Elasticsearch and tracks active agent IDs.
- Console API routes query Elasticsearch for posture summaries, threat charts, and agent status.
- Use the server CLI to enqueue instructions; agents fetch them, optionally call the OpenAI proxy, execute bounded actions, and report results to
/v1/agent/result.
- Activity lands in Elasticsearch with host/user/process context.
- Detection rules, IOC matches, and Jina v3 embeddings (via Elastic Inference Service) label events as malicious/suspicious/benign.
- A threat score merges AI confidence, rule severity, heuristics (e.g., netcat reverse shell,
curl | bash), and asset context. - Policy maps score + criticality + allowlist/denylist into actions: investigate, contain, kill process, quarantine host, or log-only.
- Agents receive scoped plans, execute bounded steps, and emit structured results.
- Control plane verifies remediation by rechecking Elasticsearch state and closes or escalates.
- Events flow into Elasticsearch
- Detection rule fires
- Workflow triggers automatically
- Agent is invoked with a scoped plan
- Agent returns structured action/result
- Workflow executes deterministic response (kill proc, isolate host, notify, ticket)
- Verification re-reads ES and closes or retries
- Shrinks detection-to-action latency and cuts alert fatigue.
- Runs repeatable, policy-checked remediation without external SOAR glue.
- Consolidates automation in one control plane (Elasticsearch + agents + workflows).
- Focuses on protection history (what was remediated, when, how) instead of just scan history.
- User signs up and gets a console backed by Elasticsearch; credentials stay in their environment.
- They deploy agents on hosts; each streams exec context and enforces actions locally.
- 14-day Elastic Cloud Serverless trial can power ingestion without new infra.
- Jina models via EIS generate embeddings and rerank search results to improve detections.
- Elastic Workflows and Agent Builder wire detections to actions; custom tools can be added for environment-specific remediation.
- Rust toolchain 1.75+ recommended for
agent/andserver/. - Node 20+ with
pnpmfor the dashboard. - Formatting helpers:
make fmtin Rust projects;next lintavailable infrontend/. - When running agents on production hosts, review and harden command execution policies before enabling remote instructions.