// Command minimal is executus's "hello, agentic world": wire a model resolver, // a tool registry, and the run executor, then run an agent. With no batteries // (Audit/Budget/Critic/Checkpointer/Palette/Delivery all nil) this is a // bounded, in-memory run — the light-host shape (gadfly's case). // // Run it with a provider key for the configured tier, e.g. // // ANTHROPIC_API_KEY=sk-... go run ./examples/minimal // // Override a tier from the environment without touching code, e.g. // // EXECUTUS_MODEL_TIER_FAST=openai/gpt-4o-mini ANTHROPIC_API_KEY= OPENAI_KEY=sk-... go run ./examples/minimal package main import ( "context" "fmt" "log" "gitea.stevedudenhoeffer.com/steve/executus/config" "gitea.stevedudenhoeffer.com/steve/executus/model" "gitea.stevedudenhoeffer.com/steve/executus/run" "gitea.stevedudenhoeffer.com/steve/executus/tool" ) func main() { // 1. Configure model tiers: live values come from the environment // (EXECUTUS_MODEL_TIER_), falling back to these defaults. model.Configure(config.Env("EXECUTUS_"), map[string]string{ "fast": "anthropic/claude-haiku-4-5", "thinking": "anthropic/claude-opus-4-8", }, 0) // 2. Build the executor: a tool registry + the model resolver. No batteries. ex := run.New(run.Config{ Registry: tool.NewRegistry(), Models: model.ParseModelForContext, }) // 3. Run an agent and print its answer. res := ex.Run(context.Background(), run.RunnableAgent{Name: "assistant", SystemPrompt: "You are concise.", ModelTier: "fast"}, tool.Invocation{RunID: "demo-1", CallerID: "local"}, "In one sentence, what is an agent harness?") if res.Err != nil { log.Fatalf("run failed: %v", res.Err) } fmt.Println(res.Output) }