Implementation:AISecurityLab Hackagent HTTP API Models
| Knowledge Sources | |
|---|---|
| Domains | Storage, Contracts |
| Last Updated | 2026-10-29 00:00 GMT |
Overview
Concrete auto-generated pydantic models (835 lines) mirroring the HackAgent API server's wire schema, used by the generated HTTP client and the remote storage backend.
Description
The models module contains auto-generated frozen pydantic models for every API entity: APITokenLog, AgentRequest, Agent, Attack, Run, Result, Trace, Judge, Key, Organization, User, Checkout, and many more. These are the wire-level types used by the generated HTTP client methods in _http/api/. The file is regenerated by scripts/generate.py from the OpenAPI spec.
Usage
- RemoteBackend: The remote storage backend uses these models to parse API responses.
- Generated client methods: API endpoint functions accept and return these models.
Code Reference
Source Location
- Repository: AISecurityLab_Hackagent
- File: hackagent/storage/_http/api/models.py
Import
from hackagent.storage._http.api.models import AgentRequest, Agent, Attack, Run, Result