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

# Go SDK overview

> Build agents in Go, connect tools and models, and ship conversational applications.

HasteKit is a Go SDK for agents that use tools, keep conversation history, delegate work, and pause for human input. Run an agent in your application, expose it through a chat interface, or move its execution to Temporal or Restate.

The Go module is `github.com/hastekit/agent-sdk-go`. These guides import the root package as `hastekit`. You can call providers directly; a separately deployed HasteKit Gateway is optional.

## Build your first agent

After [installing the SDK and configuring a provider](https://hastekit.ai/docs/hastekit-sdk/setting-up.md), create an agent and send a turn. Here `model` is the provider returned by `client.Model(...)`, and `ctx` is your request context:

```go theme={null}
agent, err := hastekit.NewAgent(&hastekit.AgentConfig{
    Name: "assistant",
    LLM: model,
    Instruction: hastekit.NewPrompt("Give clear, concise answers."),
})
if err != nil { return err }
result, err := agent.Run(ctx, &hastekit.Input{
    ThreadID: "first-conversation",
    Message: hastekit.UserTurn("What can you help me with?"),
})
if err != nil { return err }
fmt.Println(result.Text())
```

Add function tools when the agent needs to act, and reuse a thread ID when it needs earlier turns. [Agents and execution](https://hastekit.ai/docs/hastekit-sdk/agents/simple-agent.md) explains streaming, cancellation, and paused results.

## What are you building?

> [card] [An assistant with tools](https://hastekit.ai/docs/hastekit-sdk/agents/tools/function-tools.md)
>
> Turn Go functions into model-callable tools, then connect MCP servers and skills.

> [card] [A chat application](https://hastekit.ai/docs/hastekit-sdk/agents/serving-agents/serving-agents-agui.md)
>
> Serve the embedded chat UI or build your own with React and CopilotKit.

> [card] [A team of agents](https://hastekit.ai/docs/hastekit-sdk/agents/multi-agents/overview.md)
>
> Delegate independent work to sub-agents or hand the conversation to a specialist.

> [card] [Work that runs later](https://hastekit.ai/docs/hastekit-sdk/routines.md)
>
> Schedule one-time or recurring agent tasks and inspect their conversations.

> [card] [A durable service](https://hastekit.ai/docs/hastekit-sdk/agents/durable/overview.md)
>
> Keep orchestration in Temporal or Restate and share history, events, and files across workers.

> [card] [An explicit workflow](https://hastekit.ai/docs/hastekit-sdk/workflows/introduction.md)
>
> Define a graph in Go or YAML when your application should choose the steps and branches.

## Find the right layer

| Layer | Use it for | Start here |
| - | - | - |
| Agents | Model-directed tool use, conversation state, approvals, and delegation | [Agents](https://hastekit.ai/docs/hastekit-sdk/agents/simple-agent.md) |
| Model APIs | Direct requests for text, structured data, images, embeddings, and audio | [Models and providers](https://hastekit.ai/docs/hastekit-sdk/models/overview.md) |
| Workflows | Application-defined routing and checkpoints | [Workflow overview](https://hastekit.ai/docs/hastekit-sdk/workflows/introduction.md) |

## Learn the core concepts

Start with [prompts and run context](https://hastekit.ai/docs/hastekit-sdk/agents/system-instruction.md), [structured output](https://hastekit.ai/docs/hastekit-sdk/responses/structured-output.md), and [conversation history](https://hastekit.ai/docs/hastekit-sdk/agents/conversations/history.md). Add [middleware](https://hastekit.ai/docs/hastekit-sdk/agents/hooks.md) to customize execution and [evaluations](https://hastekit.ai/docs/hastekit-sdk/testing.md) to measure changes to models, instructions, and tools.

These guides follow the current SDK APIs. Pin your module version and use matching documentation when upgrading. Complete programs include imports; shorter snippets name their prerequisites. Model IDs are examples—choose a model available to your account with the capabilities your application needs.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.