I set out to simplify Langchain-like patterns in Go—focusing on functionality first, then reducing lines of code.
The minimal LLM pipeline looks like this:
pipe := pipe.New(messages, llm, parser) result, _ := pipe.Invoke(context.Background())
Using tools and the ReAct pattern, Agents can reason and execute:
tools := map[string]agents.Tool{ "CurrentTemperatureInFahrenheit": CurrentTemperatureInFahrenheit{}, } agent := agents.New(llm, tools) agent.Task("What is the temperature outside?") executor := agents.NewExecutor(agent) executor.Run(context.TODO()) fmt.Println(agent.GetFinalAnswer())
Tools can be Agents too—so chaining Agents is straightforward. A Director Agent calling others? Not far off.
Go + LLMs, minimal and powerful.
There are no models linked
There are no datasets linked
There are no datasets linked