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

# Go SDK

> Official Go SDK for the Meibel API

# Go SDK

The official Go SDK provides an idiomatic Go interface to the Meibel API.

## Installation

```bash theme={null}
go get github.com/meibel-ai/meibel-go/v2
```

## Quick Start

```go theme={null}
package main

import (
    "context"
    "github.com/meibel-ai/meibel-go/v2"
)

func main() {
    // Initialize the client
    client := v2.NewClient(v2.WithAPIKey("your-api-key"))
    ctx := context.Background()

    // Make API calls
    // ...
}
```

## Configuration

```go theme={null}
client := v2.NewClient(
    v2.WithAPIKey("your-api-key"),
    v2.WithBaseURL("https://api.example.com"),
    v2.WithTimeout(30 * time.Second),
)
```

## Resources

* `client.Agents` - Create, manage, and publish AI agents
* `client.Agents.Sessions` - Create, manage, and chat with agent sessions
* `client.ArtifactSchemas` - Define structured output schemas for agent artifacts
* `client.Batches` - Create and manage batch processing definitions
* `client.Batches.Executions` - Run, monitor, and manage batch executions
* `client.ConfidenceScoring` - Track and analyze confidence scores
* `client.Datasources` - Manage data source connections
* `client.Datasources.DataElements` - Manage data elements within datasources
* `client.Datasources.Downloads` - Export datasources as downloadable files
* `client.Datasources.FileUploads` - Upload and manage content files
* `client.Datasources.Ingest` - Trigger and monitor datasource ingestion
* `client.Datasources.Tables` - Manage table and column descriptions for AI context
* `client.Documents` - Parse and transform documents into structured data
* `client.MetadataModelCatalog` - Browse available metadata extraction models
* `client.Sessions` - View session details across agents

## Context Support

All operations accept a `context.Context` as the first parameter for cancellation and timeout handling:

```go theme={null}
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second)
defer cancel()

result, err := client.Resource.Operation(ctx, params)
```
