Implementation:ARCANGEL0 EVA intel context
| Knowledge Sources | |
|---|---|
| Domains | Security_Automation, LLM_Context_Management |
| Last Updated | 2026-10-29 14:00 GMT |
Overview
Concrete tool for generating a compact Intel context string for LLM system prompt injection, provided by the Mitsu workspace Intel module.
Description
The intel_context function compresses the full session Intel dict into a bounded text string suitable for injecting into the agent's system prompt. It organizes records into sections (Targets, Services, Findings, Exploits, Observations, Accounts, Manhunt) and limits the number of records per section to prevent context overflow.
The output is a JSON-formatted string that the LLM can parse to understand the current engagement state without needing the full (potentially large) Intel dict.
Usage
- System prompt construction: Called by `run_agent_turn` on each iteration to inject current Intel state.
- Context refresh: Called when the agent needs to reference current Intel after tool calls modify it.
Code Reference
Source Location
- Repository: Mitsu
- File: workspace/intel.py
Signature
def intel_context(intel: dict[str, Any], limit: int = 12) -> str:
Import
from mitsu.workspace.intel import intel_context
I/O Contract
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
| intel | dict[str, Any] | Yes | Session Intel dict |
| limit | int | No | Max records per section (default: 12) |
Outputs
| Name | Type | Description |
|---|---|---|
| returns | str | Compact JSON context string with bounded records per section |
Usage Examples
Generate Context for System Prompt
from mitsu.workspace.intel import intel_context
# After accumulating Intel during an engagement
context = intel_context(session_intel, limit=12)
system_prompt = f"""You are a pentest assistant.
Current session Intel:
{context}
"""
Related Pages
Implements Principle
- Principle:ARCANGEL0_EVA_Session_Intelligence_Management
- Principle:ARCANGEL0_EVA_Agent_Turn_Execution