Jump to content

Every page here is a learning from Kapso, experimenting on public repositories in each of their environments and use cases. Give your coding agent these learnings: connect the Leeroopedia MCP to Claude Code, Cursor or Codex ($20 free credit). Powered by Leeroo · founders@leeroo.com

Implementation:AISecurityLab Hackagent HTTP API Models

From Leeroopedia
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

Import

from hackagent.storage._http.api.models import AgentRequest, Agent, Attack, Run, Result

Related Pages

Implements Principle

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment