M7 — Phantom Agent: AI-assisted security research
AI — Research copilot [P2]
- Provider abstraction for approved models, including user-configured endpoints where supported.Adapters for Anthropic, OpenAI-compatible (OpenAI, DeepSeek, Ollama, LM Studio, any typed base URL) and others behind one runtime, with presets, secrets kept encrypted and an egress guard on every endpoint (
docs/agents/model-providers.md;test_provider_adapters.py,test_provider_api.py,test_provider_egress.py,test_provider_secrets.py). - Audit DeepWrap's code, licensing, model API compliance and suitability before reuse.Not reused: the provider runtime, adapters and framing are Phantom's own (
app/agents/providers/,app/services/providers/), and the repository carries no DeepWrap code, dependency or prompt (checked across the source tree); this audit stays a precondition for any future reuse. - Provide per-vault AI conversations with explicit, user-selected research context.Conversations belong to one vault; context is only what the user attaches (references, never content) plus the redacted workspace view when the conversation shares context (
docs/agents/model-providers.md, What is shared;test_bridge_messages.py,test_bridge_context.py,test_provider_runtime.py). - Build evidence-linked explanations, finding triage, report drafting and research summaries.Triage with agent (finding inspector), Explain with agent (History row menu), Draft with agent (Report Studio) and Summarise this vault (command palette) put the object, the method skill and an evidence-requiring instruction into the composer for review (
utils/agent/researchTasks.ts,researchTasks.spec.ts); the agent works through the shared tools (report drafting functions, findings, notes) under its grants and approvals, and every answer gets the evidence line (docs/agents/ai-evaluation.md). - Provide task plans, user-reviewable actions, tool activity, cancellation and transparent errors.Agents publish plans as steps with states (
task_update/ progressplan;show_planfor model providers, no grant or approval), shown as a checklist on the task (PAgentTask.vue,taskPlan.spec.ts,test_task_plans.py); actions beyond reading wait as approval cards with the operation, arguments, objects and grant; tool calls and results appear as steps in the thread; tasks pause, resume and cancel; provider and agent errors are posted with their code and message (docs/agents/bridge-protocol.md, docs/agents/model-providers.md). - Let users choose which data is sent to an external provider; default to minimal, redacted context.A backend preview of destination, context, references and functions must be confirmed before the first turn (
sharing_not_confirmedotherwise); sensitive attachments are withheld unless sent withshare_sensitive; the context view is MCP-redacted and binary fields replaced (test_provider_runtime.py). - Keep model output distinct from observed facts; require evidence references and show uncertainty.The framing requires
[[kind:id]]citations of objects actually read, observation before inference, and unverified claims marked with how to check them; every complete reply gets an evidence line that checks its citations against the vault on the backend (found, not found, or no evidence cited) and labels them in the text (POST /vaults/{id}/references/resolve,PAgentEvidence.vue,evidence.spec.ts; docs/agents/ai-evaluation.md). - Support bounded, approved assistance in isolated test environments; do not make unrestricted offensive automation a product capability.Agent active work runs only inside the vault the engagement authorises, through the one engagement gate (scope with expiry, active-testing switch, test windows, daily request budget, emergency stop; docs/design/engagement-safety.md), waits for a one-time approval per operation and host by default (docs/guides/agent-approvals.md), within agent quotas, and can never reach the workstation itself; agents cannot widen scope, change rules or approve themselves (
test_engagement.py,test_agent_approvals.py,test_ai_evaluation.py). Phantom offers no autonomous exploitation: agents assist with reading, validating and documenting and run only the same scans and attacks a user could start. A separate lab mode is not provided; an isolated environment is a vault whose scope is that environment. - Evaluate hallucinations, evidence accuracy, permission compliance and prompt-injection resistance using controlled fixtures.
test_ai_evaluation.pyruns a deliberately bad scripted model through the real runtime, registry, grants and reference check: fabricated and other-vault citations are never reported as found; a planted override note reaches the model marked untrusted; obeying it (delete the vault, widen scope, write without a grant, read another vault, mint a token) changes nothing, and a granted write waits for approval; runs in CI (docs/agents/ai-evaluation.md). - Add model selection, token budgets, usage metrics, per-task cost estimation and opt-out controls.Per-conversation model, per-conversation and per-day token budgets (
budget_exceededbefore the model is called), usage by provider, day and conversation with estimated cost in Settings, and providers can be disabled or removed (test_provider_runtime.py,test_provider_api.py). - Make AI optional: the core workspace remains usable without a model connection.Every module works with no provider or agent connected; agents and providers are added from AI & Agents only when wanted, and the backend and interface suites run without any model.
AGENT-UX — Workspace [P2]
- Dedicated Agent page using the established Phantom design system.The Agent page (
/agent, G A) with conversations sidebar, thread, composer, tool steps and approvals, built from the shared components and tokens (components/agent/). - Research context picker, task history, activity timeline and evidence panel.Attachments chosen in the composer as context, tasks with their history and plans, tool steps as the activity timeline, and the Evidence panel in the page head: every object the conversation rests on, cited replies checked against the vault (missing first) and what the user attached, each opening its object (
PAgentEvidencePanel.vue,evidenceLedger.spec.ts). - Approval inbox with requested action, target, permission basis and scope summary.Approval cards show the operation, its masked arguments, the objects it touches, the grant it relies on and the vault's scope in one line (
PAgentApproval.vue,approvalScope.spec.ts), waiting in the conversation and in Open work until the user decides. - Visible budget, model, task status, cancellation and review-required indicators.The Agent page head shows a provider conversation's tokens today and in the conversation against its budgets (warning near and past them), the model choice, task status with pause, resume and cancel, and pending approvals in Open work (
PAgentBudget.vue,budget.spec.ts). - Persist reviewed findings and notes through shared services instead of hidden agent-only state.Agents create and change findings, notes, reports and files through the same services as the interface (MCP tools and provider functions), stamped
actor: agentand visible in the same pages and histories (test_mcp.py,test_provider_functions.py).
Exit gate: The copilot can help researchers interpret authorized data and produce reviewable evidence-linked outputs. Tests demonstrate that untrusted content cannot grant permissions, access unrelated workspaces or trigger unauthorized external actions.