How mbhatt1/agentic_lpci_framework works
LPCI is a security benchmark for testing language models against persistent, infrastructure-level prompt-control attacks. The main workflow configures a test run, has agents execute attack scenarios against selected model interfaces, then analyzes results and produces visualizations. A distinct infrastructure-attack path demonstrates poisoned retrieval, cross-session persistence, and tool-registry compromise. The excerpts directly show orchestration, RAG retrieval and session-store use, and analysis/visualization responsibilities; links for unsampled attack and service implementations are limited to documented capabilities and their listed paths.
Main entry points: main.py Test framework · attacks/base.py Attack interface · agent.py Test agent · models/base.py Model interface
Components 23
Test orchestration
- Test framework
agentic_lpci_framework/main.py - Configuration
agentic_lpci_framework/config/settings.py - Test agent
agentic_lpci_framework/core/agent.py - Agent memory
agentic_lpci_framework/core/memory.py
Attack scenarios
- Attack interface
agentic_lpci_framework/attacks/base.py - Role override
agentic_lpci_framework/attacks/role_override.py - Tool poisoning
agentic_lpci_framework/attacks/tool_poisoning.py - Vector payload
agentic_lpci_framework/attacks/vector_store_payload.py - LPCI attack suite
agentic_lpci_framework/attacks/lpci_core.py - Real attack cases
Model interfaces
- Model interface
agentic_lpci_framework/models/base.py - OpenAI adapter
agentic_lpci_framework/models/openai_model.py - Anthropic adapter
agentic_lpci_framework/models/anthropic_model.py - Google adapter
agentic_lpci_framework/models/google_model.py
Attack infrastructure
- RAG pipeline
agentic_lpci_framework/infrastructure/rag_pipeline.py - Vector store
agentic_lpci_framework/infrastructure/vector_store.py - Session store
agentic_lpci_framework/infrastructure/session_store.py - MCP server
agentic_lpci_framework/infrastructure/mcp_server.py
Analysis and reporting
- Result analyzer
agentic_lpci_framework/analysis/result_analyzer.py - Visualizations
agentic_lpci_framework/visualization/charts.py
Other components
- Benchmark user
- Model APIs
- Redis
Connections 25
- Benchmark user → Test framework: starts tests
- Test framework → Configuration: loads settings
- Test framework → Test agent: runs scenarios
- Test framework → Agent memory: creates session
- Test agent → Agent memory: reads and updates
- Test agent → Attack interface: executes attacks
- Attack interface → Role override: specialized by
- Attack interface → Tool poisoning: specialized by
- Attack interface → Vector payload: specialized by
- Attack interface → LPCI attack suite: specialized by
- Attack interface → Real attack cases: specialized by
- Test agent → Model interface: sends test input
- Model interface → OpenAI adapter: implemented by
- Model interface → Anthropic adapter: implemented by
- Model interface → Google adapter: implemented by
- OpenAI adapter → Model APIs: calls API
- Anthropic adapter → Model APIs: calls API
- Google adapter → Model APIs: calls API
- RAG pipeline → Vector store: queries documents
- RAG pipeline → Session store: checks triggers
- Session store → Redis: reads and writes
- RAG pipeline → OpenAI adapter: generates response
- Tool poisoning → MCP server: poisons registry
- Test framework → Result analyzer: analyzes results
- Test framework → Visualizations: generates charts