> ## Documentation Index
> Fetch the complete documentation index at: https://splinter.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Types

> Core types reference

## ExecutionLimits

```python theme={null}
ExecutionLimits(
    max_budget: float | None = None,       # Max spend in dollars
    max_steps: int | None = None,          # Max LLM calls
    max_time_seconds: float | None = None, # Max wall-clock time
    per_agent_max_steps: int | None = None,
    per_agent_max_budget: float | None = None,
)
```

## LoopDetectionConfig

```python theme={null}
LoopDetectionConfig(
    max_repeated_outputs: int = 3,  # Same output N times
    max_no_state_change: int = 5,   # No change N times
    max_ping_pong: int = 4,         # A↔B cycles
    window_size: int = 20,          # Recent steps to analyze
)
```

## MemoryConfig

```python theme={null}
MemoryConfig(
    max_size_bytes: int = 10 * 1024 * 1024,  # 10MB
    ttl_seconds: float | None = 3600,         # 1 hour
    eviction_policy: str = "fifo",            # fifo, lru, ttl
    max_entries: int | None = 1000,
)
```

## LLMProvider

```python theme={null}
class LLMProvider(Enum):
    OPENAI = "openai"
    ANTHROPIC = "anthropic"
    GEMINI = "gemini"
    MOCK = "mock"
```

## LLMMessage

```python theme={null}
LLMMessage(
    role: str,           # system, user, assistant, tool
    content: str,
    name: str | None = None,
    tool_call_id: str | None = None,
)
```

## LLMRequest

```python theme={null}
LLMRequest(
    provider: LLMProvider,
    model: str,
    messages: list[LLMMessage],
    tools: list[dict] | None = None,
    temperature: float | None = None,
    max_tokens: int | None = None,
)
```

## LLMResponse

```python theme={null}
LLMResponse(
    content: str | None = None,
    tool_calls: list[dict] | None = None,
    input_tokens: int = 0,
    output_tokens: int = 0,
    cost: float = 0.0,
    model: str,
    provider: LLMProvider,
    latency_ms: float = 0.0,
)
```

## ExecutionMetrics

```python theme={null}
ExecutionMetrics(
    total_cost: float = 0.0,
    total_steps: int = 0,
    total_tokens: int = 0,
    input_tokens: int = 0,
    output_tokens: int = 0,
    start_time: datetime | None = None,
    elapsed_seconds: float = 0.0,
)
```

## Exceptions

| Exception                | When Raised             |
| ------------------------ | ----------------------- |
| `BudgetExceededError`    | Budget limit exceeded   |
| `StepLimitExceededError` | Step limit exceeded     |
| `TimeLimitExceededError` | Time limit exceeded     |
| `LoopDetectedError`      | Loop pattern detected   |
| `ToolAccessDeniedError`  | Agent can't use tool    |
| `StateOwnershipError`    | Agent can't write field |
| `SchemaValidationError`  | Invalid handoff data    |
| `ProviderNotFoundError`  | Provider not configured |
| `WorkflowExecutionError` | Workflow failed         |
