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

# Types

> Common SDK type surfaces.

Most common types are exported from `@cline/shared`; runtime entry-point packages re-export selected helpers.

## AgentRuntime Types

```typescript theme={"system"}
import type {
  AgentMessage,
  AgentMessagePart,
  AgentRunResult,
  AgentRuntimeEvent,
  AgentRuntimeStateSnapshot,
  AgentUsage,
} from "@cline/sdk"
```

`AgentRunResult` is returned by direct `AgentRuntime` / `Agent` runs:

```typescript theme={"system"}
interface AgentRunResult {
  agentId: string
  agentRole?: string
  runId: string
  status: "completed" | "aborted" | "failed"
  iterations: number
  outputText: string
  messages: readonly AgentMessage[]
  usage: AgentUsage
  error?: Error
}
```

## Host-Facing Agent Types

```typescript theme={"system"}
import type {
  AgentConfig,
  AgentEvent,
  AgentResult,
  AgentPlugin,
  AgentTool,
  AgentToolContext,
  ToolPolicy,
} from "@cline/sdk"
```

`AgentResult` is the host/core-facing result shape:

```typescript theme={"system"}
interface AgentResult {
  text: string
  usage: LegacyAgentUsage
  messages: MessageWithMetadata[]
  toolCalls: ToolCallRecord[]
  iterations: number
  finishReason: "completed" | "max_iterations" | "aborted" | "mistake_limit" | "error"
  model: { id: string; provider: string; info?: ModelInfo }
  startedAt: Date
  endedAt: Date
  durationMs: number
}
```

## ClineCore Types

```typescript theme={"system"}
import type {
  ClineCoreOptions,
  ClineCoreStartInput,
  CoreSessionConfig,
  SessionRecord,
} from "@cline/sdk"
```

## Tool Types

```typescript theme={"system"}
interface ToolPolicy {
  enabled?: boolean
  autoApprove?: boolean
}
```

See [Tools API](/sdk/reference/tools-api) for the full tool surface.
