* test(harness): read agent plan from the scoped store
The store-scoping change moved an agent's plan from the default table
key agent/{name}/plan to its own table (database "agent", table {name},
key "plan"). The plan-delegate harness tests still read the old key and
failed with 'not found'; read through store.Scope(mem, "agent", name)
like the agent does.
* docs: orient agents-first across README, landing, and docs overview
Lead with agents (then services and flows), surface MCP + A2A as the
interop story, and frame agents as services. Landing hero and feature
grid reordered agents-first with an A2A gateway card.
* v6: module path go-micro.dev/v6, TLS secure by default, NewService
Cut v6. Three breaking changes, bundled so the major bump is paid once:
- Module path go-micro.dev/v5 -> go-micro.dev/v6 across all imports + go.mod.
- TLS verification on by default (was off). MICRO_TLS_SECURE removed;
MICRO_TLS_INSECURE=true opts out for self-signed/dev.
- micro.NewService(name, opts...) is the canonical service constructor,
symmetric with NewAgent/NewFlow; micro.New kept as a deprecated alias;
the old name-less NewService(opts...) removed. Generators emit NewService.
Also ports the JWT auth token provider in-module (go-micro.dev/v6/auth/jwt/token
on golang-jwt/jwt/v5), dropping the v5-pinned github.com/micro/plugins/v5/auth/jwt
and the deprecated dgrijalva/jwt-go.
Docs/README/landing updated to v6 and @latest; v5->v6 migration guide added;
CHANGELOG cut as [6.0.0]. Blog posts left at their historical versions.
---------
Co-authored-by: Claude <noreply@anthropic.com>
* feat: add plan and delegate as built-in agent tools
Give agents two self-capabilities, expressed as plain tools wired into
the existing tool handler — no harness or graph, consistent with
"services are the only abstraction":
- plan: record/update an ordered plan, persisted to store-backed memory
and surfaced in the system prompt on later turns (externalized
planning).
- delegate: hand a self-contained subtask to another agent.
Delegate-first — if the target names a registered agent it is called
via RPC; otherwise a focused ephemeral sub-agent is created with
agent.New + Ask in a fresh, isolated context (loads/persists no
history, no built-in tools, so it cannot re-delegate).
Both are added automatically to any non-ephemeral agent, so existing
micro.NewAgent services and micro chat routing get them for free.
Tests are hermetic (memory store + memory registry).
* feat: add agent-plan-delegate example and document plan/delegate
- examples/agent-plan-delegate: coordinator that plans multi-step work,
creates tasks with its own tools, and delegates notification to a
separate registered comms agent over RPC.
- integration tests driving the full Ask loop through a fake provider:
plan tool exposure + persistence, ephemeral delegation with isolated
context, delegate-first RPC routing to a registered agent.
- docs: README (Building Agents + features + examples), AGENT_DESIGN
(Built-in Capabilities), agent-patterns guide (Pattern 9), CLAUDE.md.
* docs: blog post and guide for plan & delegate
- blog/17: "Plan & Delegate: Deep Agents in Go" — what the feature is,
how plan and delegate work, and a runnable getting-started path.
- guides/plan-delegate: reference guide with the smallest-agent snippet,
plan/delegate semantics, and the multi-agent example; linked in nav.
- example: auto-detect provider/key from common env vars (ANTHROPIC_API_KEY,
OPENAI_API_KEY, ...) so 'export KEY && go run main.go' just works.
- onboarding: getting-started paths now include go mod init / go get and a
clone-and-run path, so a reader can actually run it from a cold start.
* refactor: reframe plan/delegate blog and clean up sub-agent construction
- blog/17 retitled "Agents That Plan and Delegate" and reframed around
intent (plan = state intent, delegate = direct it), positioned as the
next beat after blog 15/16 and tied to the existing store + agent RPC
rather than re-announcing them. "Deep agents" now a single in-passing
nod, matching how blog 14 references LangChain.
- agent: add unexported newEphemeral constructor for sub-agents instead
of type-asserting the public Agent interface to set an internal field;
matches the options-only construction idiom used elsewhere.
* feat: expose plan & delegate in the micro chat fallback
Add agent.Builtins(opts...) — returns the built-in tools plus a handler,
so the plan/delegate capabilities can be wired into a tool loop that
isn't a running Agent. micro chat's direct-service fallback now reuses
it (single source of truth, no duplicated handler logic), so planning
and delegation are available there too, not just for registered agents.
Adds a test for the accessor; notes CLI availability in the guide.
---------
Co-authored-by: Claude <noreply@anthropic.com>