-
Notifications
You must be signed in to change notification settings - Fork 45
[FEAT]: Added userguide and API documentation #35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
bashirpartovi
merged 6 commits into
microsoft:main
from
bashirpartovi:dev/bashirpartovi/docs
Apr 30, 2026
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
ba7f30e
[FEAT]: Added userguide and API documentation
02f712f
updated pyproject and fixed precommit issues
4c08ee1
added uv install for git source
45d87eb
addressed comments
de0ea75
addressing comments
c986865
addressed comments
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| # API Reference — Attacks | ||
|
|
||
| ::: rampart.attacks | ||
| options: | ||
| members: | ||
| - Attacks | ||
| - XPIAExecution |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| # API Reference — Converters | ||
|
|
||
| Payload converters transform payloads before injection or delivery. | ||
|
|
||
| ::: rampart.converters | ||
| options: | ||
| members: | ||
| - DocxConverter |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,61 @@ | ||
| # API Reference — Core Protocols | ||
|
|
||
| Protocols and ABCs that define RAMPART's extension points. Implement these to connect your agent, data sources, and custom logic to the framework. | ||
|
|
||
| ## Session & Adapter | ||
|
|
||
| ::: rampart.core.adapter | ||
| options: | ||
| members: | ||
| - Session | ||
| - AgentAdapter | ||
|
|
||
| ## Evaluator | ||
|
|
||
| ::: rampart.core.evaluator | ||
| options: | ||
| members: | ||
| - Evaluator | ||
| - BaseEvaluator | ||
|
|
||
| ## Prompt Driver | ||
|
|
||
| ::: rampart.core.prompt_driver | ||
| options: | ||
| members: | ||
| - PromptDriver | ||
|
|
||
| ## Surface & Injection | ||
|
|
||
| ::: rampart.core.injection | ||
| options: | ||
| members: | ||
| - Surface | ||
| - InjectionHandle | ||
| - sleep_until_ready | ||
|
|
||
| ## Converter | ||
|
|
||
| ::: rampart.core.converter | ||
| options: | ||
| members: | ||
| - PayloadConverter | ||
|
|
||
| ## Execution | ||
|
|
||
| ::: rampart.core.execution | ||
| options: | ||
| members: | ||
| - BaseExecution | ||
| - ExecutionEvent | ||
| - ExecutionEventData | ||
| - ExecutionEventHandler | ||
| - ExecutionHandlerFactory | ||
| - register_default_handler_factory | ||
| - clear_default_handler_factory | ||
|
|
||
| ## Errors | ||
|
|
||
| ::: rampart.core.errors | ||
| options: | ||
| show_source: false |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,58 @@ | ||
| # API Reference — Core Types | ||
|
|
||
| Data types shared across the entire framework. All importable from `rampart` directly. | ||
|
|
||
| ## Data Types | ||
|
|
||
| ::: rampart.core.types | ||
| options: | ||
| members: | ||
| - Payload | ||
| - PayloadFormat | ||
| - Request | ||
| - Response | ||
| - ToolCall | ||
| - SideEffect | ||
| - Turn | ||
| - EvalOutcome | ||
| - EvalResult | ||
| - EvalContext | ||
| - ObservabilityLevel | ||
|
|
||
| ## Result Types | ||
|
|
||
| ::: rampart.core.result | ||
| options: | ||
| members: | ||
| - Result | ||
| - SafetyStatus | ||
| - HarmCategory | ||
| - InjectionRecord | ||
| - resolve_as_attack | ||
| - resolve_as_probe | ||
|
|
||
| ## Configuration | ||
|
|
||
| ::: rampart.core.llm | ||
| options: | ||
| members: | ||
| - LLMConfig | ||
|
|
||
| ::: rampart.core.persona | ||
| options: | ||
| members: | ||
| - Persona | ||
|
|
||
| ::: rampart.core.prompt_driver | ||
| options: | ||
| members: | ||
| - PromptDecision | ||
|
|
||
| ## Manifest | ||
|
|
||
| ::: rampart.core.manifest | ||
| options: | ||
| members: | ||
| - AppManifest | ||
| - ToolDeclaration | ||
| - DataSource |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| # API Reference — Drivers | ||
|
|
||
| Drivers generate prompts for agent interaction. They decide **what** to send; the execution strategy handles the session, evaluation, and result. | ||
|
|
||
| ::: rampart.drivers | ||
| options: | ||
| members: | ||
| - StaticDriver | ||
| - LLMDriver |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| # API Reference — Evaluators | ||
|
|
||
| Built-in evaluators. All extend `BaseEvaluator` and support composition via `|`, `&`, `~`. | ||
|
|
||
| ::: rampart.evaluators | ||
| options: | ||
| members: | ||
| - ToolCalled | ||
| - ResponseContains | ||
| - SideEffectOccurred |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| # API Reference | ||
|
|
||
| API reference organized by RAMPART's package layout. Each page documents the public symbols in one module, auto-generated from source docstrings. | ||
|
|
||
| | Page | Contents | | ||
| |------|----------| | ||
| | [Core Types](core-types.md) | `Payload`, `Request`, `Response`, `Turn`, `Result`, `SafetyStatus`, `HarmCategory`, and more | | ||
| | [Core Protocols](core-protocols.md) | `Session`, `AgentAdapter`, `Evaluator`, `Surface`, `InjectionHandle`, and more | | ||
| | [Attacks](attacks.md) | `Attacks.xpia()`, `XPIAExecution` | | ||
| | [Probes](probes.md) | `Probes.behavior()`, `SingleTurnExecution` | | ||
| | [Evaluators](evaluators.md) | `ToolCalled`, `ResponseContains`, `SideEffectOccurred` | | ||
| | [Drivers](drivers.md) | `StaticDriver`, `LLMDriver` | | ||
| | [Payloads](payloads.md) | `Payloads`, `PayloadTemplate`, `PayloadStore` | | ||
| | [Surfaces](surfaces.md) | `OneDriveSurface` | | ||
| | [Converters](converters.md) | `DocxConverter` | | ||
| | [Reporting](reporting.md) | `ReportSink`, `TestRunReport`, `JsonFileReportSink` | | ||
| | [pytest Plugin](pytest-plugin.md) | `record_result`, markers, hooks | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| # API Reference — Payloads | ||
|
|
||
| LLM-driven payload generation, templating, and persistence. | ||
|
|
||
| ::: rampart.payloads.Payloads | ||
| options: | ||
| show_root_heading: true | ||
|
|
||
| ::: rampart.payloads.template.PayloadTemplate | ||
| options: | ||
| show_root_heading: true | ||
|
|
||
| ::: rampart.payloads._store.PayloadStore | ||
| options: | ||
| show_root_heading: true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| # API Reference — Probes | ||
|
|
||
| ::: rampart.probes | ||
| options: | ||
| members: | ||
| - Probes | ||
| - SingleTurnExecution |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| # API Reference — pytest Plugin | ||
|
|
||
| RAMPART's pytest integration. Activates automatically when installed. | ||
|
|
||
| ::: rampart.pytest_plugin._collection | ||
| options: | ||
| members: | ||
| - record_result | ||
| - ResultCollectionHandler | ||
| - ResultCollector | ||
|
|
||
| ::: rampart.pytest_plugin._session | ||
| options: | ||
| members: | ||
| - RampartSession | ||
| - TrialGroupResult |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| # API Reference — Reporting | ||
|
|
||
| Reporting infrastructure for persisting test results. | ||
|
|
||
| ::: rampart.reporting | ||
| options: | ||
| members: | ||
| - ReportSink | ||
| - TestRunReport | ||
| - PopulationSummary | ||
| - JsonFileReportSink |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| # API Reference — Surfaces | ||
|
|
||
| Built-in injectable surfaces. | ||
|
|
||
| ::: rampart.surfaces | ||
| options: | ||
| members: | ||
| - OneDriveSurface |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| # Attacks | ||
|
|
||
| For background on what attacks are and how they work, see [Concepts: Attacks](../concepts/attacks.md). | ||
|
|
||
| ## Available Attack Types | ||
|
|
||
| | Attack | Factory Method | Description | | ||
| |--------|---------------|-------------| | ||
| | [XPIA](xpia.md) | `Attacks.xpia(...)` | Cross-Prompt Injection Attack | | ||
|
|
||
| More attack types will be added. | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.