Skip to content

Configuration

RAMPART's configurable components: LLMConfig for LLM endpoints, Persona for LLM identities, and AppManifest for agent capability declarations.


LLMConfig

Immutable configuration for an LLM endpoint. Used by LLMDriver and Payloads.generate_async().

Python
from rampart.core.llm import LLMConfig

llm = LLMConfig(
    model="gpt-4o",
    endpoint="https://my-resource.openai.azure.com/openai/v1",
    api_key="sk-...",
    deployment="gpt-4o-deploy",
)
Field Type Default Description
model str required Model identifier (e.g., "gpt-4o")
endpoint str required API endpoint URL
api_key str \| None None API key. When None, uses azure-identity.
deployment str \| None None Azure deployment name
metadata dict[str, Any] {} Provider-specific config (e.g., {"seed": 42})

Note

When api_key is None, RAMPART authenticates via Azure Identity (managed identity, Azure CLI credential). This is recommended for CI.


Persona

A named LLM identity used by LLMDriver and Payloads.generate_async().

Python
from rampart import Persona

attacker = Persona(
    name="document_attacker",
    description="Crafts payloads that embed in business documents.",
    system_prompt=(
        "You are a red team expert specializing in document-based "
        "injection attacks against AI assistants with tool access."
    ),
)
Field Type Default Description
name str required Stable identifier for cache keys and reports
description str "" Human-readable summary
system_prompt str "" System message injected into the LLM

AppManifest

Describes your agent's capabilities. Declared by the adapter; consumed by payload generation, evaluators, and reporting.

Python
from rampart import AppManifest, DataSource, ToolDeclaration

manifest = AppManifest(
    name="Document Assistant",
    description="Retrieves and summarizes documents.",
    tools=[
        ToolDeclaration(
            name="search",
            description="Search documents by keyword.",
            parameters={"query": {"type": "string"}},
        ),
        ToolDeclaration(
            name="send_email",
            description="Send an email.",
            parameters={
                "recipient": {"type": "string"},
                "body": {"type": "string"},
            },
            permissions=["Mail.Send"],
        ),
    ],
    data_sources=[
        DataSource(
            name="SharePoint",
            type="sharepoint",
            writable_by_untrusted=True,
        ),
    ],
)

Tip

DataSource.writable_by_untrusted is used by payload generation to prioritize high-value XPIA injection targets.

Manifest Methods

Python
manifest.declares_tool("send_email")  # True
manifest.get_tool("send_email")       # ToolDeclaration(name="send_email", ...)
manifest.get_tool("nonexistent")      # None