Genkit, Eino and LangChainGo compared for Go teams putting agents into production, plus how Encore adds the database, queues and secrets the agent's service depends on.
Go has fewer agent frameworks than Python or TypeScript, but the ones it has are maintained by large organizations and focus on the parts that matter in production, such as typed tools, streaming and tracing.
An agent in production is mostly a backend service that has to keep conversation state, run long tasks reliably and keep API keys out of the code, and Go is already common for that kind of service, with 55 percent of respondents to the 2025 Go Developer Survey building API services in it alongside CLIs.
Anthropic's guide to writing tools for agents recommends building and running evaluations of the tools an agent calls, a reminder that agent output still needs a structure around it that can be checked.
What to weigh when choosing:
Genkit is an open source framework from Google with Go support, built around flows, typed tools and prompts, and a local developer UI for running and inspecting them.
Genkit supports several languages, and plugin coverage differs between them, so check that the model and vector store plugins you need are available for Go.
Eino is part of the CloudWeGo project and offers components for models, tools and retrievers that compose into chains and graphs with type checking between nodes.
Eino has many concepts to learn before the first agent runs, which pays off mainly for complex flows.
LangChainGo brings LangChain's chains, agents, memory and vector store integrations to Go.
It is a community port, so it does not track the Python and JavaScript LangChain releases one to one.
Encore combines the agent's Go service with the infrastructure it needs through an infrastructure SDK, so the service declares its Postgres database, Pub/Sub topic and secrets in code, while Genkit, Eino or LangChainGo handles the model loop inside the handler. encore run starts Postgres locally with the topic, and a deploy provisions them in your own AWS or GCP account. Whichever option above you pick, Encore can add the database, topics and secrets to the same app.
package agent
import (
"context"
"encore.dev/pubsub"
"encore.dev/storage/sqldb"
)
var db = sqldb.NewDatabase("agent", sqldb.DatabaseConfig{
Migrations: "./migrations",
})
// Set per environment with `encore secret set --type prod OpenAIKey`.
var secrets struct {
OpenAIKey string
}
type RunRequested struct {
RunID int64
Prompt string
}
var Runs = pubsub.NewTopic[*RunRequested]("agent-runs", pubsub.TopicConfig{
DeliveryGuarantee: pubsub.AtLeastOnce,
})
var _ = pubsub.NewSubscription(Runs, "execute-run",
pubsub.SubscriptionConfig[*RunRequested]{Handler: execute})
type CreateRunParams struct {
Prompt string `json:"prompt"`
}
type CreateRunResponse struct {
RunID int64 `json:"run_id"`
}
//encore:api public method=POST path=/runs
func CreateRun(ctx context.Context, p *CreateRunParams) (*CreateRunResponse, error) {
var id int64
err := db.QueryRow(ctx, "INSERT INTO runs (prompt) VALUES ($1) RETURNING id", p.Prompt).Scan(&id)
if err != nil {
return nil, err
}
if _, err := Runs.Publish(ctx, &RunRequested{RunID: id, Prompt: p.Prompt}); err != nil {
return nil, err
}
return &CreateRunResponse{RunID: id}, nil
}
func execute(ctx context.Context, r *RunRequested) error {
// runAgent wraps your agent framework, such as a Genkit flow.
output, err := runAgent(ctx, secrets.OpenAIKey, r.Prompt)
if err != nil {
return err // Encore retries the message.
}
_, err = db.Exec(ctx, "UPDATE runs SET output = $1, done = true WHERE id = $2", output, r.RunID)
return err
}
Encore does not call models, so pick the agent framework for how you want flows written. Keep the production database out of reach of the agent itself, since Replit's AI agent deleted a user's production database during a code freeze in July 2025. Cloud resources are created at deploy time, and the cloud access sits with Encore's IAM role, not the agent.
Genkit for Go suits teams that want flows, tool calling and a local developer UI from Google's open source framework, Eino from CloudWeGo suits teams that want composable graphs of model and tool components, and LangChainGo suits teams that already know LangChain concepts. Encore is not an agent framework but an infrastructure SDK for the Go service that runs the agent, covering its database, Pub/Sub topics and secrets.
Go is a good fit for the service around the agent, because agents spend most of their time waiting on model and tool calls and Go handles many concurrent requests cheaply. Model research and fine-tuning stay mostly in Python.
Declare a package-level secrets struct with a field such as OpenAIKey, set the value per environment with encore secret set, and read secrets.OpenAIKey in your code. The key never has to appear in the repository or in an environment file.
Deploy to your cloud on AWS and Google Cloud
without managing infrastructure
Encore lets developers and agents define application infrastructure directly in code, then automatically provisions it from local development to production in your AWS or GCP account.