Skip to main content

Golato

Golato is a small, embeddable generation, embedding, and agent runtime library for Go. It sends one model request or runs a full agent loop, compacts long conversations, and embeds text, always returning shared types that carry between the operations.

warning

Golato is still being churned. The recipe is in progress, and nothing is promised yet.

Choosing a capability

Choose the operation that owns the loop you need. The host application supplies requests and contexts and keeps the returned values.

If you want to...Start withFinish with
send one model requestgeneration.Generatorstream.Result(ctx)
run tools over multiple model turnsagent.Agentassistant.Run(ctx, input) or run.Wait()
replace old conversation messagescompaction.Compactorcompactor.Compact(ctx, request)
turn text inputs into vectorsembedding.Embedderembedder.Embed(ctx, request)

A Generator returns one response and hands tool calls back to the application. An Agent validates the calls, runs the tools, appends the results, and requests the next turn itself. Both paths share message.Message and tool.Definition, so an application can start with a Generator and move to an Agent without changing its conversation values.

Keeping application state in the application

Golato does not write a database, retain a transcript between calls, manage tenancy or access, retrieve memory, or apply product policy. The host application stores agent.Result.Context when using an Agent. Storing and continuing conversation state explains the handoff.

Reading the manual

Fundamentals

Generation

Agent

Reaching a model

Reference

  • Glossary: look up the shared terms of the manual

Running an example

The examples catalog lists commands that use the versioned module. The built-in tools run with the permissions of their host process. Read Using tools and the built-ins before giving them untrusted work.

The built-in tools are not a sandbox

read, bash, edit, and write can reach host files, processes, environment variables, and network resources. Use a container, virtual machine, or other process isolation when the task is not trusted.

Reading the API reference

The package documentation describes every exported symbol. These links select v0.3.0 explicitly.