Skip to content
godantic mark

godantic

Latest docs for v0.x. Build Go-native LLM agents with models, tools, sessions, and durable history.

godantic gives Go apps a clean agent core: one model interface, typed tools, reusable sessions, and persistent chat history.

It is for teams that want an assistant backend in Go without rewriting provider adapters, tool loops, streaming, WebSocket plumbing, and persistence for every app.

Bring your model

Use Gemini, OpenRouter, Groq, Cerebras, Anthropic, or any custom implementation of the Model interface.

Expose Go tools

Register JSON-schema tool declarations backed by ordinary Go functions returning (string, error).

Pick your transport

Use HTTP request/response, streaming channels, SSE, or the built-in WebSocket session loop.

Persist history

Store conversations in SQLite, PostgreSQL, or your own MessageStore implementation.

store, _ := stores.NewSQLiteStoreSimple("chat.sqlite")
agent := godantic.Create_Agent(
godantic.NewGeminiModel("gemini-2.0-flash"),
tools,
)
session := godantic.NewHTTPSession("conversation-1", &agent, store)
response, err := session.RunSingleInteraction(userMessage)

Use godantic when you want to build a Go-native assistant, support multiple providers, offer tool calling, or keep the chat/session layer separate from your HTTP framework.

It is especially useful for apps that need long-running WebSocket interactions, user-confirmed tool calls, trace persistence, or conversation history shared across providers.

  • Getting Started walks through a minimal Gemini + SQLite agent.
  • Architecture explains the moving pieces and how data flows.
  • Models explains providers, env vars, and custom model implementations.
  • Sessions covers HTTP, streaming, SSE, and WebSocket usage.
  • Tools shows built-in tools, custom tools, and schema-backed registration.
  • Storage covers SQLite, Postgres, and custom stores.
  • Examples gives complete copyable patterns.
  • Production covers operational concerns for deployed apps.
  • Versioning describes tags, major docs policy, and release tooling.

This site shows the latest docs for the current major line, v0. When v1 exists, the root docs will track the latest stable major and older major docs can remain available by major path.