Files
majordomo/examples/README.md
T
steve 97513141dc docs: examples for every hard requirement + mort migration blueprint
Phase 7: nine runnable examples/ programs (parse, failover chains with
trailing alias, tiers, LLM_* env providers, multimodal, tool loop,
Generate[T], agent, skills); docs/mort-migration.md mapping mort's
go-llm/go-agentkit usage onto majordomo APIs with the planned additive
library extensions and conversion order; README finalized with the
complete matrix.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-10 13:17:20 +02:00

1.1 KiB

Examples

One runnable program per hard requirement. Each takes -model (a full majordomo spec — single target, chain, or alias) and reads provider keys from the environment (OLLAMA_API_KEY, OPENAI_API_KEY, ANTHROPIC_API_KEY, GOOGLE_API_KEY, LLM_* DSNs).

Example Shows
parse/ resolving a spec and a plain chat
failover/ failover chains, incl. the trailing-alias form, + health behavior
tiers/ registering custom tiers (aliases) and parsing them
envproviders/ LLM_* env-DSN providers (foreman) as first-class chain elements
multimodal/ attaching an image; capability-aware normalization
tools/ the canonical tool-call loop against the raw Model API
structured/ typed structured output via Generate[T]
agent/ an agent with a toolbox running the tool-dispatch loop
skillexample/ attaching the ready-made clock + calc skills to an agent
live/ the Phase 8 live-validation harness (real Ollama Cloud; needs .env)

Run any of them like:

OLLAMA_API_KEY=... go run ./examples/parse -model "ollama-cloud/minimax-m3:cloud"