# @tensorpass/aiconnect (/docs/reference/core)

`@tensorpass/aiconnect` is the site's side of AI Connect, without any framework. It exports the `AiConnect` client, the `McpToolSource` class, the `runConversation` and `finalAnswer` functions, the chat content helpers, `WalletRequestError`, and the types they share with AI Wallet.

```ts
import {
  AiConnect, McpToolSource, WalletRequestError, contentParts, dataUrl, finalAnswer, inlineData, runConversation, textOf,
} from '@tensorpass/aiconnect';
import type {
  ChatEvent, ChatMessage, ChatResponse, ChatStart, ConnectionState, ContentPart, GenerationHint, JsonSchema, ToolSource,
  Usage, UserMessage, WalletChatParams, WalletLink, WalletProvider,
} from '@tensorpass/aiconnect';
```

The reference is in four pages, each with the tables of its exports, generated from the package's TypeScript source each time the docs are built:

| Page | What it documents |
| --- | --- |
| [The client](/docs/reference/core/client) | `AiConnect`, `ConnectionState`, `SdkOptions`, `WalletFetch`, `WalletRequestError`, `McpToolSource` |
| [Conversations](/docs/reference/core/conversation) | `runConversation`, `ConversationOptions`, `ConversationHooks`, `finalAnswer`, the chat content helpers |
| [Chat, tool and generation types](/docs/reference/core/messages) | the messages and their content parts, `ToolDefinition`, `ToolSource`, `JsonSchema`, `GenerationOptions`, `ToolChoice`, `ResponseFormat` |
| [Sessions and the wallet](/docs/reference/core/wallet) | `ProviderSession`, `ChatRequest`, `ChatStart`, `ChatResponse`, `FinishReason`, `Usage`, `WalletLink`, `WalletProvider`, `ChatEvent` |
