agentic_security icon indicating copy to clipboard operation
agentic_security copied to clipboard

Document the module system for extensions

Open msoedov opened this issue 9 months ago • 2 comments

The task is to document the interface of class Module in the docs and README, for example:

https://github.com/msoedov/agentic_security/blob/main/agentic_security/probe_data/modules/garak_tool.py#L22-L70

The same interface is used in other modules directory

Ideally, it is to create an abstract interface and inherit all classes from it.

from typing import Protocol, List, Dict, Any, AsyncGenerator
import asyncio

class ModuleProtocol(Protocol):
    prompt_groups: List[Any]
    tools_inbox: asyncio.Queue
    opts: Dict[str, Any]

    async def apply(self) -> AsyncGenerator[str, None]:
        ...

msoedov avatar Jan 16 '25 14:01 msoedov