Purpose-built for agents
Not an LLM wrapper â a framework for orchestrating cooperative agent systems with handoffs, sub-agents and roles.
Phero is a Go framework for building cooperative multi-agent systems â not an LLM wrapper, but a set of composable primitives for orchestration, tools, RAG, memory and inter-agent networking. Provider-agnostic by design.
Five commitments shape the framework.
Not an LLM wrapper â a framework for orchestrating cooperative agent systems with handoffs, sub-agents and roles.
Small, focused packages that each solve one problem well and compose cleanly into larger systems.
Built-in support for function tools, skills, RAG and MCP. Tools are the primary integration point.
Clean APIs, opt-in tracing, and OpenAI-compatible plus Anthropic support out of the box.
No heavy dependencies â just Go and your choice of LLM provider.
Inspired by ant colonies: independent agents recognising one another and coordinating through clear protocols.
Multi-agent workflows with role specialization, coordination and runtime handoffs.
Expose any agent as an HTTP A2A server, or call remote A2A agents as local tools.
Register agents as NATS micro services over pub/sub â wire-compatible with the TS and Python SDKs.
One interface over OpenAI-compatible endpoints (OpenAI, Ollama, âĶ) and Anthropic.
Expose Go functions as callable tools with automatic JSON Schema generation.
Built-in retrieval-augmented generation with vector storage and semantic search.
Define reusable agent capabilities in SKILL.md files.
Integrate Model Context Protocol servers as agent tools.
Conversational context storage â in-process, file, PostgreSQL, NATS KV or semantic RAG.
Observe agent, LLM, tool and memory lifecycle events with colorized terminal output.
Document chunking â recursive and markdown-aware â for RAG workflows.
Semantic embeddings with Qdrant, PostgreSQL pgvector and Weaviate back ends.
Five layers, each defining a single core interface so you can swap LLMs, vector stores or embeddings without touching the rest.
Expose a Go function as a tool â the JSON Schema is generated for you â hand it to an agent, and run the chat loop.
package main
import (
"context"
"fmt"
"os"
"github.com/henomis/phero/agent"
"github.com/henomis/phero/llm"
"github.com/henomis/phero/llm/openai"
)
type WeatherInput struct {
City string `json:"city" jsonschema:"description=City to look up"`
}
type WeatherOutput struct {
Forecast string `json:"forecast"`
}
// A plain Go function becomes a tool â no schema written by hand.
func weather(_ context.Context, in *WeatherInput) (*WeatherOutput, error) {
return &WeatherOutput{Forecast: "sunny in " + in.City}, nil
}
func main() {
ctx := context.Background()
tool, _ := llm.NewTool("weather", "Get the weather for a city", weather)
client := openai.New(os.Getenv("OPENAI_API_KEY"), openai.WithModel("gpt-4o"))
a, _ := agent.New(client, "Assistant", "You are a helpful assistant.")
a.AddTool(tool)
res, _ := a.Run(ctx, llm.Text("What's the weather in Rome?"))
fmt.Println(res.TextContent())
}
A handful of the runnable examples that ship with Phero.
Start here. One agent with one custom tool â the basics in one file.
One agent hands work off to a specialist agent at runtime.
Classic Plan â Execute â Analyze â Critique with specialized roles.
Fan-out / fan-in across multiple researchers, then merge findings.
Terminal chatbot with semantic search over local documents via Qdrant.
Researcher, writer and editor agents, each an independent A2A server.
Register an agent as a NATS micro service and call it over pub/sub.
A flow that pauses for explicit human approval before each action.
Run an MCP server as a subprocess and expose its tools to agents.
27 examples in total â see the full list and package docs in the documentation.