Adds an opt-in `security` role to `micro loop` and wires it into go-micro's own
loop. On a schedule it dispatches the agent to audit the codebase for real,
exploitable vulnerabilities and file them.
Security gets a deliberately more conservative policy than the other roles,
encoded in .github/loop/prompts/security.md:
- NEVER auto-merges a security change (fixes stay human-reviewed).
- NEVER publishes exploit detail / PoC in a public issue — novel exploitable
findings get a concise `security` + `needs-human` issue (class, location,
impact) routed to private disclosure; only known/public dep CVEs get a
bump PR (no auto-merge).
- Weekly by default (`--security-cron`, 0 6 * * 1); tunable.
The go-micro prompt targets its real attack surface: MCP/A2A gateways, x402
payments, JWT/wrapper auth, provider BaseURL SSRF + key leakage, the agent
tool loop (prompt injection / guardrail bypass), TLS defaults, the loop's own
PAT, and dependency CVEs via govulncheck.
Note: an agent review is not a gate. The deterministic companion — govulncheck
as a required CI check — is a recommended follow-up so known-vulnerable deps
can't merge at all.
Claude-Session: https://claude.ai/code/session_01CmdEY7pYmV5zzwCjNJ4ykL
Co-authored-by: Claude <noreply@anthropic.com>
TestFileStoreTable failed intermittently on CI ("Expected 2 items, got 1"):
the same commit passed the Unit Tests job on a PR run and failed on the master
push. Cause: records written with a 100ms expiry are read back immediately and
expected to still be present, but under `-race` on a loaded runner the write
loop + file I/O + read can exceed 100ms, so a record expires before the read.
Widen the expiry/TTL windows (100ms -> 1s) and the paired post-expiry sleeps
(-> 2s). The "read before expiry" reads happen in well under 200ms, so they stay
inside the 1s window on any runner; the "read after expiry" waits comfortably
exceed it. Test-only; the store's expiry behavior is unchanged.
Verified: `go test -race -count=5 -run TestFileStoreTable ./store/` green.
Claude-Session: https://claude.ai/code/session_01CmdEY7pYmV5zzwCjNJ4ykL
Co-authored-by: Claude <noreply@anthropic.com>
* ai/minimax: complete provider surface (matrix, conformance, changelog)
Follow-up after merging the MiniMax provider (#3769), mirroring the Ollama
completeness pass (#3637):
- Add the `minimax` row to the AI provider capability matrix and blank-import
ai/minimax in provider_capabilities_test.go so the matrix stays enforced
against the registry.
- Add minimax to the stream-conformance allowlist (+ import) so its streaming
is actually exercised against the OpenAI-compatible SSE contract, not just
registered. It passes via the shared ai/internal/openaiapi path.
- Record the provider in CHANGELOG [Unreleased].
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CmdEY7pYmV5zzwCjNJ4ykL
* ai: update capabilities_test provider assertions for minimax
Adding the minimax blank-import to the shared ai_test binary (for stream
conformance) also registers it for TestRegisteredProviders / TestCapabilityRows
/ TestCapabilityMatrix in capabilities_test.go, which pin the exact provider
set. Update those assertions to include minimax. (Fixes the Unit Tests failure
my scoped `-run TestStreamProviders` check missed — go compiles all _test.go in
a package into one binary.)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CmdEY7pYmV5zzwCjNJ4ykL
---------
Co-authored-by: Claude <noreply@anthropic.com>
Backstop for the gate: previously loop-triage only fired on Harness (E2E)
failures, so a red lint or test on master (e.g. the misspell that slipped past
because golangci-lint isn't a required check) produced no fix issue. Now triage
watches all the gate workflows.
- micro loop: `--ci-workflow` accepts a comma-separated list of workflow names,
rendered into the triage workflow_run trigger as a YAML array; the issue names
the actual failed workflow via github.event.workflow_run.name. (generic CLI)
- go-micro: regenerate loop-triage.yml to watch "Harness (E2E)", "Lint",
"Run Tests"; generalize the triage prompt beyond the harness (a lint/test
failure on master is a real regression to fix, not a flake to ignore).
- Docs: update CONTINUOUS_IMPROVEMENT.md triage description.
Note: this is defense-in-depth. The primary fix is making golangci-lint a
required status check so red lint can't merge in the first place — that stays
with the human (branch protection).
Claude-Session: https://claude.ai/code/session_01CmdEY7pYmV5zzwCjNJ4ykL
Co-authored-by: Claude <noreply@anthropic.com>
The x402 wrapper could advertise a 402 and verify a payment, but never
settled it (the "exact" scheme needs verify + settle to actually move
funds), and its HTTPFacilitator sent no auth, so it could not use the
Coinbase CDP facilitator — the only one that settles Base mainnet. It
also passed the raw base64 X-PAYMENT string where facilitators expect the
decoded payload object.
- Add an optional Settler interface; HTTPFacilitator now implements
Verify and Settle (POST /verify then /settle), and Require settles a
verified payment and emits the settlement reference.
- HTTPFacilitator.Authorize hook + x402.CDP(keyID, secret) constructor:
mint a short-lived Ed25519 Bearer JWT (stdlib crypto only, no chain
code, no new dependency) so verify/settle authenticate to CDP.
- Decode the X-PAYMENT payload to the object facilitators expect, with
passthrough for non-JSON payloads.
- Requirements gains extra (EIP-712 domain) and mimeType; the asset and
its {name,version} are auto-filled for known networks so clients can
sign. NormalizeNetwork maps base/base-sepolia to CAIP-2 ids.
- Accept the v2 PAYMENT-SIGNATURE request header and emit both
X-PAYMENT-RESPONSE and PAYMENT-RESPONSE.
Backward compatible: the default network stays "base", the Facilitator
interface is unchanged (Settler is additive), and gateway/mcp builds and
tests unchanged. Adds tests for settle, CDP JWT, header aliases, extra,
and payload decoding.
A detailed post on `micro loop` — the autonomous loop that builds Go Micro,
now shippable as a command. Covers the mechanism/policy split (Actions as the
runtime, prompt files as editable policy), the five roles, the quickstart and
the two things the CLI can't do (token + branch protection), the load-bearing
decisions and the gotchas we hit (fresh-issue-per-run, bot-comment gating, the
persist-credentials 403), and the dogfood: Go Micro now runs on it. Sequel to
/blog/31 "How Go Micro Builds Itself".
Claude-Session: https://claude.ai/code/session_01CmdEY7pYmV5zzwCjNJ4ykL
Co-authored-by: Claude <noreply@anthropic.com>
* feat(loop): go-micro now runs on `micro loop` (dogfood its own tool)
Replace go-micro's five hand-written loop workflows with ones generated by
`micro loop init --roles all`, making "go-micro builds itself with micro loop"
literally true rather than aspirational.
- Generate loop-planner/builder/triage/coherence/release.yml via the CLI with
go-micro's cadence and wiring (planner :59, builder :29, coherence 07:00,
release 23:00; CI gate "Harness (E2E)"; token CODEX_TRIGGER_TOKEN; base master;
tag prefix v). The old loop-architect.yml and loop-devrel.yml become
loop-planner.yml and loop-coherence.yml.
- Move the queue to .github/loop/PRIORITIES.md and add .github/loop/NORTH_STAR.md
(a concise steer pointing to internal/docs/THESIS.md), adopting the loop's
convention.
- Preserve go-micro's rich instructions as editable policy in
.github/loop/prompts/{planner,builder,triage,coherence}.md — the architect
founder-lens + adoption steer, the increment builder, harness-failure triage,
and the DevRel changelog/blog pass — faithfully ported from the old inline
prompts. Behavior is preserved; only the mechanism is now generated.
- CLI refinement the migration surfaced: prompts (and NORTH_STAR/PRIORITIES) are
now write-once — `micro loop init --force` refreshes workflow MECHANICS but
never clobbers customized POLICY. Added renderKeep + a test.
- Update internal/docs/CONTINUOUS_IMPROVEMENT.md (renamed workflows, moved queue,
the prompt-file model, and a note that these files are generated by micro loop).
Verified: build, go test ./cmd/micro/loop/..., golangci-lint (0 issues), gofmt;
`micro loop verify` passes; all generated workflows are valid YAML; re-running
init --force is idempotent and preserves policy.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CmdEY7pYmV5zzwCjNJ4ykL
* loop: strip prompt editorial comments before posting to the agent
Verification of the migration surfaced that a dispatch workflow posted the
prompt file's leading <!-- editorial --> header to the agent, and __ISSUE__
inside it got substituted too (e.g. "Keep 4242 literal"). Harmless (invisible
in rendered markdown) but unclean and mildly confusing. The dispatch and triage
body construction now strips <!-- --> blocks with `sed '/<!--/,/-->/d'` before
substituting runtime tokens. Regenerated go-micro's workflows; added a test.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CmdEY7pYmV5zzwCjNJ4ykL
---------
Co-authored-by: Claude <noreply@anthropic.com>
Rework `micro loop` so the workflows are the mechanism and each dispatch role's
instruction is an editable .github/loop/prompts/<role>.md file (the policy).
That split lets any repo — including go-micro itself — customize behavior by
editing prompt files instead of forking the CLI, which is the prerequisite for
go-micro consuming its own tool without losing its richer prompts.
- Add two opt-in roles: `coherence` (README/docs/CHANGELOG alignment) and
`release` (cut the next patch tag on new commits; bakes in the
persist-credentials:false fix so the PAT push isn't clobbered by the
checkout token — the 403 we hit on the live release action).
- `--roles` selects which roles to scaffold (default planner,builder,triage;
`all` for everything); `--tag-prefix`, `--release-cron`, `--coherence-cron`
added. Templates keep the << >> delimiters so GHA ${{ }} passes through;
prompts leave __ISSUE__/__RUNURL__ as runtime tokens the workflow substitutes.
- `micro loop verify` now checks each present role workflow has its prompt.
- README updated with the five roles and a copy-pasteable flag example
(folds in the readability fix from the now-closed #3651).
Verified: build, `go test ./cmd/micro/loop/...`, vet, golangci-lint (0 issues),
gofmt; and an end-to-end `micro loop init --roles all` whose generated
workflows all parse as valid YAML and pass `micro loop verify`.
Claude-Session: https://claude.ai/code/session_01CmdEY7pYmV5zzwCjNJ4ykL
Co-authored-by: Claude <noreply@anthropic.com>
`micro loop init` writes an autonomous improvement loop into any repository —
the same planner/builder/triage loop that maintains go-micro, generalized:
- planner (loop-planner.yml): keeps a ranked queue in .github/loop/PRIORITIES.md
- builder (loop-builder.yml): builds the top open item as a single-concern PR,
auto-merged on green CI
- triage (loop-triage.yml): turns CI failures into scoped fix issues
plus .github/loop/NORTH_STAR.md (direction) and PRIORITIES.md (queue).
The agent adapter is mention-based, not hardcoded to Codex: `--agent @codex`
(or any @mention agent that responds on an issue and can run gh), `--token-secret`,
`--branch`, `--ci-workflow`, and cron flags are the whole config-vs-core boundary.
Templates use << >> delimiters so GitHub Actions' own ${{ }} expressions pass
through untouched. `micro loop verify` checks the wiring and flags the two things
the CLI can't: the token secret and branch protection (the green-CI gate).
Built inside go-micro with the config/core split already drawn, so the workflows
can later be extracted to a standalone reusable-workflows repo without a rewrite.
Claude-Session: https://claude.ai/code/session_01CmdEY7pYmV5zzwCjNJ4ykL
Co-authored-by: Claude <noreply@anthropic.com>
* docs: complete Ollama provider surface (capability matrix, README, example fixes)
Follow-up cleanup after merging the Ollama provider (#3636):
- Add the `ollama` row to the AI provider capability matrix in the provider
guide, and blank-import `ai/ollama` in provider_capabilities_test.go so the
matrix stays enforced against the registry (the provider registers a stream
but wasn't imported in that test, so its row went unchecked).
- README: bump "7 LLM providers" → 8 and list Ollama (local + cloud); add its
default model (`llama3.2`) to the model table.
- Fix a fictional model name shipped in the example and package doc:
`gemma4:31b-cloud` → `gpt-oss:120b`. gemma4 doesn't exist, and the `-cloud`
suffix is for cloud models proxied through a local Ollama, not the direct
ollama.com/v1 endpoint the example uses.
- Record the provider and the new agent.BaseURL/micro.AgentBaseURL option in
the CHANGELOG [Unreleased] section.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CmdEY7pYmV5zzwCjNJ4ykL
* loop-release: don't let checkout's persisted GITHUB_TOKEN clobber the PAT push
The daily release job computed the next tag correctly but the tag push 403'd:
"Permission to micro/go-micro.git denied to github-actions[bot]" (run
28554612450). Cause: actions/checkout persists the default GITHUB_TOKEN as an
http.extraheader Authorization credential for github.com, which git sends on
ALL requests to that host — including our manual
`git push https://x-access-token:${PAT}@github.com/...`. The persisted header
overrides the URL-embedded PAT, so the push authenticates as
github-actions[bot], which can't push tags (the job only grants
contents: read).
Set persist-credentials: false so no extraheader is written and the PAT in the
push URL is the only credential used.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CmdEY7pYmV5zzwCjNJ4ykL
---------
Co-authored-by: Claude <noreply@anthropic.com>
Follow-up cleanup after merging the Ollama provider (#3636):
- Add the `ollama` row to the AI provider capability matrix in the provider
guide, and blank-import `ai/ollama` in provider_capabilities_test.go so the
matrix stays enforced against the registry (the provider registers a stream
but wasn't imported in that test, so its row went unchecked).
- README: bump "7 LLM providers" → 8 and list Ollama (local + cloud); add its
default model (`llama3.2`) to the model table.
- Fix a fictional model name shipped in the example and package doc:
`gemma4:31b-cloud` → `gpt-oss:120b`. gemma4 doesn't exist, and the `-cloud`
suffix is for cloud models proxied through a local Ollama, not the direct
ollama.com/v1 endpoint the example uses.
- Record the provider and the new agent.BaseURL/micro.AgentBaseURL option in
the CHANGELOG [Unreleased] section.
Claude-Session: https://claude.ai/code/session_01CmdEY7pYmV5zzwCjNJ4ykL
Co-authored-by: Claude <noreply@anthropic.com>
Add a dedicated Ollama AI provider (ai/ollama/) that auto-detects
local vs cloud mode based on the base URL:
- Local Ollama: native /api/chat endpoint with NDJSON streaming
- Ollama Cloud: OpenAI-compatible /v1/chat/completions with SSE streaming
Both modes support tool calls with a multi-round execution loop.
Add agent.BaseURL option so agents can point at non-default LLM
endpoints (e.g. local Ollama, proxies). Wire it through micro.AgentBaseURL
at the top level.
Include a complete example (examples/agent-ollama/) demonstrating a
knowledge-base service with auto-discovered tools, a custom time tool,
streaming, and env-var configuration for local vs cloud.
Closes#3632
The DevRel pass now keeps the changelog living instead of letting it drift:
each daily run reconciles a Keep-a-Changelog `[Unreleased]` section against the
PRs that actually merged (user-facing entries only; internal loop/CI churn
skipped) and rolls it into a dated version heading whenever loop-release cuts a
new v6.MINOR.PATCH tag. When enough user-facing work has accumulated (roughly a
week's worth, not a near-empty post every day) it also drafts a "what's new"
changelog blog post narrating what shipped.
Autonomy boundary preserved: CHANGELOG.md upkeep is a safe factual change and
rides the auto-merged DevRel PR; the changelog blog post is opened as its own
PR but left for the human to review/merge, since blog voice stays with the human.
Also fix the CHANGELOG preamble: it claimed calendar versions (YYYY.MM) while
tags are semver (v6.MINOR.PATCH). Correct it, add an `[Unreleased]` section
seeded from real recent work, and note the historical 2026.0x headings.
Claude-Session: https://claude.ai/code/session_01CmdEY7pYmV5zzwCjNJ4ykL
Co-authored-by: Claude <noreply@anthropic.com>
There was no working, prominent Discord link. Update the stale invite code
(WeMU5AGxD → G8Gk5j3uXr) everywhere it appeared (README, docs, blog, landing,
SECURITY, issue templates, contrib), and add the link prominently: the site
nav and footer includes (so it shows on every landing/docs/blog page), a
Discord badge + a Community line in the README, and a "Join Discord" button on
the landing.
Co-authored-by: Claude <noreply@anthropic.com>
The framework's depth is strong but the on-ramp is the adoption gap, and the
architect queue had filled entirely with internal hardening. Steer the
architect to weight the developer on-ramp/DX (first-agent tutorial,
discoverable examples, docs wayfinding, install friction, debugging) at least
as highly as internal work — a developer succeeding on their first agent
matters more than another conformance/observability increment. Adoption issues
filed: #3561-#3565.
Also add loop-release.yml: a daily patch release that tags v6.MINOR.PATCH+1
when master has new commits (pushed with the PAT so goreleaser fires), so the
installable framework tracks the loop's daily improvements instead of lapsing.
Minor/major bumps stay with the human.
Co-authored-by: Claude <noreply@anthropic.com>
Rename the autonomous-loop workflows so the Actions list maps to the
long-running-agent harness pattern (planner → generator → evaluator):
architecture-review.yml -> loop-architect.yml "Loop: Architect (Planner)"
continuous-improvement.yml -> loop-builder.yml "Loop: Builder (Generator)"
devrel-review.yml -> loop-devrel.yml "Loop: DevRel"
harness-triage.yml -> loop-triage.yml "Loop: Triage (Evaluator feedback)"
harness.yml stays the shared Evaluator/CI gate (triage still matches it by the
"Harness (E2E)" name). Document the pipeline + role mapping in
CONTINUOUS_IMPROVEMENT.md, and point to it from CONTRIBUTING so the development
process is discoverable. No behavior change — schedules, gates, and required
checks are unaffected.
Co-authored-by: Claude <noreply@anthropic.com>
Close the loop's feedback path: when the live provider-conformance harness
fails, harness-triage.yml dispatches Codex to triage the failing run — read
logs, root-cause, dedupe against open issues, and file scoped codex/enhancement
issues that the hourly increment loop then fixes and the next harness run
verifies. Transient flakes are ignored; breaking/architectural fixes are
escalated as needs-human rather than auto-built. No human in the middle short
of a genuine judgment call. Documented in CONTINUOUS_IMPROVEMENT.md.
Co-authored-by: Claude <noreply@anthropic.com>
Match the real-model conformance cadence to the dev/loop velocity so live
regressions and provider drift surface within the hour instead of up to 24h.
The mock harness already runs on every push/PR; this only changes the live
(credentialed) schedule.
Co-authored-by: Claude <noreply@anthropic.com>
* atlascloud: env-selectable chat model; run conformance on a stronger model
The daily provider-conformance harness fails 4/5 harnesses on Atlas Cloud —
its default chat model answers agent/tool-use conformance prompts
conversationally instead of performing the task. Atlas is currently the only
provider with a key configured, so the whole live run is red.
Make the Atlas Cloud provider honor an ATLASCLOUD_MODEL env override (falling
back to the existing default), and set it in the harness workflow to a
stronger tool-use model (Qwen3, overridable via an Actions variable). No
change to the default for normal use.
* atlascloud: use minimaxai/minimax-m3 for conformance model
---------
Co-authored-by: Claude <noreply@anthropic.com>
* blog+docs: drop the word "bet" from the tRPC-Agent-Go comparison
Reword "two bets" / "opposite bet" / "the bet is" to approaches / premise /
principle across blog/32 and the comparison guide.
* blog: expand /blog/32 into a field guide on agent frameworks
Roughly double the length with deeper context: the first wave (LangChain &
co.), the two layers of a harness (intra-agent vs operational), loop
engineering and the move to scheduled/looping/work-performing agents, a
survey of where the frameworks are going (LangGraph, CrewAI, AutoGen, ADK,
tRPC-Agent-Go), then Go Micro's "an agent is a service" position, the honest
tRPC-Agent-Go contrast, and MCP/A2A interop. Drops the word "bet" throughout.
---------
Co-authored-by: Claude <noreply@anthropic.com>
Add a fair, honest positioning piece on the architectural fork with
tRPC-Agent-Go (an agent SDK alongside your services / graph DSL) vs Go Micro
(one runtime where an agent is a service, every endpoint a tool, durable
flows not a graph DSL). New blog post /blog/32 + a parallel section in the
existing comparison guide; honest about where tRPC-Agent-Go is ahead
(eval, self-evolution, RAG) and that they interoperate over MCP/A2A.
Co-authored-by: Claude <noreply@anthropic.com>
Add the verification loop as a ranked priority — the one missing layer from
the four-loop framing (agent / verification / event-driven / hill-climbing):
flow.Verify + flow.LLMGrader to grade a step's output against a rubric and
retry with feedback. The architect will re-rank on its next pass.
Co-authored-by: Claude <noreply@anthropic.com>
The gateway already serves /mcp/tools on :8080 unconditionally (every
endpoint is an AI-callable tool), but the startup banner only printed an MCP
line when --mcp-address was set — so the live `micro run` experience hid the
harness's signature feature even though it was running, and didn't match the
README. Always advertise MCP Tools on the gateway address; keep the optional
standalone MCP-protocol server (--mcp-address) as a clearly separate line.
No behavior change — banner output only.
Co-authored-by: Claude <noreply@anthropic.com>
Queue the Next-phase agent streaming item and the a2a multi-skill gap that
block a real consumer from retiring its bespoke planner / A2A handler. The
architecture-review pass re-ranks from here.
* gateway/mcp: configurable initialize + named not-found
NewHandler takes HandlerOptions: WithServerInfo(name, version) and WithProtocolVersion set the initialize response so a product can brand the endpoint instead of advertising go-micro-mcp/2024-11-05. ManualResolver's not-found error now includes the tool name.
* gateway/mcp: configurable initialize + named not-found
NewHandler takes HandlerOptions: WithServerInfo(name, version) and WithProtocolVersion set the initialize response so a product can brand the endpoint instead of advertising go-micro-mcp/2024-11-05. ManualResolver's not-found error now includes the tool name.
* gateway/mcp: richer resolver Call + spec-correct HTTP handler
Resolver.Call now returns (*CallResult, error): a tool that ran but failed sets CallResult.IsError (returned as a tools/call result with isError:true, per the MCP spec), while a protocol/pre-check failure returns an error -- an *RPCError carries a specific JSON-RPC code. The HTTP handler also answers notifications/* (and id-less requests) with 204 and no body.
* gateway/mcp: richer resolver Call + spec-correct HTTP handler
Resolver.Call now returns (*CallResult, error): a tool that ran but failed sets CallResult.IsError (returned as a tools/call result with isError:true, per the MCP spec), while a protocol/pre-check failure returns an error -- an *RPCError carries a specific JSON-RPC code. The HTTP handler also answers notifications/* (and id-less requests) with 204 and no body.
* gateway/mcp: richer resolver Call + spec-correct HTTP handler
Resolver.Call now returns (*CallResult, error): a tool that ran but failed sets CallResult.IsError (returned as a tools/call result with isError:true, per the MCP spec), while a protocol/pre-check failure returns an error -- an *RPCError carries a specific JSON-RPC code. The HTTP handler also answers notifications/* (and id-less requests) with 204 and no body.
* gateway/mcp: swappable Resolver + mountable JSON-RPC HTTP handler
Adds a Resolver interface (Manual/Registry) so the tool source is
pluggable, and NewHandler(resolver) serving standard MCP JSON-RPC over
HTTP as an http.Handler you can mount on your own server. Neither
resolver exposes the internal store/broker tools. Additive — the
existing Serve() path is unchanged.
* gateway/mcp: swappable Resolver + mountable JSON-RPC HTTP handler
Adds a Resolver interface (Manual/Registry) so the tool source is
pluggable, and NewHandler(resolver) serving standard MCP JSON-RPC over
HTTP as an http.Handler you can mount on your own server. Neither
resolver exposes the internal store/broker tools. Additive — the
existing Serve() path is unchanged.
* gateway/mcp: swappable Resolver + mountable JSON-RPC HTTP handler
Adds a Resolver interface (Manual/Registry) so the tool source is
pluggable, and NewHandler(resolver) serving standard MCP JSON-RPC over
HTTP as an http.Handler you can mount on your own server. Neither
resolver exposes the internal store/broker tools. Additive — the
existing Serve() path is unchanged.
Streaming is implemented now (v6.3.3); the old test expected
ErrStreamingUnsupported and failed. Replace it with a real SSE streaming
test (httptest) that also asserts stream_options.include_usage and the
final usage chunk.
* ai/atlascloud: surface token usage on streams
Request stream_options.include_usage and return the final usage chunk
as a Response with Usage set, so streaming callers can record usage.
* ai/openai: surface token usage on streams
Request stream_options.include_usage and return the final usage chunk
as a Response with Usage set, so streaming callers can record usage.
* Initial plan
* fix: remove extra blank line in ai/anthropic/anthropic.go (gofmt)
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
* ai: add WithMaxTokens option
Let callers cap response length; providers send max_tokens when set
(anthropic keeps its 8192 default otherwise).
* ai: add WithMaxTokens option
Let callers cap response length; providers send max_tokens when set
(anthropic keeps its 8192 default otherwise).
* ai: add WithMaxTokens option
Let callers cap response length; providers send max_tokens when set
(anthropic keeps its 8192 default otherwise).
* ai: add WithMaxTokens option
Let callers cap response length; providers send max_tokens when set
(anthropic keeps its 8192 default otherwise).
* ai/atlascloud: thread Request.Messages into the request
Fold conversation history (req.Messages) between the system prompt and
the final user prompt so multi-turn context reaches the model.
Refs #3292
* ai/openai: thread Request.Messages into the request
Fold conversation history (req.Messages) between the system prompt and
the final user prompt so multi-turn context reaches the model.
Refs #3292
* ai/anthropic: thread Request.Messages into the request
Fold conversation history (req.Messages) between the system prompt and
the final user prompt so multi-turn context reaches the model.
Refs #3292
* ci: run the architect continuously as the founder lens
Make the architect a continuous overseer (hourly at :59, just before the :29
increment) instead of an every-few-days check-in. Each run it tracks live state
(what merged, what's in flight), keeps the roadmap priorities live, and judges
cohesion across harness/framework/dev-UX plus missing pieces and realignment —
re-ranking internal/docs/PRIORITIES.md to match reality. It only opens a PR when
the ranking actually changes (otherwise it just posts an assessment and closes
its issue), to avoid churn.
* thesis: lead the North Star with the mission, grounded in the canon
Instill the years of context the loop was missing: the vision lives in the
corpus (blog, README, website), not a single doc. Lead THESIS.md with an
explicit Mission — "what problem we solve" (make building an agent as easy as
building a service, on one runtime, because an agent is a distributed system),
distilled from the corpus — and name the blog/README/website as the canon the
North Star is a distillation of and must stay faithful to. Wire the architect to
judge every priority against the mission and re-derive alignment from the canon,
flagging drift in either direction (work vs mission, or thesis vs the blog).
---------
Co-authored-by: Claude <noreply@anthropic.com>
The architect now prioritizes the roadmap + an internal scan into a single
ranked, issue-linked queue in internal/docs/PRIORITIES.md (re-ranked each run),
and the hourly increment loop works the top open item from that queue instead
of independently guessing each hour — falling back to its own judgment only
when the queue is empty. So work is roadmap-driven by default and the human can
redirect by reordering the file or its issues.
- New internal/docs/PRIORITIES.md (seeded from the roadmap + open issues).
- architecture-review.yml: architect owns/re-ranks PRIORITIES.md and keeps each
top item backed by a scoped issue.
- continuous-improvement.yml: pick the top open queue item; close both the
priority issue and the run tracker.
- CONTINUOUS_IMPROVEMENT.md: document the architect → queue → increment pipeline.
Co-authored-by: Claude <noreply@anthropic.com>
A post on how the framework is increasingly built by an autonomous loop of
two AI agents (Codex implementing scoped increments, Claude Code
orchestrating, the human setting direction): the dispatch→build→auto-merge
mechanism, the three altitudes (architect/increment/DevRel), the failure
modes we hit wiring it up, and the concrete increments it produces.
Claude-Session: https://claude.ai/code/session_01CmdEY7pYmV5zzwCjNJ4ykL
Co-authored-by: Claude <noreply@anthropic.com>
The hourly loop ships increments but nothing watches the whole. Add two
periodic high-altitude passes, same dispatch mechanism (fresh issue → @codex):
- devrel-review.yml (daily): audits README, website, docs, blog for coherence
with the North Star, README crispness, and blog-worthy material. Safe
alignment/crispness fixes auto-merge; brand/positioning copy and blog drafts
are surfaced in a report for the human, never auto-merged.
- architecture-review.yml (every ~3 days): reviews the framework/harness against
the thesis and files scoped follow-up issues that feed the increment loop. It
does not make breaking/architectural changes itself.
Documented both in CONTINUOUS_IMPROVEMENT.md (Overseer passes).
Claude-Session: https://claude.ai/code/session_01CmdEY7pYmV5zzwCjNJ4ykL
Co-authored-by: Claude <noreply@anthropic.com>
The section only mentioned micro run (services) and micro deploy. Update it
to the current lifecycle DX: micro new scaffolds a service or agent (every
endpoint an MCP tool), micro run starts everything with hot reload + gateway
+ console, and micro chat talks to agents and services. Drops micro deploy.
Claude-Session: https://claude.ai/code/session_01CmdEY7pYmV5zzwCjNJ4ykL
Co-authored-by: Claude <noreply@anthropic.com>
* ci: self-merge Codex PRs via native auto-merge; retire the sweep
With branch protection + "Allow auto-merge" now enabled on master, Codex
enables GitHub auto-merge on its own PR (gh pr merge --squash --auto) right
after opening it, so the PR lands the moment the required CI checks pass —
no polling sweep, and the green-CI gate is enforced by GitHub instead of by
gh pr checks in a cron. Removes auto-merge-codex.yml and updates the dispatch
and AGENTS.md accordingly.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CmdEY7pYmV5zzwCjNJ4ykL
* docs: document the durable loop mechanics (stub→gh, branch, auto-merge)
Capture the hard-won wiring of the autonomous loop so it isn't re-derived:
fresh issue per increment, user-PAT dispatch (Codex ignores the bot), Codex
opening the PR via gh (make_pr is a no-op stub), unique codex/ branch + label,
and native auto-merge gated by branch protection with 0 approvals. Adds a
"do-not-break" list (don't re-add approvals, don't reuse one tracker issue,
don't use make_pr, don't re-implement during the summary→PR lag).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CmdEY7pYmV5zzwCjNJ4ykL
* website: rename section to "Features"; trim subtitle
Rename the feature-grid heading from "The Runtime Around the Agent" to
"Features", and drop "once they leave the demo." from the subtitle.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CmdEY7pYmV5zzwCjNJ4ykL
---------
Co-authored-by: Claude <noreply@anthropic.com>
With branch protection + "Allow auto-merge" now enabled on master, Codex
enables GitHub auto-merge on its own PR (gh pr merge --squash --auto) right
after opening it, so the PR lands the moment the required CI checks pass —
no polling sweep, and the green-CI gate is enforced by GitHub instead of by
gh pr checks in a cron. Removes auto-merge-codex.yml and updates the dispatch
and AGENTS.md accordingly.
Claude-Session: https://claude.ai/code/session_01CmdEY7pYmV5zzwCjNJ4ykL
Co-authored-by: Claude <noreply@anthropic.com>
Codex was pushing to a generic branch (e.g. "work"), which the auto-merge
sweep ignores (it only matches codex/* branches with the codex label) and
which collides across runs. The dispatch and AGENTS.md now instruct Codex to
create a unique codex/increment-<issue> branch and pass --label codex to
gh pr create, so every increment is isolated and actually swept.
Claude-Session: https://claude.ai/code/session_01CmdEY7pYmV5zzwCjNJ4ykL
Co-authored-by: Claude <noreply@anthropic.com>
The initial AGENTS.md instructed Codex tasks to use the make_pr tool and
said a shell GitHub token "is not a substitute" — but make_pr in the Codex
sandbox is a no-op stub that only records metadata and never opens a PR, so
that guidance steers every run back into the broken path. Replace it with
the working flow: push the branch and open the PR with the gh CLI
(git push + gh pr create), which is what actually creates PRs now.
Claude-Session: https://claude.ai/code/session_01CmdEY7pYmV5zzwCjNJ4ykL
Co-authored-by: Claude <noreply@anthropic.com>
Codex's make_pr tool in the Cloud sandbox is a no-op stub — it records the
PR title/body and returns them "for downstream consumption" (the manual
"Create PR" click), but never pushes a branch or calls the GitHub API. That
is why "make_pr called, nothing happened": the tool literally cannot open a
PR. With the gh CLI now installed in the Codex setup and origin pointed at
the repo, the dispatch tells Codex to push and open the PR itself
(git push + gh pr create) instead of relying on make_pr.
Claude-Session: https://claude.ai/code/session_01CmdEY7pYmV5zzwCjNJ4ykL
Co-authored-by: Claude <noreply@anthropic.com>
Codex derives its PR branch name from the triggering issue's context, so
re-commenting on a single tracker issue (#3024) every hour collapsed every
increment onto one branch name. The first increment opened a PR; the rest
collided on the occupied branch and silently failed to open one — which is
why repeated runs produced "make_pr called, nothing happened."
Open a unique issue per run and dispatch Codex there, so each increment gets
its own branch and a clean PR. The dispatch asks Codex to "Closes #<issue>"
so each tracking issue auto-closes when its PR merges. The explicit
branch-name request (which Codex ignored in favor of the issue-derived name)
is dropped.
Claude-Session: https://claude.ai/code/session_01CmdEY7pYmV5zzwCjNJ4ykL
Co-authored-by: Claude <noreply@anthropic.com>
* fix: harden flow step execution against nil Run and cancellation
A step with no Run function panicked the run; it now returns a clear
configuration error. The retry loop also kept retrying after the run's
context was canceled or its deadline passed — it now stops immediately
and surfaces the context error, preserving cancellation/deadline
semantics for durable workflow runs. Adds regression coverage for both.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CmdEY7pYmV5zzwCjNJ4ykL
* ci: give each Codex dispatch a unique branch to avoid collisions
Codex derives its PR branch name from the dispatch text. The hourly loop
posted an identical generic prompt every run, so every increment resolved
to the same branch name — the previous increment's branch (until auto-
merged and deleted) blocked the next PR from opening. Include the run
number in the prompt and explicitly request a fresh
codex/improvement-<run_number> branch, so each increment is isolated.
auto-merge-codex.yml still matches (codex/* prefix) and deletes on merge.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CmdEY7pYmV5zzwCjNJ4ykL
---------
Co-authored-by: Claude <noreply@anthropic.com>
A step with no Run function panicked the run; it now returns a clear
configuration error. The retry loop also kept retrying after the run's
context was canceled or its deadline passed — it now stops immediately
and surfaces the context error, preserving cancellation/deadline
semantics for durable workflow runs. Adds regression coverage for both.
Claude-Session: https://claude.ai/code/session_01CmdEY7pYmV5zzwCjNJ4ykL
Co-authored-by: Claude <noreply@anthropic.com>
* thesis: position Go Micro as complementary to LangChain, not competing
Add a 'Where we fit' section: 'harness' has two layers — the intra-agent
harness (single-model runtime: prompts, tools, context, sandbox, the Ralph
loop) that LangChain/LangGraph/deepagents/Claude Code own and we do NOT
compete with, and the operational harness (the distributed substrate agents
operate inside: services-as-tools, discovery, durable runs, observability,
interop, the services->agents->workflows lifecycle) which is our focus. They
stack and interoperate via MCP/A2A; we make those agents better neighbours,
not obsolete.
* ci: gate Codex dispatch on CODEX_TRIGGER_TOKEN secret
Codex ignores @codex comments authored by the github-actions bot, so the
hourly dispatch was producing no PRs while still posting to the tracker
issue. Gate the comment step on the presence of CODEX_TRIGGER_TOKEN: the
workflow now no-ops until a PAT for a Codex-followed account is set, then
activates automatically with no further change.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CmdEY7pYmV5zzwCjNJ4ykL
---------
Co-authored-by: Claude <noreply@anthropic.com>
Add a 'Where we fit' section: 'harness' has two layers — the intra-agent
harness (single-model runtime: prompts, tools, context, sandbox, the Ralph
loop) that LangChain/LangGraph/deepagents/Claude Code own and we do NOT
compete with, and the operational harness (the distributed substrate agents
operate inside: services-as-tools, discovery, durable runs, observability,
interop, the services->agents->workflows lifecycle) which is our focus. They
stack and interoperate via MCP/A2A; we make those agents better neighbours,
not obsolete.
Co-authored-by: Claude <noreply@anthropic.com>
Grid items defaulted to min-width:auto, so the wide <pre> blocks (install
command, the 'micro run' sample) forced their row past the viewport —
clipped by overflow-x:hidden, so no scroll but not fitting either. Let
grid items shrink (.two-col > * { min-width:0 }) and wrap the code blocks
on mobile (white-space:pre-wrap; overflow-wrap:anywhere) so every section
fits the screen with no overflow or scroll.
Co-authored-by: Claude <noreply@anthropic.com>
Replace the docs header 'Menu' button with a ☰ burger icon and move it to the
left next to the wordmark (where the logo used to be), grouped in a .nav-left
container. Keeps id=menuToggle so the existing sidebar-toggle JS still works;
desktop is unchanged (toggle hidden).
Co-authored-by: Claude <noreply@anthropic.com>
Remove the logo image from the nav-brand in the marketing nav include and the
docs and blog layouts; the brand is now just the 'Go Micro' wordmark.
Co-authored-by: Claude <noreply@anthropic.com>
Add internal/docs/THESIS.md — the vision the autonomous loop steers by: a
holistic agent harness AND service framework encapsulating the lifecycle of
services -> agents -> workflows (workloads come after agents; the value is in
composing it into systems that do real work, on schedules and in loops).
Wire it in as the alignment criterion: the continuous-improvement charter and
the Codex dispatch prompt now require every increment to advance the North Star,
so improvements compound toward the thesis instead of drifting locally.
Co-authored-by: Claude <noreply@anthropic.com>
- continuous-improvement: cadence 12h -> hourly.
- add auto-merge-codex workflow: every 15 min, merge open PRs that are
codex-labelled AND from a codex/* branch once all checks are green
(gh pr checks). CI (build/test/lint/harnesses) is the only gate — no
human involvement. Scoped tightly so nothing else auto-merges.
Co-authored-by: Claude <noreply@anthropic.com>
A Claude Max subscription exposes no API key for CI, and Atlas Cloud models
can't run a coding agent — so the durable scheduler triggers Codex instead:
on a cadence it posts an @codex instruction on the tracker issue (#3024) to
run one improvement increment. Prefers a CODEX_TRIGGER_TOKEN PAT if set
(in case Codex ignores the Actions bot), else the default token.
Co-authored-by: Claude <noreply@anthropic.com>
* loop: establish the continuous-improvement charter + scheduled backbone
Define the autonomous improvement loop (internal/docs/CONTINUOUS_IMPROVEMENT.md):
full autonomy with correctness (build/test/lint) as the only gate, work sourced
from roadmap + issues + an improvement radar + dogfooding, Claude Code driving
and Codex executing scoped tasks, with brand/positioning and breaking API kept
with the human.
Add a durable scheduled GitHub Action (.github/workflows/continuous-improvement.yml)
as the session-independent backbone — a safe no-op until an ANTHROPIC_API_KEY
secret is added.
* docs: mark harness Resilience as shipped
Resilience (per-call timeout + context propagation + opt-in retry/backoff)
landed in #3017/#3021; update the agent-harness status table from
'In progress' to 'Shipped'.
---------
Co-authored-by: Claude <noreply@anthropic.com>
Define the autonomous improvement loop (internal/docs/CONTINUOUS_IMPROVEMENT.md):
full autonomy with correctness (build/test/lint) as the only gate, work sourced
from roadmap + issues + an improvement radar + dogfooding, Claude Code driving
and Codex executing scoped tasks, with brand/positioning and breaking API kept
with the human.
Add a durable scheduled GitHub Action (.github/workflows/continuous-improvement.yml)
as the session-independent backbone — a safe no-op until an ANTHROPIC_API_KEY
secret is added.
Co-authored-by: Claude <noreply@anthropic.com>
Follow-up to #3017. A Generate runs the whole tool-execution turn, so
auto-retrying it re-runs already-executed (possibly side-effecting) tool
calls. Default ModelMaxAttempts 3 -> 1: retries are now opt-in via
ModelRetry. The timeout stays as a safety net.
Also harden ai.GenerateWithRetry: always back off between retries
(exponential, capped at 30s, default 200ms if unset) so an opt-in retry
can't busy-loop the provider even with Backoff=0.
Verified: go build, go test -race ./agent/... ./ai/, golangci-lint.
Co-authored-by: Claude <noreply@anthropic.com>
- h1: 'An Agent Harness and Service Framework' (drop 'in Go')
- tagline: 'Build agents, services, and workflows on one runtime'
- move the hero image into the hero block (between tagline and the install
line), capped at 800px to fit the hero column, and remove the separate
full-width image section
Co-authored-by: Claude <noreply@anthropic.com>
- Regenerate the hero image (text-free, via the framework's own Atlas Cloud
image model) — an agent orchestrating service nodes. The old one had baked-in
'AI native microservices framework' text that contradicts the positioning;
text-free so copy changes can't invalidate it again.
- h1 -> 'An Agent Harness and Service Framework in Go' (both, not harness-only).
- Tagline reframed around agents, services, and flows on one runtime.
- Drop the 'moved from a service framework to an agent harness' line — it's
additive (both in one), not a pivot away from services.
Co-authored-by: Claude <noreply@anthropic.com>
Add matching 'Coordination' sections so Claude Code and Codex self-coordinate:
lane/branch ownership (claude/* vs codex/*, never share a branch), base PRs
on master (don't stack on an in-flight branch — the #3007 orphan lesson),
one concern per PR, cross-review before merge, the @codex dispatch
conventions (review reserved, serial, fix-in-place), and CI as the gate.
Co-authored-by: Claude <noreply@anthropic.com>
- Add the canonical concept doc 'The Agent Harness' (docs/guides/agent-harness.md)
+ nav entry: what the harness is, each piece mapped to a feature, honest
about shipped vs in-progress.
- Add blog post /blog/30 'Go Micro is an Agent Harness' (the public articulation;
precise about what ships today vs the Now/Next roadmap).
- Align the ROADMAP.md opening line to the agent-harness framing.
Claude-Session: https://claude.ai/code/session_01CmdEY7pYmV5zzwCjNJ4ykL
Co-authored-by: Claude <noreply@anthropic.com>
Follow-up to #3006:
- provider-conformance: build each harness to a temp binary and run that
instead of 'go run'. 'go run' launches the harness as a child it doesn't
kill on context cancellation, so a timed-out harness (which starts local
services) could be orphaned and outlive the run. Running the built binary
makes the per-run timeout actually terminate the work.
- contract test: skip under -short, and use 'go build ./...' instead of
'go test ./...' (the contract is that the generated service builds). This
keeps the default unit-test suite from shelling out to the toolchain and
the network on every run.
Claude-Session: https://claude.ai/code/session_01CmdEY7pYmV5zzwCjNJ4ykL
Co-authored-by: Claude <noreply@anthropic.com>
Add a blog post for the OpenAI Codex for Open Source grant, list it on
the blog index, and repoint the OpenAI sponsor logo (README + landing) to
the post — matching how the Anthropic (/blog/3) and Atlas Cloud (/blog/8)
sponsor logos link to their posts.
Co-authored-by: Claude <noreply@anthropic.com>
Go Micro received an OpenAI Codex for Open Source grant. Add the OpenAI
logo to the README and landing-page sponsors, alongside Anthropic and
Atlas Cloud.
Co-authored-by: Claude <noreply@anthropic.com>
Adds the agentic 'loop' to flows: flow.Loop(body, opts...) is a StepFunc
that runs a body step repeatedly, carrying State across passes, until a
stop condition fires or a hard iteration cap is reached.
- Stop modes: flow.Until (code-defined predicate) and flow.UntilLLM (the
model judges the goal met after each pass — the supervised 'Ralph'
loop). Either firing stops the loop.
- flow.LoopMax is the guardrail: the body never runs more than n times, so
the loop always terminates and can't run up an unbounded bill. Hitting
the cap returns the latest state rather than erroring.
- flow.OnIteration reports per-pass progress.
- Composes as a normal flow step (checkpointed by the step engine).
- Exposed at the top level as micro.FlowLoop / FlowUntil / FlowUntilLLM /
FlowLoopMax / FlowOnIteration, symmetric with the other Flow* helpers.
Includes tests, an offline runnable example (examples/flow-loop), an
'Agent Loops' guide, and a CHANGELOG entry.
Claude-Session: https://claude.ai/code/session_01CmdEY7pYmV5zzwCjNJ4ykL
Co-authored-by: Claude <noreply@anthropic.com>
Extract the nav and footer link lists into _includes/nav-links.html and
_includes/footer-links.html, and the full marketing nav/footer into
_includes/marketing-nav.html and _includes/marketing-footer.html.
- index.html and support.html now pull their nav/footer from the shared
marketing includes (and gain Liquid front matter so includes resolve).
- The docs and blog layouts pull the same link lists, so a nav/footer
link lives in exactly one place site-wide. This also adds the missing
Support link to the blog nav and fixes the blog footer's Support link
(it still pointed at the question template).
- Active nav state is driven by a per-page nav_active flag.
Verified with a local jekyll build: landing, support, docs, and blog
pages all render the shared nav/footer correctly.
Co-authored-by: Claude <noreply@anthropic.com>
* website: add Support to top nav (landing + docs layout)
Link /docs/support.html from the nav bar on the landing page and the
shared docs layout, and point the docs-layout footer Support link there
too (was the question issue template).
* website: add a dedicated marketing /support page
New top-level /support.html styled like the landing site (hero, tier
cards, community links, CTAs) — separate from the docs reference at
/docs/support.html. Repoint the site nav, footer, landing 'Commercial
support' button, and the FUNDING button to it.
* website: serve the support page at a clean /support URL
Add 'permalink: /support' to support.html (same mechanism the blog uses)
and point all nav/footer/CTA/FUNDING links at /support instead of
/support.html.
---------
Co-authored-by: Claude <noreply@anthropic.com>
Drop the 'Every service is an MCP tool; every agent speaks A2A' sentence
and use 'workflows' (clearer than 'flows') in the one-liner.
Co-authored-by: Claude <noreply@anthropic.com>
* lint: clear the golangci-lint backlog and enforce a blocking lint in CI
Fixes#2988. Brings 'golangci-lint run ./...' to zero issues (was ~373):
- errcheck: explicitly ignore fire-and-forget calls with '_ =' (and a small
errcheck.exclude-functions list for response writes — json Encoder.Encode,
http ResponseWriter.Write, fmt.Fprint*); genuine cases handled.
- unused: remove dead code (unexported decls and dead test helpers) and the
imports they orphaned.
- staticcheck: ST1005 error strings, ST1016 receiver names, S1000/S1017/S1019/
S1023 simplifications, SA4004/SA4006/SA4010 dead code, SA1021 net.IP.Equal,
SA6002 (store *[]byte in sync.Pool).
- govet: fix a context leak (lostcancel) in internal/util/mdns and move
t.Fatal/Fatalf out of goroutines (testinggoroutine) in tests.
- ineffassign, unconvert: mechanical fixes.
CI: the Lint workflow now runs a blocking full-tree 'golangci-lint run' on
pushes and PRs (dropped only-new-issues now that the tree is clean).
Verified: go build, go vet, test compilation, and unit tests for the
behaviourally-touched packages all pass.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CmdEY7pYmV5zzwCjNJ4ykL
* website: emit go-source meta for /vN paths
pkg.go.dev uses go-source to link to the right files and lines. The /vN
go-get response now returns go-source alongside go-import. Does not affect
go install resolution.
---------
Co-authored-by: Claude <noreply@anthropic.com>
Fixes#2988. Brings 'golangci-lint run ./...' to zero issues (was ~373):
- errcheck: explicitly ignore fire-and-forget calls with '_ =' (and a small
errcheck.exclude-functions list for response writes — json Encoder.Encode,
http ResponseWriter.Write, fmt.Fprint*); genuine cases handled.
- unused: remove dead code (unexported decls and dead test helpers) and the
imports they orphaned.
- staticcheck: ST1005 error strings, ST1016 receiver names, S1000/S1017/S1019/
S1023 simplifications, SA4004/SA4006/SA4010 dead code, SA1021 net.IP.Equal,
SA6002 (store *[]byte in sync.Pool).
- govet: fix a context leak (lostcancel) in internal/util/mdns and move
t.Fatal/Fatalf out of goroutines (testinggoroutine) in tests.
- ineffassign, unconvert: mechanical fixes.
CI: the Lint workflow now runs a blocking full-tree 'golangci-lint run' on
pushes and PRs (dropped only-new-issues now that the tree is clean).
Verified: go build, go vet, test compilation, and unit tests for the
behaviourally-touched packages all pass.
Claude-Session: https://claude.ai/code/session_01CmdEY7pYmV5zzwCjNJ4ykL
Co-authored-by: Claude <noreply@anthropic.com>
* docs: compare Go Micro with Google ADK in the comparison guide
Adds a 'vs Agent Frameworks (Google ADK)' section: ADK builds an agent,
Go Micro builds the distributed system the agent lives in (agents are
services in the mesh). Covers the category difference, a feature table,
when to choose each, and MCP/A2A interoperability.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CmdEY7pYmV5zzwCjNJ4ykL
* docs: replace ADK comparison slogan with concrete explanation
State plainly what each tool provides (ADK builds an agent process; Go Micro
builds the surrounding service mesh) instead of marketing phrasing.
* lint: apply golangci-lint autofixes; exclude ST1003 and demo errcheck
Mechanical, behaviour-preserving fixes applied by 'golangci-lint run --fix':
gofmt, misspell (US spelling), usestdlibvars (http.Method*/Status*), unconvert,
and the auto-fixable staticcheck simplifications (QF*, S1017/S1019/S1023/S1039).
Config: exclude ST1003 (remaining offenders are exported API renames, e.g.
web.Id, which would break compatibility) and skip errcheck for examples/ and
internal/harness/ (demo code where fire-and-forget is intentional).
Build and test compilation verified.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CmdEY7pYmV5zzwCjNJ4ykL
* lint: WIP cleanup checkpoint (errcheck config + partial fixes)
Checkpoint of an in-progress golangci-lint cleanup (background pass). Builds
cleanly; lint is not yet zero. Follow-up commit will complete the cleanup and
switch CI to a blocking full-tree lint.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CmdEY7pYmV5zzwCjNJ4ykL
---------
Co-authored-by: Claude <noreply@anthropic.com>
* docs: compare Go Micro with Google ADK in the comparison guide
Adds a 'vs Agent Frameworks (Google ADK)' section: ADK builds an agent,
Go Micro builds the distributed system the agent lives in (agents are
services in the mesh). Covers the category difference, a feature table,
when to choose each, and MCP/A2A interoperability.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CmdEY7pYmV5zzwCjNJ4ykL
* docs: replace ADK comparison slogan with concrete explanation
State plainly what each tool provides (ADK builds an agent process; Go Micro
builds the surrounding service mesh) instead of marketing phrasing.
---------
Co-authored-by: Claude <noreply@anthropic.com>
Plain 'go install go-micro.dev/v6/cmd/micro@latest' fails on the public
module proxy with a version-constraints conflict: the proxy has cached the
sub-paths go-micro.dev/v6/cmd and .../cmd/micro as standalone v0/v1 modules
(from old github.com/micro/go-micro tags, surfaced during an earlier vanity
meta bug), so @latest resolves to v1.18.0 with a mismatched module path.
A version-prefix query (@v6) sidesteps it: those cached sub-path modules
have no v6.x.x versions, so Go falls back to the go-micro.dev/v6 root
module and builds correctly. Verified against proxy.golang.org.
Claude-Session: https://claude.ai/code/session_01CmdEY7pYmV5zzwCjNJ4ykL
Co-authored-by: Claude <noreply@anthropic.com>
The Sponsors section now also points production users to commercial
support & consulting, and the footer Support link routes to the support
page (community + commercial) instead of the question issue template.
Claude-Session: https://claude.ai/code/session_01CmdEY7pYmV5zzwCjNJ4ykL
Co-authored-by: Claude <noreply@anthropic.com>
* support: advertise commercial support, consulting, and sponsorship
Adds a clear path to fund the project and pay for help, surfaced where
people look:
- SUPPORT.md + website /docs/support.html with a tier ladder (community,
sponsor, support retainer, consulting)
- Commercial Support / Consulting issue template (the GitHub inbound funnel)
and an issue-chooser config linking Sponsors and docs
- FUNDING.yml custom link to the support page; README section + nav entry
Community support stays free via issues; paid support and consulting are
scoped per engagement.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CmdEY7pYmV5zzwCjNJ4ykL
* ci: migrate golangci-lint to v2 config and enforce in CI (#2988)
- Rewrite .golangci.yaml for the v2 schema: start from the standard linter
set (errcheck, govet, ineffassign, staticcheck, unused) plus bodyclose,
misspell, unconvert, usestdlibvars. Sensible exclusions: generated code,
built-in presets, looser tests, SA1019 deprecations (coordinated migration
is separate), and the ported protoc-gen-micro generator for unused.
- Add a Lint workflow running golangci/golangci-lint-action with
only-new-issues, so linting is enforced on new/changed code without a
flag-day cleanup of the existing backlog.
The pre-existing backlog (errcheck/unused/naming and a few real bugs the
linter surfaces) is left for a dedicated follow-up so it can be reviewed on
its own rather than buried in this wiring change.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CmdEY7pYmV5zzwCjNJ4ykL
---------
Co-authored-by: Claude <noreply@anthropic.com>
* examples: support desk agent + blog walkthrough
A real-world, runnable example (examples/support): customers/tickets/notify
services become the agent's tools, a flow turns a ticket.created event into
the agent's work, and an approval gate guards the one action that touches a
customer. Runs with no API key (mock model) or against a live provider.
Adds blog/28 'Building a Support Agent in Go' and indexes both.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CmdEY7pYmV5zzwCjNJ4ykL
* fix(new): protoless services by default; fix @latest install (#2985)
micro new now scaffolds a reflection-based service by default — plain Go
types registered via service.Handle, no .proto, no Makefile proto target.
The generated project builds and runs with 'go run .' and zero external
tooling. Protocol Buffers move behind --proto (the crud/pubsub/api
templates imply it). When the proto workflow is used and protoc /
protoc-gen-go / protoc-gen-micro are missing, print exact install
instructions instead of failing with a cryptic plugin error.
Also fixes the 'go install go-micro.dev/v6/cmd/micro@latest' version
constraint conflict: the vanity go-import meta still advertised /v5, so Go
fell back to the bare module and resolved an ancient v1.x tag. Advertise
/v6 (keeping /v5 for existing users) and add a version-pin fallback note to
the install docs.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CmdEY7pYmV5zzwCjNJ4ykL
* fix(new,install): pin generated go.mod to current go-micro; lead install with prebuilt binary (#2985)
- micro new now requires the exact go-micro version the CLI was built from
(via build info), falling back to 'latest' for dev builds. An explicit
require is also more robust than a bare import: 'go mod tidy' reliably
resolves it, where a requireless go.mod could fail vanity discovery.
- Make the precompiled binary (curl install.sh) the recommended install in
the docs; demote 'go install' to a from-source option with the version-pin
fallback note.
- Sync the stale internal/scripts/install.sh to the working website script
(it expected an old micro-OS-ARCH asset name; releases ship
micro_OS_ARCH.tar.gz).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CmdEY7pYmV5zzwCjNJ4ykL
* website: add corrected nginx vanity-import config (#2985)
The live go-micro.dev handler echoed the full request path into the
go-import prefix ($host$1), so go install go-micro.dev/v6/cmd/micro@latest
got prefix go-micro.dev/v6/cmd/micro — a package, not the module root — and
Go fell back to the ancient v1.x tags (version constraints conflict).
Add a dedicated /vN location that emits the module root (go-micro.dev/vN)
for any sub-path, and make the catch-all advertise the current module roots
instead of echoing arbitrary paths.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CmdEY7pYmV5zzwCjNJ4ykL
---------
Co-authored-by: Claude <noreply@anthropic.com>
A real-world, runnable example (examples/support): customers/tickets/notify
services become the agent's tools, a flow turns a ticket.created event into
the agent's work, and an approval gate guards the one action that touches a
customer. Runs with no API key (mock model) or against a live provider.
Adds blog/28 'Building a Support Agent in Go' and indexes both.
Claude-Session: https://claude.ai/code/session_01CmdEY7pYmV5zzwCjNJ4ykL
Co-authored-by: Claude <noreply@anthropic.com>
A real-world, runnable example (examples/support): customers/tickets/notify
services become the agent's tools, a flow turns a ticket.created event into
the agent's work, and an approval gate guards the one action that touches a
customer. Runs with no API key (mock model) or against a live provider.
Adds blog/28 'Building a Support Agent in Go' and indexes both.
Claude-Session: https://claude.ai/code/session_01CmdEY7pYmV5zzwCjNJ4ykL
Co-authored-by: Claude <noreply@anthropic.com>
Replace the drifted, contradictory roadmap set (two public roadmaps, the
AI-native-era business-model doc, stale status snapshots) with one
canonical roadmap focused on agentic development and developer experience.
- internal/website/docs/roadmap.md — the single source of truth: where we
are (v6), the principles (build into what people run; CLI-first; the
0->1 and 0->hero getting-started contract; interaction; battle-tested),
and prioritized work (cross-provider conformance + resilience now;
durable agent loop, streaming, observability next).
- ROADMAP.md — concise, points to the canonical.
- roadmap-2026 + the internal ROADMAP_2026/STATUS docs — collapsed to
pointers (keeps blog/CLAUDE links alive, removes drift).
- CLAUDE.md — references the single roadmap + CHANGELOG for status.
Co-authored-by: Claude <noreply@anthropic.com>
Updated the blog post to reflect the journey of Go Micro, including its revival and the integration of agents into the framework. Enhanced clarity and structure throughout the text.
Closes the remaining ask in #2980 without adding a parallel callback API.
ToolResult.Refused tags a guardrail block with a reason (ai.RefusedLoop /
RefusedMaxSteps / RefusedApproval) so a wrapper can switch on it instead of
parsing the message. ai.RunInfo (RunID, ParentID, Agent) rides on the
context passed to the tool handler, giving wrappers run correlation and
delegation lineage. Before/after/retry/failure were already covered by
AgentWrapTool; this adds the metadata. Docs + tests included.
Co-authored-by: Claude <noreply@anthropic.com>
A first-person journey of Go Micro from January 2015 through the
VC/company era, the platform pivot, the quiet years, and the revival via
the Claude Code grant — into v6 and the services/agents/flows model.
Co-authored-by: Claude <noreply@anthropic.com>
TestSingleEvent intermittently failed on cleanup with 'directory not
empty': the embedded NATS JetStream server was still releasing files when
t.TempDir's RemoveAll ran at test end. Own the store dir (os.MkdirTemp)
and remove it only after server.Shutdown()+WaitForShutdown(). Also report
setup errors with Errorf instead of Fatalf/require, which are unsafe from
the non-test goroutine (go vet).
Co-authored-by: Claude <noreply@anthropic.com>
* 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>
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.
Co-authored-by: Claude <noreply@anthropic.com>
Refactor the A2A handler into a reusable dispatcher + Invoke seam and
expose NewAgentHandler(card, invoke) + Card(). An agent now serves its
own A2A endpoint with AgentA2A(addr) / WithA2A — handling tasks
in-process (no RPC hop, no separate gateway). The gateway and embedded
agent share the same handler; the only difference is RPC vs in-process
invocation. Docs, README, and changelog cover both deployment modes.
Co-authored-by: Claude <noreply@anthropic.com>
* feat(a2a): Agent2Agent protocol gateway
Add gateway/a2a — exposes registered agents over the open A2A protocol so
agents on other frameworks can discover and call them. Agent Cards are
generated from registry metadata (the same way the MCP gateway derives
tools from service endpoints); incoming A2A tasks translate to the
agent's existing Agent.Chat RPC, so there's no per-agent code.
v1 is the synchronous JSON-RPC binding: message/send returns a completed
Task, tasks/get retrieves it, and Agent Cards are served for discovery;
streaming and push notifications are advertised as unsupported. Run with
'micro a2a serve' (cmd/micro/a2a). Tests cover card generation,
message/send, tasks/get, listing, and unknown-method errors.
* docs: A2A guide, README contents + A2A section, universe A2A check
- Add a Contents table of contents at the top of the README and an A2A
subsection under Building Agents.
- Add the Agent2Agent (A2A) guide and register it in the docs nav.
- Exercise the A2A gateway in the universe harness: the concierge agent
is reached over A2A (message/send -> Agent.Chat -> completed task).
* feat(a2a): outbound client — call external A2A agents
Add a2a.Client (Send/Card) so a Go Micro agent or flow can call an agent
on any framework by URL — the outbound counterpart to the gateway. Wired
in two places: flow.A2A(url) as a workflow step (the cross-framework
Dispatch), and agent delegate to an http(s) URL routes over A2A. The
universe harness now drives the gateway through the client, exercising
both directions. Tests cover client send/card and the round trip.
* docs: A2A both-directions — guide, README, changelog, blog #26
---------
Co-authored-by: Claude <noreply@anthropic.com>
* docs: changelog catch-up + retrospective blog (agentic development)
Add the headline agentic features that shipped this quarter but were
never logged (agents, plan/delegate, guardrails, workflows, x402) to the
changelog, and add blog #25 — a three-month progress reflection on Go
Micro becoming a framework for agentic development.
* docs: tighten retrospective post — cut slogans, triads, and filler
* docs: tighten retrospective intro, bridge, and conclusion for a single through-line
* docs: frame Go Micro as how you build a distributed system, not run one
---------
Co-authored-by: Claude <noreply@anthropic.com>
* docs: design note for flow steps + Checkpoint durable execution
* docs: fold in durable-execution decisions (State struct, single Step, run retention, retry)
* docs: rename State.Payload to State.Data
* feat(flow): ordered steps + Checkpoint durable execution
A flow can now be an ordered list of steps (a task with stages) instead
of a single LLM turn. State carries typed Data plus a Stage marker; each
step is checkpointed before and after via a pluggable Checkpoint
(store-backed by default), so a run survives a crash and resumes where it
stopped without re-running completed steps. Flow-level Retry with a
per-step override; runs retained for audit unless DeleteOnSuccess.
Step actions: Call (RPC), LLM (augmented turn), Dispatch (to an agent),
or any StepFunc. Single-step and agent-dispatch flows are unchanged.
* feat(flow): top-level re-exports + durable flow example
Expose the step/checkpoint API from the micro package (FlowSteps,
FlowStep, FlowState, FlowRetry, FlowWithCheckpoint, FlowCall/LLM/Dispatch,
Checkpoint, StoreCheckpoint) and add a runnable, key-free example
demonstrating crash + resume.
* docs: document durable flow steps (guide, README, CLI help)
* docs: blog post + changelog for durable workflows
* fix(flow): scope checkpoint keys by flow name (flow/{name}/runs/{id})
Run keys were flow/runs/{id} — a single global keyspace shared by every
flow on the default store. Namespace them by flow name so each flow's
state is kept apart. StoreCheckpoint now takes a scope argument (the flow
passes its name by default).
* feat(store): Scope handle; scope agent and flow state by name
Add store.Scope(s, database, table) — a store handle that confines every
operation to a database/table without mutating the shared store, so
co-located components don't clobber each other's table (the failure mode
of the global Init(Table(...)) approach).
Use it to keep each agent's memory and plan in its own table
(agent/{name}) and each flow's runs in its own (flow/{name}), instead of
one global table partitioned only by key prefix. Services already scope
by service name.
* feat: consistent state model — service store scoping, flow registry, list/history CLI
- service: scope store via store.Scope (database service / table name),
retiring the Init(store.Table(name)) global-mutation hack; bridge the
default store so handlers using store.DefaultStore stay isolated.
- flow: register in the registry as type=flow while running (with trigger
and step count), deregister on Stop. Live discovery, like agents.
- cli: micro flow list (registry), micro flow runs <name> (durable store),
micro agent history <name> (durable store). list = running, runs/history
= durable, mirroring the service model.
* test: mini-universe end-to-end harness + scheduled GitHub Action
internal/harness/universe boots a small but real go-micro world — four
services, a durable checkout flow that crashes at payment and resumes,
and a guardrailed agent with a tool wrapper reached over RPC — drives the
scenario, asserts the end state (10 checks), and shuts down. Everything
is real except the LLM (mocked), so it's deterministic and needs no key;
-provider anthropic runs it live. Exits non-zero on failure, so it's an
end-to-end test, not just a demo.
Adds .github/workflows/universe.yml (push/PR/daily/dispatch) running the
universe + existing harnesses on the mock provider, plus an opt-in job
that runs live when ANTHROPIC_API_KEY is set. 'make harness' runs them
locally.
* ci: run the live universe job against AtlasCloud (ATLASCLOUD_API_KEY)
* ci: run the live universe job only on schedule or manual dispatch
The deterministic mock job still runs on push/PR/daily; the live
(AtlasCloud) job runs daily and on manual workflow_dispatch only, so
changes don't burn API credits on every PR but can still be checked
against a real model on demand.
---------
Co-authored-by: Claude <noreply@anthropic.com>
* feat(agent): tool-execution wrappers via WrapTool
Restructure ai.ToolHandler to the structured, ctx-carrying shape that
mirrors a go-micro RPC handler:
func(ctx context.Context, call ai.ToolCall) ai.ToolResult
This reuses the existing ToolCall (with its correlation ID) and
ToolResult types instead of the flat (name, input)->(any, string)
signature, and adds ToolCall.Scan for typed argument access.
Add ai.ToolWrapper and the agent option WrapTool / micro.AgentWrapTool —
the tool-side analogue of client.CallWrapper and server.HandlerWrapper.
Reframe the built-in guardrails (MaxSteps, LoopLimit, ApproveTool) as
composed wrappers around a base handler; developer wrappers compose
outermost, so they observe every call and result, including refusals.
Update all provider call sites, the MCP server and chat handlers, the
integration harnesses, and docs to the new signature.
* examples: add agent-wrap-tool showing AgentWrapTool
A runnable example of tool-execution middleware: an observe wrapper that
times calls and records per-tool metrics (correlated by call ID), and a
retry wrapper that recovers a flaky service call before the model sees
it. Demonstrates outermost-first composition and the wrapper/guardrail
interaction (retries are seen by loop detection).
* docs: note AgentWrapTool in README capabilities and CHANGELOG
* fix(generate): pin scaffolded go.mod to one version constant
The two generators pinned different, stale go-micro versions (v5.24.0
for services, v5.25.0 for agents). Centralize on a single
goMicroVersion constant (v5.29.0) so generated services and agents stay
in sync with the framework and there's one place to bump on release.
---------
Co-authored-by: Claude <noreply@anthropic.com>
* feat(agent): tool-execution wrappers via WrapTool
Restructure ai.ToolHandler to the structured, ctx-carrying shape that
mirrors a go-micro RPC handler:
func(ctx context.Context, call ai.ToolCall) ai.ToolResult
This reuses the existing ToolCall (with its correlation ID) and
ToolResult types instead of the flat (name, input)->(any, string)
signature, and adds ToolCall.Scan for typed argument access.
Add ai.ToolWrapper and the agent option WrapTool / micro.AgentWrapTool —
the tool-side analogue of client.CallWrapper and server.HandlerWrapper.
Reframe the built-in guardrails (MaxSteps, LoopLimit, ApproveTool) as
composed wrappers around a base handler; developer wrappers compose
outermost, so they observe every call and result, including refusals.
Update all provider call sites, the MCP server and chat handlers, the
integration harnesses, and docs to the new signature.
* examples: add agent-wrap-tool showing AgentWrapTool
A runnable example of tool-execution middleware: an observe wrapper that
times calls and records per-tool metrics (correlated by call ID), and a
retry wrapper that recovers a flaky service call before the model sees
it. Demonstrates outermost-first composition and the wrapper/guardrail
interaction (retries are seen by loop detection).
---------
Co-authored-by: Claude <noreply@anthropic.com>
Restructure ai.ToolHandler to the structured, ctx-carrying shape that
mirrors a go-micro RPC handler:
func(ctx context.Context, call ai.ToolCall) ai.ToolResult
This reuses the existing ToolCall (with its correlation ID) and
ToolResult types instead of the flat (name, input)->(any, string)
signature, and adds ToolCall.Scan for typed argument access.
Add ai.ToolWrapper and the agent option WrapTool / micro.AgentWrapTool —
the tool-side analogue of client.CallWrapper and server.HandlerWrapper.
Reframe the built-in guardrails (MaxSteps, LoopLimit, ApproveTool) as
composed wrappers around a base handler; developer wrappers compose
outermost, so they observe every call and result, including refusals.
Update all provider call sites, the MCP server and chat handlers, the
integration harnesses, and docs to the new signature.
Co-authored-by: Claude <noreply@anthropic.com>
Add LoopLimit: refuse a tool call repeated with identical arguments in
one Ask, with a self-heal message so the model changes approach. Catches
the no-progress loop that MaxSteps (count) and the gateway circuit
breaker (failures) miss. Enforced at the same tool-handler choke point as
MaxSteps/ApproveTool; on by default (lenient 3); AgentLoopLimit(0) to
disable. Tests cover repeats, distinct calls, disabled, and default-on.
Docs: new Agent Guardrails guide (MaxSteps/LoopLimit/ApproveTool, the
ApproveTool integration seam for external policy engines, and the
gateway's RateLimit/CircuitBreaker), nav + README + AGENT_DESIGN updates,
and blog/23 'Agent Guardrails'.
Co-authored-by: Claude <noreply@anthropic.com>
* feat(mcp): advertise x402 payment requirements in the tool catalog
/mcp/tools now includes each priced tool's payment requirements (amount,
network, asset, payTo) when payments are enabled, so an agent can see the
cost before calling and choose by price — a shoppable catalog, the
foundation for a tool marketplace. Free tools carry no payment block; the
shared Tool struct is copied when pricing so it isn't mutated. Tests cover
priced/free tools and payments-disabled. Documented in the payments guide.
* feat(x402): consumer client with a spend budget (pay-and-retry)
Add x402.Client, the consumer counterpart to Middleware: it settles 402
challenges automatically via a pluggable Payer, up to a spend Budget. A
call that would exceed the budget is refused before any payment is made,
and spend accumulates across calls — the spend cap that keeps an
autonomous, paying caller in bounds. Tests cover pay-within-budget,
refuse-over-budget, budget accumulation, and free endpoints, end to end
against the server Middleware with a mock facilitator and payer. Guide
documents the consumer side; agent-level AgentMaxSpend is the next step.
* chore: gofmt gateway/mcp/benchmark_test.go (trailing newline)
---------
Co-authored-by: Claude <noreply@anthropic.com>
Follow-up to the merged x402 integration (#2964). Drop the commerce-y
'price' vocabulary for the protocol's own 'amount', and add per-tool
pricing as an operator concern (the way scopes/rate-limits are set at the
gateway).
- x402.Config: Price -> Amount (default), plus Amounts map for per-tool
overrides; AmountFor(tool) resolves per-tool -> default. Add a Require
primitive (per-request enforcement) and LoadConfig for an operator
config file.
- MCP gateway: enforce payment per-tool inside /mcp/call (where scopes
are enforced) using AmountFor, instead of a flat path-based middleware.
- CLI: --x402-price -> --x402-amount; add --x402-config (per-tool file)
to micro mcp serve and micro-mcp-gateway.
- docs: new Payments (x402) guide + nav + README section; blog/22
updated to Amount/Amounts and the config-file model.
Co-authored-by: Claude <noreply@anthropic.com>
Integrate the x402 payment protocol (HTTP 402) so a tool can require a
stablecoin payment and an agent can settle it — the next step after
autonomous agents (blog 21): agents that act, and pay.
- wrapper/x402: HTTP middleware enforcing the 402 challenge/verify flow,
with a pluggable Facilitator interface. Go Micro carries no chain or
crypto code — verification/settlement is delegated to a facilitator
(Coinbase CDP, Alchemy, self-hosted), so Base and Solana are just
different facilitators behind one interface. HTTPFacilitator default;
tests cover challenge / accept / reject via a mock facilitator.
- MCP gateway: optional Options.Payment gates /mcp/call (listing tools
and health stay free); off unless configured.
- micro mcp serve and micro-mcp-gateway: opt-in --x402-pay-to/-price/
-network/-facilitator flags (env vars on the standalone binary).
- blog/22 'Integrating x402: Payments for Agents'; README feature row.
Pricing is flat per call for now; richer models and an agent-side spend
cap (next to MaxSteps/ApproveTool) are follow-ups.
Co-authored-by: Claude <noreply@anthropic.com>
The autonomy direction: agents that run on events, not human prompts.
- internal/harness/agent-flow: a runnable, deterministic demo — a
user.created broker event drives a Flow that hands off to a registered
agent (FlowAgent), which creates a workspace and sends a welcome over
real RPC. Only the LLM is mocked; passes under -race.
- blog/21: 'When the Event Is the Prompt' — the shift from agents you
talk to, to agents that act on their own; where microagents become
real; and the honest bar autonomy raises (guardrails, observability,
durable/resumable execution — the next things to build).
Co-authored-by: Claude <noreply@anthropic.com>
* docs: add 'become a sponsor' call-to-action linking to Discord
Now that there are a couple of sponsors, invite more: a short CTA under
the Sponsors section in the README and on the landing page, pointing to
the Discord to get in touch.
* fix(health): remove duplicate RegistryCheck declaration
Two PRs (#2957 and #2958) each added a RegistryCheck to the health
package, leaving the package uncompilable on master (RegistryCheck
redeclared: health/registry.go vs health/health.go). Keep the
health.go implementation — it honors the check's context timeout so a
hung registry (e.g. an unreachable etcd) reports down instead of
blocking the probe — and remove the duplicate registry.go and its test.
registry_check_test.go already covers healthy/down/nil/timeout/not-ready.
* feat(agent): pluggable memory and custom tools
Make agents compose the way services do — pluggable pieces with working
defaults — by adding the two abstractions an agent needs beyond the model:
- Memory: a pluggable interface for conversation memory. The default is
store-backed and durable across restarts (the previous hardcoded
behavior, now behind an interface); supply your own with WithMemory
(in-memory, database, semantic store). NewMemory / NewInMemory provided.
- Custom tools: WithTool registers any function as a tool the agent can
call, so agents are no longer limited to orchestrating RPC services.
Both exposed at the micro package (AgentMemory, AgentTool, NewMemory,
NewInMemory). Behavior-preserving refactor of the agent's history into
the default Memory; tests cover persistence, in-memory, clear, custom
tool dispatch and errors. README + AGENT_DESIGN document the pluggable
composition (model / memory / tools / guardrails).
* blog: 'Doubling Down on Agents' (#20)
The vision post for making agents a first-class framework the way
services were: opinionated, batteries-included, pluggable. Frames an
agent as a composition of model + memory + tools + guardrails with
working defaults; introduces the new pluggable memory and custom tools;
makes the microagents argument (an agent for everything, distributed
like microservices); and lays out the three primitives — services,
agents, workflows — as one substrate, with an honest list of the gaps
still to fill (knowledge/retrieval, streaming, explicit loop).
---------
Co-authored-by: Claude <noreply@anthropic.com>
Now that there are a couple of sponsors, invite more: a short CTA under
the Sponsors section in the README and on the landing page, pointing to
the Discord to get in touch.
Co-authored-by: Claude <noreply@anthropic.com>
* Initial plan
* feat(health): add RegistryCheck for registry connectivity health checks
Add a RegistryCheck function to the health package that creates a health
check verifying connectivity to the service registry. This enables
Kubernetes readiness probes to detect when a service loses its connection
to the registry (e.g. etcd).
Usage:
health.Register("registry", health.RegistryCheck(reg))
* fix(health): simplify error assertion in registry check test
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
* perf: convert generated PNGs to optimized JPEGs (12MB -> 1.5MB)
The landing and docs loaded 18 AI-generated PNGs at 0.5-1MB each. They're
1200x800 RGB illustrations with no transparency, so they recompress ~8x
as progressive JPEG (quality 82) with no visible loss. Convert all,
update every reference (.png -> .jpg), and drop the originals (including
the unused hero.png). Generated images: 12.3MB -> 1.5MB.
* fix(registry/etcd): re-register when a lease silently expires (#2956)
The keepalive rework (long-lived KeepAlive instead of KeepAliveOnce)
moved lease renewal entirely onto the keepalive goroutine; the 30s
periodic Register now skips on the 'unchanged' check. The goroutine only
reacted to the keepalive channel closing, so a lease that expired
server-side without a prompt channel close (e.g. a partition that
outlasted the 90s TTL) left the node de-registered from etcd while the
cache still believed it was registered — and nothing re-registered it.
That is the hidden-failure mode reported in #2956.
React to a non-positive TTL keepalive response the same as a channel
close: drop the cached lease/hash so the next Register performs a full
re-registration. Extract the loop into keepAliveLoop and unit-test the
TTL-expired, channel-closed, and healthy paths (no etcd required).
---------
Co-authored-by: Claude <noreply@anthropic.com>
A go-micro service can keep running while it has silently lost its
connection to the registry (etcd, Consul, …) — the process looks healthy
but other services can no longer discover it, and Kubernetes sees the
pod as fine. health.RegistryCheck(reg) probes connectivity via
ListServices and, registered as a critical check, makes /health/ready
report not-ready so a readiness probe can pull the pod from rotation.
- Works with any registry implementation (no interface change).
- Honors the check timeout: an unreachable/hung registry is reported
down rather than blocking the probe.
- Tests cover healthy, down, timeout, nil, and the not-ready integration.
- Documented in the health guide with the Kubernetes readiness example.
Co-authored-by: Claude <noreply@anthropic.com>
* docs: group README features by section (AI / Framework / DX)
The features table repeated 'AI' down the Category column. Split into
three grouped tables — AI, Framework, Developer experience & deployment —
dropping the repetitive column. Adds a Guardrails row (MaxSteps,
ApproveTool).
* test: flow-to-agent end-to-end in the harness
Proves 'Flow triggers, Agent reasons': a workflow with FlowAgent hands an
event to the registered conductor agent over RPC, which plans, creates
tasks, and delegates to comms — the whole chain over real RPC with only
the LLM mocked. Deterministic (shared in-memory registry, no sleeps),
passes under -race.
* blog: 'The Evolution of Microservices' (#19)
A technical history of distributed-systems eras — the monolith's
coordination cost, the distributed-systems tax, containers and
declarative orchestration, the service mesh, and the modular-monolith
correction — establishing the durable unit (named, typed, discoverable,
independently deployable) that every runtime wave required. Then the
technical argument for agents: an LLM tool call needs exactly a service
interface, so the caller shifts from deterministic code to a reasoner
that composes typed capabilities from intent, with the honest caveats
(non-determinism, cost, guardrails). Not a product pitch.
* docs: bump install version to v5.27.0
---------
Co-authored-by: Claude <noreply@anthropic.com>
* docs: group README features by section (AI / Framework / DX)
The features table repeated 'AI' down the Category column. Split into
three grouped tables — AI, Framework, Developer experience & deployment —
dropping the repetitive column. Adds a Guardrails row (MaxSteps,
ApproveTool).
* test: flow-to-agent end-to-end in the harness
Proves 'Flow triggers, Agent reasons': a workflow with FlowAgent hands an
event to the registered conductor agent over RPC, which plans, creates
tasks, and delegates to comms — the whole chain over real RPC with only
the LLM mocked. Deterministic (shared in-memory registry, no sleeps),
passes under -race.
* blog: 'The Evolution of Microservices' (#19)
A technical history of distributed-systems eras — the monolith's
coordination cost, the distributed-systems tax, containers and
declarative orchestration, the service mesh, and the modular-monolith
correction — establishing the durable unit (named, typed, discoverable,
independently deployable) that every runtime wave required. Then the
technical argument for agents: an LLM tool call needs exactly a service
interface, so the caller shifts from deterministic code to a reasoner
that composes typed capabilities from intent, with the honest caveats
(non-determinism, cost, guardrails). Not a product pitch.
---------
Co-authored-by: Claude <noreply@anthropic.com>
* blog: 'Not Everything Should Be an Agent' (#18) on workflows
The workflow counterpart to the plan/delegate post: when the path is
known, use a deterministic Flow, not an autonomous agent. Frames flow vs
agent as two modes of the same building blocks, covers flow-triggers-
agent dispatch and the agent guardrails, and gives the simplest-first
guidance (single call -> workflow -> agent). Continues the arc from
blog 14/16/17; references Building Effective Agents in passing.
* docs: fix new-user onboarding friction
- README: lead Quick Start with a no-key 30-second path (micro new ->
micro run -> curl), then the AI --prompt path with an explicit
'export ANTHROPIC_API_KEY' so the headline command no longer fails
silently for users without a key.
- Unify all install versions to v5.26.0 (README + docs were split across
v5.16.0 / v5.25.0).
- Refresh the docs landing overview from the old 'microservices
framework' framing to 'services and agents', matching the README.
- getting-started: add Prerequisites (Go 1.21+, and that a provider key
is only needed for AI features).
- README features: Flows -> Workflows wording.
---------
Co-authored-by: Claude <noreply@anthropic.com>
* docs: map go-micro onto Anthropic's workflows-vs-agents taxonomy
- new guide 'Agents and Workflows': adopts Anthropic's Building Effective
Agents vocabulary — workflow (predefined path) = flow, agent (dynamic
self-direction) = agent — maps the augmented-LLM building block and the
five workflow patterns onto go-micro, and shows routing (chat router)
and orchestrator-workers (conductor + plan/delegate) are already native.
- flow package doc reframed as a workflow (predefined path) per the same
taxonomy, with guidance on flow vs agent.
- nav + README link the new guide.
* feat: agent guardrails — step limit and tool approval hook
Anthropic's Building Effective Agents stresses stopping conditions and
human-in-the-loop checkpoints for autonomous agents. Add both as plain
options enforced at the tool-handler choke point — no provider changes,
no new abstraction:
- MaxSteps(n): bound tool executions per Ask; beyond the limit, actions
are refused and the model is told to stop and summarize.
- ApproveTool(fn): gate each action before it runs; returning false
blocks it and surfaces the reason to the model. The internal plan tool
is never gated.
Exposed at the micro package (AgentMaxSteps, AgentApproveTool, ApproveFunc).
Tests cover the limit, blocking, and that plan is not gated. Guardrails
section of the agents-and-workflows guide updated from 'active work' to
documented options.
* feat: flow can dispatch to an agent (flow triggers, agent reasons)
Unify the engine without collapsing the workflow/agent distinction. A
Flow with Agent set hands each event's rendered prompt to a named
registered agent over RPC (Agent.Chat) instead of running its own LLM
step — so the workflow stays the deterministic trigger and the agent is
the reasoning engine, with its plan, delegate, memory, and guardrails.
A plain flow is unchanged (single augmented-LLM step).
- flow.Agent(name) / micro.FlowAgent(name); flow stores the client and
skips model setup when dispatching.
- test: dispatch routes to comms.Agent.Chat with the rendered prompt and
records the reply.
- guide: 'Flow triggers, Agent reasons' section.
---------
Co-authored-by: Claude <noreply@anthropic.com>
* rename coordinator agent to conductor in example and docs
* add plan & delegate integration harness
Runs the real go-micro stack end to end — services, registry, RPC, the
agent loop, store, and delegate-first routing — with only the LLM mocked
by a deterministic provider. Proves discovery, tool execution, plan
persistence, and agent-to-agent delegation over RPC work without an API
key; swap the provider to run the same flow against a live model.
* test: deterministic CI integration test + provider flag for harness
- main_test.go: TestPlanDelegateEndToEnd drives the full real stack
(services, RPC, agent loop, store, delegate-first routing) over a
shared in-memory registry — no mDNS, no sleeps. Asserts 3 tasks
created via RPC, plan persisted to the store, and delegation reaching
the comms agent (notify called once). Passes under -race, ~0.03s.
- main.go: add -provider flag (defaults to mock) and key detection so the
same harness runs against a live model with no code change.
* chore: gitignore built harness/example binaries
---------
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>
* perf: compress hero image — 1.4MB to 80KB
Resized from 1536px to 1200px, converted to JPEG at quality 80.
80KB loads instantly vs 1.4MB stalling on slower connections.
https://claude.ai/code/session_01QTp4SshuVmLAvvEGJe4TJd
* docs: micro run drops into interactive console
One command does everything — generate, start, and chat. No
separate micro chat step. The landing page shows micro run
dropping straight into the > prompt.
https://claude.ai/code/session_01QTp4SshuVmLAvvEGJe4TJd
* feat: interactive console in micro run, -d for detached mode
micro run now drops into an interactive chat console after services
start. The console discovers services, exposes them as tools, and
lets you talk to them through an LLM — same as micro chat but
built into the run experience.
- Detects MICRO_AI_PROVIDER and MICRO_AI_API_KEY from environment
- Falls back to provider-specific env vars (ANTHROPIC_API_KEY, etc.)
- If no API key, prints hint and blocks on Ctrl-C (no console)
- -d / --detach flag skips the console (background mode)
- Ctrl-C always shuts everything down
Removed adopters section from README.
https://claude.ai/code/session_01QTp4SshuVmLAvvEGJe4TJd
---------
Co-authored-by: Claude <noreply@anthropic.com>
* docs: reposition hero — framework for services and agents
Landing page: "Build Services and Agents in Go" — positions as a
framework, not a code generator. Tagline: "A framework for
microservices that AI agents can discover, use, and manage."
Hero command reverts to go get (the framework) instead of
micro run --prompt (a feature).
README matches: "framework for building services and agents in Go."
https://claude.ai/code/session_01QTp4SshuVmLAvvEGJe4TJd
* perf: compress hero image — 1.4MB to 80KB
Resized from 1536px to 1200px, converted to JPEG at quality 80.
80KB loads instantly vs 1.4MB stalling on slower connections.
https://claude.ai/code/session_01QTp4SshuVmLAvvEGJe4TJd
---------
Co-authored-by: Claude <noreply@anthropic.com>
* docs: remove code references from landing page feature grid
Landing page describes concepts, not APIs. Removed micro.NewAgent()
and micro.NewFlow() code references. Features described in plain
language — what they do, not how to code them.
https://claude.ai/code/session_01QTp4SshuVmLAvvEGJe4TJd
* fix: update micro flow CLI to import from go-micro.dev/v5/flow
The flow package moved to top-level but the CLI still imported
from the old ai/flow path. Fixed to use go-micro.dev/v5/flow.
https://claude.ai/code/session_01QTp4SshuVmLAvvEGJe4TJd
---------
Co-authored-by: Claude <noreply@anthropic.com>
* docs: remove code references from landing page feature grid
Landing page describes concepts, not APIs. Removed micro.NewAgent()
and micro.NewFlow() code references. Features described in plain
language — what they do, not how to code them.
https://claude.ai/code/session_01QTp4SshuVmLAvvEGJe4TJd
* fix: update micro flow CLI to import from go-micro.dev/v5/flow
The flow package moved to top-level but the CLI still imported
from the old ai/flow path. Fixed to use go-micro.dev/v5/flow.
https://claude.ai/code/session_01QTp4SshuVmLAvvEGJe4TJd
---------
Co-authored-by: Claude <noreply@anthropic.com>
* docs: update blog posts 15 and 16 to reflect RPC-based agents
Blog 15: replaced broker-based agent communication with RPC —
agents are services, they communicate via standard RPC, no pub/sub
hacks. Updated the framework mapping section.
Blog 16: added proto definition, micro call example, and explanation
that agents are real services with proto-defined endpoints. Updated
Ask() method name.
https://claude.ai/code/session_01QTp4SshuVmLAvvEGJe4TJd
* docs: update agent design doc and blog posts for RPC-based agents
Rewrote AGENT_DESIGN.md — agents are services with proto-defined
Agent.Chat endpoints, communicate via RPC, no broker dependency.
Includes proto definition, CLI examples, generation output.
Blog 15: replaced broker references with RPC.
Blog 16: added proto definition and micro call example.
https://claude.ai/code/session_01QTp4SshuVmLAvvEGJe4TJd
* docs: purge all stale broker-based agent references
Updated across all surfaces:
- README: agents described as services with RPC, Ask() not Chat(),
micro call example instead of micro agent chat
- Blog 15: replaced broker communication with RPC description
- Blog 16: replaced "coordinate through the broker" with RPC
- Getting started: agent is a service with proto endpoint, Ask()
not Chat(), added micro flow CLI commands (run/exec), expanded
CLI workflow table
https://claude.ai/code/session_01QTp4SshuVmLAvvEGJe4TJd
---------
Co-authored-by: Claude <noreply@anthropic.com>
Blog 15: replaced broker-based agent communication with RPC —
agents are services, they communicate via standard RPC, no pub/sub
hacks. Updated the framework mapping section.
Blog 16: added proto definition, micro call example, and explanation
that agents are real services with proto-defined endpoints. Updated
Ask() method name.
https://claude.ai/code/session_01QTp4SshuVmLAvvEGJe4TJd
Co-authored-by: Claude <noreply@anthropic.com>
* docs: Agent interface design sketch
Proposes Agent as a top-level abstraction alongside Service in the
micro package. Agent manages services — scoped tools, system prompt,
conversation memory, registry-discoverable.
Design only, no implementation.
https://claude.ai/code/session_01QTp4SshuVmLAvvEGJe4TJd
* feat: Agent as a first-class abstraction
Introduce micro.NewAgent() alongside micro.New() — Agent is to
intelligence what Service is to capability.
Agent interface:
- Chat(ctx, message) (*Response, error) — core interaction method
- Run() — registers in registry, subscribes to broker, blocks
- Stop() — graceful shutdown
- Scoped tools — only sees endpoints of its assigned services
- Persistent memory — conversation history stored in store
- Agent-to-agent — communication via broker topics
Top-level API:
agent := micro.NewAgent("task-mgr",
micro.AgentServices("task"),
micro.AgentPrompt("You manage tasks."),
micro.AgentProvider("anthropic"),
)
agent.Run()
https://claude.ai/code/session_01QTp4SshuVmLAvvEGJe4TJd
* feat: wire agents into chat router, add micro agent CLI, expose Flow
Three top-level abstractions:
micro.New("task") — Service (capability)
micro.NewAgent("task-mgr") — Agent (intelligence)
micro.NewFlow("onboard-user") — Flow (event-driven orchestration)
micro chat as router:
- Discovers agents from registry on startup
- Single agent: routes directly
- Multiple agents: LLM classifies intent, dispatches to right agent
via route_to_agent tool
- No agents: falls back to current direct-service behaviour
- Banner shows discovered agents
micro agent CLI:
- micro agent list — shows registered agents and their services
- micro agent describe <name> — shows agent details from registry
https://claude.ai/code/session_01QTp4SshuVmLAvvEGJe4TJd
* feat: move flow to top level, update docs for three abstractions
Package structure now consistent:
service/ — Service (capability)
agent/ — Agent (intelligence)
flow/ — Flow (event-driven orchestration)
ai/flow/ kept as backward-compatible re-export.
Updated across all surfaces:
- CLAUDE.md: added agent/ and flow/ to project structure
- README: added "Building Agents" section with NewAgent() examples,
updated features table (Agents, Flows, Chat router), CLI table
(agent list, agent describe), docs links
- Website: features grid shows Services, Agents, Flows as the three
pillars alongside generation, MCP, and pluggable architecture
- micro.go: Flow imported from top-level flow/ package
https://claude.ai/code/session_01QTp4SshuVmLAvvEGJe4TJd
* docs: rewrite getting-started, fix ai-integration import paths
Getting started now covers all three abstractions:
- Service (write handlers, micro run, templates)
- Agent (micro.NewAgent, scoped tools, memory, CLI)
- Flow (event-driven LLM orchestration)
Leads with prompt-based generation, then manual service creation.
ai-integration.md: fixed flow import path from go-micro.dev/v5/ai/flow
to go-micro.dev/v5/flow, updated stack diagram to show agent/flow/chat.
https://claude.ai/code/session_01QTp4SshuVmLAvvEGJe4TJd
* blog: Introducing micro.NewAgent()
Post 16 — announces Agent as a first-class abstraction. Shows the
API (NewAgent, AgentServices, AgentPrompt, AgentProvider), scoped
tools, persistent memory, multi-service agents, multi-agent systems,
and the three-abstraction comparison table (Service/Agent/Flow).
https://claude.ai/code/session_01QTp4SshuVmLAvvEGJe4TJd
* feat: fix agent registration, blog post 16
Agent registration:
- Add node with address so mDNS can discover agents
- Store type and services in node metadata (mDNS requirement)
- Connect broker before subscribing, non-fatal if broker unavailable
- Print registration confirmation on Run()
Agent/chat discovery:
- Check both service-level and node-level metadata for type=agent
(mDNS stores metadata on nodes, not services)
Blog post 16: "Introducing micro.NewAgent()" — announces the Agent
abstraction with code examples, comparison table, multi-agent patterns.
Tested end-to-end: micro run → micro agent list discovers the agent →
micro chat routes to it → agent calls service endpoints.
https://claude.ai/code/session_01QTp4SshuVmLAvvEGJe4TJd
* feat: agents are proper services with RPC Chat endpoint
Refactored agent to use server.Server instead of fake registry entries.
An agent now:
- Creates a real RPC server with server.Name(agentName)
- Registers an Agent.Chat handler callable via standard RPC
- Sets server metadata type=agent, services=x,y for discovery
- No more fake addresses or broker hacks
micro chat calls agents via RPC (client.Call) instead of creating
local agent instances. The registry stays clean — agents are real
services with real endpoints.
Removed broker dependency from agent options. Agent-to-agent
communication is just RPC like everything else.
https://claude.ai/code/session_01QTp4SshuVmLAvvEGJe4TJd
* feat: agent uses proto-defined RPC interface
Added agent/proto/agent.proto with Agent service definition:
rpc Chat(ChatRequest) returns (ChatResponse)
Agent now implements the generated AgentHandler interface and
registers via pb.RegisterAgentHandler. The Chat endpoint is a
standard proto-based RPC callable by any go-micro client.
Renamed the programmatic API from Chat() to Ask() to avoid
collision with the proto handler method name.
micro chat calls agents via standard RPC with JSON-encoded
request/response — no special types needed on the caller side.
https://claude.ai/code/session_01QTp4SshuVmLAvvEGJe4TJd
* feat: generate agent alongside services, update all docs
micro run --prompt now generates an agent binary that manages all
the generated services. The agent reads MICRO_AI_PROVIDER and
MICRO_AI_API_KEY from the environment. micro run propagates these
when started with --prompt.
Run banner shows services and agents separately.
Updated README, getting-started guide, and landing page to show
the complete flow: generate → services + agent start → micro chat
routes to agent → agent orchestrates services.
https://claude.ai/code/session_01QTp4SshuVmLAvvEGJe4TJd
---------
Co-authored-by: Claude <noreply@anthropic.com>
* docs: update landing hero — describe it, run it, talk to it
Lead with the AI-first experience instead of "write services in Go."
The entry point is now describing what you need, not writing code.
https://claude.ai/code/session_01QTp4SshuVmLAvvEGJe4TJd
* blog: Agents for Services — a new model for microservices
Post 15 — explores the concept of distributed agents managing
services. Each service has an agent assigned to it (not embedded
in it). Agents are the intelligence layer; services are the
capability layer. Multi-service agents span domain boundaries.
Agent-to-agent communication through the broker.
https://claude.ai/code/session_01QTp4SshuVmLAvvEGJe4TJd
---------
Co-authored-by: Claude <noreply@anthropic.com>
* chore: update Discord invite link everywhere
Replace discord.gg/jwTYuUVAGh and discord.gg/go-micro with
discord.gg/WeMU5AGxD across all docs, blog posts, issue templates,
security policy, and contrib READMEs.
https://claude.ai/code/session_01QTp4SshuVmLAvvEGJe4TJd
* docs: update landing hero — describe it, run it, talk to it
Lead with the AI-first experience instead of "write services in Go."
The entry point is now describing what you need, not writing code.
https://claude.ai/code/session_01QTp4SshuVmLAvvEGJe4TJd
---------
Co-authored-by: Claude <noreply@anthropic.com>
* docs: restructure README — AI story completes before manual code
Quick Start now flows through the full AI experience: generate →
review → run → chat → grow (mid-conversation service generation).
The reader sees the complete prompt-to-production story without
interruption.
"Writing Services" is a separate section below for developers who
want to understand the framework underneath. Shows Go code, doc
comments, @example tags, micro run, and scaffolding templates.
Features table and CLI table reordered: AI first, then framework.
https://claude.ai/code/session_01QTp4SshuVmLAvvEGJe4TJd
* blog: Going All In on AI
Post 14 — the strategic case for making AI the primary direction.
Covers the evolution from microservices framework to AI-native
platform, why the timing is right (tool calling works, MCP is real,
sponsors align), and what's not changing (framework still works,
no agent framework complexity).
https://claude.ai/code/session_01QTp4SshuVmLAvvEGJe4TJd
---------
Co-authored-by: Claude <noreply@anthropic.com>
Quick Start now flows through the full AI experience: generate →
review → run → chat → grow (mid-conversation service generation).
The reader sees the complete prompt-to-production story without
interruption.
"Writing Services" is a separate section below for developers who
want to understand the framework underneath. Shows Go code, doc
comments, @example tags, micro run, and scaffolding templates.
Features table and CLI table reordered: AI first, then framework.
https://claude.ai/code/session_01QTp4SshuVmLAvvEGJe4TJd
Co-authored-by: Claude <noreply@anthropic.com>
* docs: add binary install option to README quick start
Show curl install.sh first (no Go required), go install second.
Uses the existing install script at go-micro.dev/install.sh which
downloads pre-built binaries from GitHub releases.
https://claude.ai/code/session_01QTp4SshuVmLAvvEGJe4TJd
* docs: regenerate hero image for new AI-native positioning
New hero shows terminal running micro run with service generation,
an AI agent orchestrating, and task/shipping/category service nodes.
Matches the "Microservices That AI Agents Can Use" headline.
https://claude.ai/code/session_01QTp4SshuVmLAvvEGJe4TJd
* fix: replace video with hero image on landing page
The old video autoplayed and covered the new hero image. Replace
the video element with a static img tag showing the new AI-native
hero graphic.
https://claude.ai/code/session_01QTp4SshuVmLAvvEGJe4TJd
---------
Co-authored-by: Claude <noreply@anthropic.com>
* docs: add binary install option to README quick start
Show curl install.sh first (no Go required), go install second.
Uses the existing install script at go-micro.dev/install.sh which
downloads pre-built binaries from GitHub releases.
https://claude.ai/code/session_01QTp4SshuVmLAvvEGJe4TJd
* docs: regenerate hero image for new AI-native positioning
New hero shows terminal running micro run with service generation,
an AI agent orchestrating, and task/shipping/category service nodes.
Matches the "Microservices That AI Agents Can Use" headline.
https://claude.ai/code/session_01QTp4SshuVmLAvvEGJe4TJd
---------
Co-authored-by: Claude <noreply@anthropic.com>
Both surfaces now lead with the same line: "Go Micro is a framework
for building microservices that AI agents can use."
README:
- Leads with prompt generation + chat (the differentiator)
- Features as a compact table instead of paragraph-per-feature
- CLI workflow table
- Removed redundant sections, tightened to ~150 lines
Website:
- Hero: "Microservices That AI Agents Can Use"
- Hero command: micro run --prompt instead of go get
- Features grid reordered: AI tools, orchestration, generation first
- First two-col section: describe/generate/run/chat story
- Architecture and DX sections follow
Both tell the same story in the same order:
1. What it is (microservices framework)
2. What makes it different (every service is an AI tool)
3. How you use it (prompt → run → chat)
4. What's underneath (registry, RPC, store — all pluggable)
https://claude.ai/code/session_01QTp4SshuVmLAvvEGJe4TJd
Co-authored-by: Claude <noreply@anthropic.com>
* feat: add micro new --prompt and micro run --prompt
Add AI-powered service generation: describe a system in natural
language and get real go-micro services with proto definitions,
handlers, doc comments, and MCP support.
micro new --prompt "a contact book with notes and tags" \
--provider anthropic
Generates:
contacts/ — CRUD service with name, email, phone fields
notes/ — notes linked to contacts
tags/ — tagging system
Each service gets:
proto/{name}.proto — domain model + CRUD endpoints
handler/{name}.go — in-memory store, @example tags for MCP
main.go — MCP-enabled, proper imports
go.mod + Makefile — compiles with go mod tidy + make proto
micro run --prompt does the same then starts all services.
The LLM designs the architecture (service names, fields, endpoints,
descriptions) and returns structured JSON. Code generation uses
the existing template patterns — the output is standard go-micro
code that compiles, runs, and is immediately callable via MCP
and micro chat. No AI dependency at runtime.
* feat: LLM generates real business logic with compile-fix loop
Rebuild the generate package so the LLM writes actual handler
code with business logic, not just CRUD scaffolding.
The flow is now:
1. LLM designs architecture (service names, fields, endpoints)
→ returns structured JSON
2. Proto, main.go, go.mod, Makefile generated deterministically
from the design (guaranteed to be correct)
3. go mod tidy + make proto compiles the protos
4. LLM generates handler code with REAL business logic
→ given the proto, endpoint descriptions, and go-micro patterns
5. go build — does it compile?
6. If no: feed errors back to LLM, get fixed code (up to 3 attempts)
7. If yes: service is ready
The handler prompt instructs the LLM to:
- Use sync.RWMutex for thread-safe in-memory state
- Include validation, edge cases, meaningful errors
- Write doc comments with @example tags for MCP
- Implement actual domain logic, not just map operations
Proto generation still uses deterministic templates (CRUD +
custom endpoints from the design spec) to guarantee correctness.
The compile-fix loop catches LLM mistakes automatically.
Both micro new --prompt and micro run --prompt use this flow.
* fix: handle edge cases in prompt-based generation
- Fix PATH for protoc-gen-micro in child processes
- Handle existing directories: skip structural files (main.go,
go.mod, Makefile) if dir exists, always regenerate proto,
only write placeholder handler if none exists
- Allow re-running micro new --prompt on same directory to
iterate on business logic without clobbering user edits
Tested end-to-end: "a simple todo list with tasks and categories"
generates 2 services (task-service, category-service) with real
business logic (validation, toggle complete, etc.), compiles
after 1 fix iteration, and runs with 6 MCP tools discovered.
* feat: auto-detect modified handlers on regeneration
Instead of requiring a --keep-handlers flag, the generate package now
tracks a SHA-256 hash of each generated handler in a .micro metadata
file. On re-run, if the user has edited the handler since generation,
it's left untouched. Unmodified handlers are regenerated normally.
https://claude.ai/code/session_01QTp4SshuVmLAvvEGJe4TJd
* feat: add tests, fix go.mod, gitignore, proto tracking, spinner
- Add 12 tests covering helpers, proto generation, hash tracking
- Fix go.mod: write minimal module file, let go mod tidy resolve deps
- Add .gitignore to prompt-generated services
- Protect user-edited proto files (same hash tracking as handlers)
- Add spinner during LLM calls so it doesn't look hung
https://claude.ai/code/session_01QTp4SshuVmLAvvEGJe4TJd
* feat: signal handling, existing service discovery, help text
- Ctrl+C during generation now cancels LLM calls immediately via
signal-aware context; re-run picks up where it left off
- Design() scans for existing services in the working directory and
includes their proto definitions in the prompt, so the LLM extends
the system rather than redesigning from scratch
- Updated --prompt help text with usage examples on both new and run
- Listed all supported providers in flag descriptions
- Added discoverExisting test
https://claude.ai/code/session_01QTp4SshuVmLAvvEGJe4TJd
* feat: show endpoints in run --prompt output, add micro chat hint
Print endpoint names and descriptions when designing services so users
see what was built. Add a micro chat hint to the run banner so users
know how to interact with their services after startup.
https://claude.ai/code/session_01QTp4SshuVmLAvvEGJe4TJd
* fix: generated go.mod uses go 1.24 with explicit go-micro require
go 1.22 with no explicit require caused Go to resolve sub-packages
(gateway/mcp, client, server) as separate modules, hitting stale v1.18
tags. Pin to go 1.24 + require go-micro.dev/v5 v5.24.0 so go mod tidy
resolves all sub-packages from the root module correctly.
Tested end-to-end: 4 services generated and compiled successfully.
https://claude.ai/code/session_01QTp4SshuVmLAvvEGJe4TJd
* fix: skip handler regeneration when proto unchanged
Compare proto hash before and after structure generation. If the proto
didn't change and the handler wasn't edited by the user, skip go mod
tidy, make proto, LLM handler generation, and compile-fix entirely.
Prints "(unchanged)" instead.
Reduces re-run of 4-service project from ~2 minutes to ~10 seconds.
https://claude.ai/code/session_01QTp4SshuVmLAvvEGJe4TJd
* feat: confirm design before generating code
Show the service design (names, endpoints) and prompt "Generate? [Y/n]"
before spending LLM time on handler generation. Applies to both
micro new --prompt and micro run --prompt. Default is yes (enter).
https://claude.ai/code/session_01QTp4SshuVmLAvvEGJe4TJd
* fix: use port :0 for MCP in generated multi-service projects
Each generated service had mcp.WithMCP(":3001") hardcoded, causing
port conflicts when running multiple services. Use :0 to auto-assign
a free port. micro run's central gateway handles unified MCP access.
https://claude.ai/code/session_01QTp4SshuVmLAvvEGJe4TJd
* feat: truncation detection, tool result display in chat
- Detect truncated LLM responses (unbalanced braces, doesn't end
with '}') and retry with a conciseness hint before falling through
to compile-fix
- Show tool call results in micro chat output (← for success, ✗ for
errors) so users can see what the LLM did
- Add Result/Error fields to ToolCall, populated by Anthropic provider
after tool execution
- Add isTruncated tests
Tested end-to-end with Anthropic: services generate, compile, start,
register, respond to RPC calls, and micro chat discovers and calls
tools correctly.
https://claude.ai/code/session_01QTp4SshuVmLAvvEGJe4TJd
* fix: Anthropic tool loop, service naming, chat tool results
Anthropic provider:
- Fix tool execution loop to properly iterate (was re-processing all
tool calls instead of only new ones each round)
- Clean assistant content blocks before sending back (strip 'id' from
text blocks that Anthropic rejects on input)
- Include tools in follow-up requests so model can make additional calls
- Loop up to 10 rounds until model responds with text only
Service naming:
- Strip '-service' suffix from micro.New() name so services register
as 'task', 'category' instead of 'taskservice', 'categoryservice'
Chat:
- Show tool results (← for success) and errors (✗) in chat output
Tested end-to-end: create task → list tasks works as multi-step
orchestration through micro chat with Anthropic Claude.
https://claude.ai/code/session_01QTp4SshuVmLAvvEGJe4TJd
* feat: blog post 13 — from prompt to production
Covers the full micro run --prompt flow: design, generate, compile-fix,
run, and chat orchestration. Positions agent-as-orchestrator as the
answer to service coordination.
https://claude.ai/code/session_01QTp4SshuVmLAvvEGJe4TJd
* fix: timeouts, max_tokens, TTY detection, smaller services
- Add 60s timeout on design, 90s on handler generation, 60s on
compile-fix LLM calls so hung providers don't block forever
- Bump Anthropic max_tokens from 4096 to 8192 to reduce truncation
- Add TTY detection: spinner prints static message in non-TTY (CI/pipes)
instead of ANSI escape codes
- Tighten prompts: max 200 lines per handler, 2-4 services, 5-8 fields,
explicit "services don't call each other" rule
https://claude.ai/code/session_01QTp4SshuVmLAvvEGJe4TJd
* feat: chat suggests creating services when capabilities are missing
Update system prompt with the list of available services. When the user
asks for something no existing service can handle, the agent explains
what's available and suggests the exact micro new --prompt command to
create the missing service.
This is the natural evolution path: start with a few services, talk to
them via chat, and when the domain grows, the agent tells you what to
add. Each service stays small and focused.
https://claude.ai/code/session_01QTp4SshuVmLAvvEGJe4TJd
* feat: chat generates and starts services inline, drop -service suffix
Chat agent now has a micro_generate_service tool. When the user asks
for a capability that doesn't exist, the agent generates the service,
compiles it, starts it as a background process, waits for registration,
re-discovers tools, and uses the new endpoints immediately — all within
the conversation.
Service naming: design prompt now instructs LLM to return names without
'-service' suffix (e.g. 'task' not 'task-service'). buildMain keeps
TrimSuffix as safety net for backward compatibility.
Spawned processes are cleaned up when chat exits.
https://claude.ai/code/session_01QTp4SshuVmLAvvEGJe4TJd
* docs: rewrite blog post 13 with inline service generation
Updated to reflect the full UX: services generate and start within
the chat conversation. Added the shipping example showing the agent
creating a service mid-conversation. Removed -service suffix from
all examples. Tightened the narrative around agent-as-orchestrator.
https://claude.ai/code/session_01QTp4SshuVmLAvvEGJe4TJd
* feat: persistent storage, README quickstart, auto-detect new services
Storage: generated handlers now use go-micro's store package instead
of in-memory maps. Data persists across restarts. The handler prompt
includes store API examples so the LLM generates correct store usage.
README: added "Generate From a Prompt" section with micro run --prompt
and micro chat examples, linking to blog post 13.
Watcher: micro run now scans for new service directories every 5s. When
micro chat generates a service, micro run detects the new directory,
builds it, starts it, and adds it to the watcher — fully automatic.
Added AddDir/Dirs methods to the watcher.
Blog: updated post 13 with persistent storage example and watcher note.
https://claude.ai/code/session_01QTp4SshuVmLAvvEGJe4TJd
---------
Co-authored-by: Claude <noreply@anthropic.com>
* feat: expose framework primitives via API gateway and MCP
Add registry, store, and broker as both HTTP routes and MCP tools
so AI agents and HTTP clients can inspect and operate the framework.
API gateway (/micro/* namespace):
GET /micro/registry List registered services
GET /micro/registry/{name} Describe a service
GET /micro/store List store keys
GET /micro/store/{key} Read a record
POST /micro/store/{key} Write a record
POST /micro/broker/{topic} Publish a message
MCP gateway (micro_* tool prefix):
micro_registry_list List services
micro_registry_get Describe a service
micro_store_list List keys
micro_store_read Read a record
micro_store_write Write a record
micro_broker_publish Publish a message
Framework tools use a Handler field on the MCP Tool struct for
direct dispatch (no RPC). Service tools continue to use RPC.
Rate limiters and circuit breakers are applied to framework
tools the same as service tools.
* fix: make framework internals opt-in on API and MCP gateways
Framework primitives (registry, broker, store) are now only
exposed when explicitly enabled:
API gateway: micro api --internal
MCP gateway: Options{Internal: true}
Off by default — user services are always exposed, framework
internals require the flag. Banner output only shows framework
routes when enabled.
* fix: always expose framework internals, gate by auth in production
Revert the --internal flag approach. Framework primitives (registry,
broker, store) are now always exposed:
- micro api: /micro/* routes always available (dev tool)
- MCP gateway: micro_* tools always registered. When Auth is
configured (production), they require micro:admin scope.
Without Auth (dev), they're open — same as all other tools.
This follows the existing pattern: micro run/api = dev (open),
micro server = production (auth + scopes). Framework internals
follow the same security model as user services.
Remove the Internal option from MCP Options. Remove --internal
flag from micro api.
Note: scope persistence depends on the store backend. The default
in-memory store does not survive restarts. Use MICRO_STORE=file
for persistent scopes in production.
* fix: correct DefaultStore comment — it's file-backed, not memory
* fix(server): don't recreate deleted admin user on restart
When the default admin account is deleted via the dashboard, set
a marker key (auth/.admin-deleted) in the store. On startup, skip
admin creation if the marker exists. This prevents the default
admin/micro credentials from reappearing after restart when the
user has intentionally removed them.
* fix: improve agent playground first-run UX and fix doc 404s
Agent playground:
- Add setup hint in empty state explaining how to get started
(click Settings, enter API key, type a prompt)
- Hide hint automatically when API key is already configured
- Add all 7 providers to dropdown (was only OpenAI + Anthropic)
- Include CLI fallback suggestion (micro chat)
Docs:
- Fix .md links to .html across all doc pages — Jekyll serves
.html files, not .md. Fixes 404s including the micro run guide.
---------
Co-authored-by: Claude <noreply@anthropic.com>
* feat: expose framework primitives via API gateway and MCP
Add registry, store, and broker as both HTTP routes and MCP tools
so AI agents and HTTP clients can inspect and operate the framework.
API gateway (/micro/* namespace):
GET /micro/registry List registered services
GET /micro/registry/{name} Describe a service
GET /micro/store List store keys
GET /micro/store/{key} Read a record
POST /micro/store/{key} Write a record
POST /micro/broker/{topic} Publish a message
MCP gateway (micro_* tool prefix):
micro_registry_list List services
micro_registry_get Describe a service
micro_store_list List keys
micro_store_read Read a record
micro_store_write Write a record
micro_broker_publish Publish a message
Framework tools use a Handler field on the MCP Tool struct for
direct dispatch (no RPC). Service tools continue to use RPC.
Rate limiters and circuit breakers are applied to framework
tools the same as service tools.
* fix: make framework internals opt-in on API and MCP gateways
Framework primitives (registry, broker, store) are now only
exposed when explicitly enabled:
API gateway: micro api --internal
MCP gateway: Options{Internal: true}
Off by default — user services are always exposed, framework
internals require the flag. Banner output only shows framework
routes when enabled.
* fix: always expose framework internals, gate by auth in production
Revert the --internal flag approach. Framework primitives (registry,
broker, store) are now always exposed:
- micro api: /micro/* routes always available (dev tool)
- MCP gateway: micro_* tools always registered. When Auth is
configured (production), they require micro:admin scope.
Without Auth (dev), they're open — same as all other tools.
This follows the existing pattern: micro run/api = dev (open),
micro server = production (auth + scopes). Framework internals
follow the same security model as user services.
Remove the Internal option from MCP Options. Remove --internal
flag from micro api.
Note: scope persistence depends on the store backend. The default
in-memory store does not survive restarts. Use MICRO_STORE=file
for persistent scopes in production.
* fix: correct DefaultStore comment — it's file-backed, not memory
* fix(server): don't recreate deleted admin user on restart
When the default admin account is deleted via the dashboard, set
a marker key (auth/.admin-deleted) in the store. On startup, skip
admin creation if the marker exists. This prevents the default
admin/micro credentials from reappearing after restart when the
user has intentionally removed them.
---------
Co-authored-by: Claude <noreply@anthropic.com>
* feat(cli): add color output to micro chat and micro api
micro chat:
- Startup banner matching micro run style: bold header, cyan
provider/model, green dots for each discovered tool endpoint
- Cyan bold prompt (> ) instead of plain
- Yellow arrow (→) with dimmed tool name for tool calls
- Red "error:" prefix for errors
- Dimmed "(history cleared)" for reset
micro api:
- Startup banner matching micro run style: bold header, cyan
address, colored HTTP methods (green GET, yellow POST)
Brings the CLI UX closer to what the generated terminal
screenshot depicts — color-coded, professional, readable.
* feat(cli): adopt consistent color output across all commands
Apply the same banner/output style across the remaining commands:
micro new: bold header, cyan service name, green ✓, cyan URLs
micro build: green ✓ checkmarks, cyan file paths
micro deploy: bold header, cyan target
micro mcp: bold header, green dots per tool, dimmed count
micro flow: bold header, cyan flow/topic/provider
All commands now follow the micro run/chat/api pattern:
bold header, cyan values, green status indicators, dimmed hints.
* docs: add "Tools as Services" blog post
Write blog/12 — connects the AI story back to Go Micro's original
design: services were always self-describing, named, and uniformly
callable. The path from API gateway to MCP to LLM tools is the
same pattern — read the registry, present services in a format
the consumer understands, route calls back.
Covers the access layer pattern (HTTP, web, CLI, MCP, chat),
why doc comments became functional in the AI era, and how the
framework primitives (registry, broker, store) could all become
tools using the same mechanism.
Add to blog index, link forward from blog/11.
---------
Co-authored-by: Claude <noreply@anthropic.com>
Write blog/11 — a teardown of micro chat showing how to build an
LLM tool-calling agent in ~150 lines. Walks through the four pieces:
discover tools, create the model, track conversation, run the loop.
Uses the actual chat.go source. Ends with extension ideas and a
"make it yours" framing.
Add to blog index, link forward from blog/10.
Co-authored-by: Claude <noreply@anthropic.com>
* refactor(ai): rename ToolSet to Tools, simplify wiring with WithTools
Move tool discovery/execution fully into the ai package as ai.Tools
(formerly ai.ToolSet), and simplify the usage model:
- NewTools(reg, ai.ToolClient(c)) takes the execution client as an
option instead of threading it through Handler(c) per call
- New ai.WithTools(tools) option wires the tool handler into a model
in one call, replacing ai.WithToolHandler(set.Handler(c))
- ai.DiscoverTools(reg) for one-shot discovery
Before:
set := ai.NewToolSet(reg)
list, _ := set.Discover()
m := ai.New(p, ai.WithToolHandler(set.Handler(client)))
After:
tools := ai.NewTools(reg, ai.ToolClient(client))
list, _ := tools.Discover()
m := ai.New(p, ai.WithTools(tools))
Update ai/flow, micro chat, README, ai integration doc, Atlas Cloud
guide, and blog posts 3/8/9/10.
* feat(cli): add per-interface commands (registry, broker, store, config)
Map go-micro's core interfaces onto the CLI so the framework's
building blocks are inspectable and manipulable from the terminal:
micro registry list/get/watch service discovery
micro broker publish/subscribe pub/sub messaging
micro store read/write/delete/list persistence
micro config get/dump dynamic config (from env)
Structured pluggably in cmd/micro/resource: each interface is one
file exposing a Command() func, all wired through a commandFuncs
slice in resource.go. Adding a new resource command is a single
file plus one slice entry. Shared printJSON/fail helpers keep
output and errors consistent across commands.
Each command's verbs mirror the interface methods. Output is JSON
for structured data, raw for single values. Update README and
getting-started with an "inspecting the framework" section.
* docs: update CLI README with all new commands
Add documentation for commands that were missing from the CLI README:
- micro new --template (crud, pubsub, api)
- micro api (standalone HTTP gateway)
- micro registry list/get/watch
- micro broker publish/subscribe
- micro store read/write/delete/list
- micro config get/dump
- micro chat (interactive LLM agent)
- micro flow run/exec (event-driven orchestration)
- micro mcp serve/list/test
Organized into sections: API Gateway, Inspecting the Framework
(registry, broker, store, config), and AI & Agents (chat, flow, mcp).
* refactor(ai): move History from caller to Request field
History is now pure state (no Generate method). Instead, pass it
via Request.History and call ai.Generate(ctx, model, req):
Before:
hist := ai.NewHistory("system prompt", 50)
resp, _ := hist.Generate(ctx, model, prompt, tools)
After:
hist := ai.NewHistory(50)
resp, _ := ai.Generate(ctx, model, &ai.Request{
Prompt: prompt,
SystemPrompt: "system prompt",
Tools: tools,
History: hist,
})
The model is always the thing you call. History is context you
pass in. ai.Generate() handles the bookkeeping: prepends
accumulated messages before the call, records the exchange after.
NewHistory no longer takes a system prompt (it belongs on the
Request, where it always did).
Update micro chat, ai/flow, and all blog posts/docs.
* refactor(ai): make History a plain message accumulator
History no longer has Generate or touches the model. It's just
Add/Messages/Reset/Len with truncation — a helper for building
Request.Messages across turns.
Before:
hist := ai.NewHistory(50)
resp, _ := ai.Generate(ctx, m, &ai.Request{History: hist, ...})
After:
hist := ai.NewHistory(50)
hist.Add("user", prompt)
resp, _ := m.Generate(ctx, &ai.Request{Messages: hist.Messages(), ...})
hist.Add("assistant", resp.Reply)
Remove History field from Request. Remove package-level
ai.Generate(ctx, model, req) wrapper — users call m.Generate()
directly, which is the interface method. History is a convenience
for accumulating messages, not a participant in generation.
Update micro chat, ai/flow, blog posts 9 and 10.
---------
Co-authored-by: Claude <noreply@anthropic.com>
* refactor(ai): rename ToolSet to Tools, simplify wiring with WithTools
Move tool discovery/execution fully into the ai package as ai.Tools
(formerly ai.ToolSet), and simplify the usage model:
- NewTools(reg, ai.ToolClient(c)) takes the execution client as an
option instead of threading it through Handler(c) per call
- New ai.WithTools(tools) option wires the tool handler into a model
in one call, replacing ai.WithToolHandler(set.Handler(c))
- ai.DiscoverTools(reg) for one-shot discovery
Before:
set := ai.NewToolSet(reg)
list, _ := set.Discover()
m := ai.New(p, ai.WithToolHandler(set.Handler(client)))
After:
tools := ai.NewTools(reg, ai.ToolClient(client))
list, _ := tools.Discover()
m := ai.New(p, ai.WithTools(tools))
Update ai/flow, micro chat, README, ai integration doc, Atlas Cloud
guide, and blog posts 3/8/9/10.
* feat(cli): add per-interface commands (registry, broker, store, config)
Map go-micro's core interfaces onto the CLI so the framework's
building blocks are inspectable and manipulable from the terminal:
micro registry list/get/watch service discovery
micro broker publish/subscribe pub/sub messaging
micro store read/write/delete/list persistence
micro config get/dump dynamic config (from env)
Structured pluggably in cmd/micro/resource: each interface is one
file exposing a Command() func, all wired through a commandFuncs
slice in resource.go. Adding a new resource command is a single
file plus one slice entry. Shared printJSON/fail helpers keep
output and errors consistent across commands.
Each command's verbs mirror the interface methods. Output is JSON
for structured data, raw for single values. Update README and
getting-started with an "inspecting the framework" section.
* docs: update CLI README with all new commands
Add documentation for commands that were missing from the CLI README:
- micro new --template (crud, pubsub, api)
- micro api (standalone HTTP gateway)
- micro registry list/get/watch
- micro broker publish/subscribe
- micro store read/write/delete/list
- micro config get/dump
- micro chat (interactive LLM agent)
- micro flow run/exec (event-driven orchestration)
- micro mcp serve/list/test
Organized into sections: API Gateway, Inspecting the Framework
(registry, broker, store, config), and AI & Agents (chat, flow, mcp).
---------
Co-authored-by: Claude <noreply@anthropic.com>
* refactor(ai): rename ToolSet to Tools, simplify wiring with WithTools
Move tool discovery/execution fully into the ai package as ai.Tools
(formerly ai.ToolSet), and simplify the usage model:
- NewTools(reg, ai.ToolClient(c)) takes the execution client as an
option instead of threading it through Handler(c) per call
- New ai.WithTools(tools) option wires the tool handler into a model
in one call, replacing ai.WithToolHandler(set.Handler(c))
- ai.DiscoverTools(reg) for one-shot discovery
Before:
set := ai.NewToolSet(reg)
list, _ := set.Discover()
m := ai.New(p, ai.WithToolHandler(set.Handler(client)))
After:
tools := ai.NewTools(reg, ai.ToolClient(client))
list, _ := tools.Discover()
m := ai.New(p, ai.WithTools(tools))
Update ai/flow, micro chat, README, ai integration doc, Atlas Cloud
guide, and blog posts 3/8/9/10.
* feat(cli): add per-interface commands (registry, broker, store, config)
Map go-micro's core interfaces onto the CLI so the framework's
building blocks are inspectable and manipulable from the terminal:
micro registry list/get/watch service discovery
micro broker publish/subscribe pub/sub messaging
micro store read/write/delete/list persistence
micro config get/dump dynamic config (from env)
Structured pluggably in cmd/micro/resource: each interface is one
file exposing a Command() func, all wired through a commandFuncs
slice in resource.go. Adding a new resource command is a single
file plus one slice entry. Shared printJSON/fail helpers keep
output and errors consistent across commands.
Each command's verbs mirror the interface methods. Output is JSON
for structured data, raw for single values. Update README and
getting-started with an "inspecting the framework" section.
---------
Co-authored-by: Claude <noreply@anthropic.com>
Move tool discovery/execution fully into the ai package as ai.Tools
(formerly ai.ToolSet), and simplify the usage model:
- NewTools(reg, ai.ToolClient(c)) takes the execution client as an
option instead of threading it through Handler(c) per call
- New ai.WithTools(tools) option wires the tool handler into a model
in one call, replacing ai.WithToolHandler(set.Handler(c))
- ai.DiscoverTools(reg) for one-shot discovery
Before:
set := ai.NewToolSet(reg)
list, _ := set.Discover()
m := ai.New(p, ai.WithToolHandler(set.Handler(client)))
After:
tools := ai.NewTools(reg, ai.ToolClient(client))
list, _ := tools.Discover()
m := ai.New(p, ai.WithTools(tools))
Update ai/flow, micro chat, README, ai integration doc, Atlas Cloud
guide, and blog posts 3/8/9/10.
Co-authored-by: Claude <noreply@anthropic.com>
* feat: update Go Micro logo to interconnected nodes design
Replace the text-on-blue-square logo with a modern icon: three
teal nodes connected in a triangle, representing distributed
systems. Generated via Atlas Cloud. Clean at all sizes — works
as GitHub avatar, favicon, and nav bar icon.
* feat: new logo, AI integration architecture doc, and landing page CTA
Update logo to triangle-nodes icon + "Go Micro" text wordmark.
Save icon-only variant for favicon/avatar use.
Add docs/ai-integration.md — a single page that explains how the
AI stack fits together: services → registry → MCP gateway →
ai/tools → ai.Model → micro chat. Layer-by-layer with code
examples, provider table, and "what you don't need" section.
Add AI Integration to docs sidebar navigation (after Getting
Started). Update the landing page AI section with a direct CTA
button linking to the new doc.
* fix: restore original logo and add border-radius to all renders
Revert logo to original. Add border-radius: 8px to the logo img
in the landing page nav, docs layout nav, and blog layout nav
so the square logo renders with rounded corners everywhere.
Remove unused icon.png.
* docs: add micro chat blog post
Write blog/10 — a dedicated post for micro chat covering:
- What it does (interactive LLM agent for services)
- How it works (ai/tools → ai.History → ai.Model stack)
- Multi-turn conversation examples
- All provider options and env vars
- Single prompt mode for scripting
- Why it works (registry metadata + doc comments = tool descriptions)
- Programmatic usage with the same building blocks
- Link to micro flow as the event-driven counterpart
Add to blog index. Update blog 9 nav to link forward.
---------
Co-authored-by: Claude <noreply@anthropic.com>
* feat: update Go Micro logo to interconnected nodes design
Replace the text-on-blue-square logo with a modern icon: three
teal nodes connected in a triangle, representing distributed
systems. Generated via Atlas Cloud. Clean at all sizes — works
as GitHub avatar, favicon, and nav bar icon.
* feat: new logo, AI integration architecture doc, and landing page CTA
Update logo to triangle-nodes icon + "Go Micro" text wordmark.
Save icon-only variant for favicon/avatar use.
Add docs/ai-integration.md — a single page that explains how the
AI stack fits together: services → registry → MCP gateway →
ai/tools → ai.Model → micro chat. Layer-by-layer with code
examples, provider table, and "what you don't need" section.
Add AI Integration to docs sidebar navigation (after Getting
Started). Update the landing page AI section with a direct CTA
button linking to the new doc.
* fix: restore original logo and add border-radius to all renders
Revert logo to original. Add border-radius: 8px to the logo img
in the landing page nav, docs layout nav, and blog layout nav
so the square logo renders with rounded corners everywhere.
Remove unused icon.png.
* feat(ai): add ai/flow package and micro flow CLI
Add ai/flow — event-driven LLM orchestration for go-micro. A Flow
subscribes to a broker topic, discovers services as tools, and
feeds each event into an LLM that decides which RPCs to call.
Key types:
- flow.New(name, opts...) creates a flow with trigger topic,
prompt template, provider config
- flow.Register(registry, broker, client) wires it into a service
- flow.Execute(ctx, data) runs the flow once (for testing/CLI)
- flow.Results() returns execution history
Add micro flow CLI with two subcommands:
- micro flow run: subscribe to a topic and react to events
- micro flow exec: one-shot execution with inline data
Both output JSON results with flow name, prompt, tool calls,
reply, answer, duration, and errors.
Example:
micro flow run --trigger events.user.created \
--prompt "New user: {{.Data}}. Send welcome email." \
--provider anthropic
micro flow exec --prompt "List all users" --provider anthropic
* docs: update flows blog post with ai/flow package and CLI examples
Add "Update: We Built It" section to blog/9 showing the ai/flow
package API, CLI usage for both event-driven and one-shot modes,
and what it does/doesn't do. Links the conceptual discussion to
the shipped implementation.
* feat(cli): add micro api gateway command, clarify run vs server
Add 'micro api' — a standalone lightweight HTTP-to-RPC gateway:
- POST /{service}/{endpoint} proxies to RPC calls
- GET / lists all services and endpoints
- GET /{service} describes a service
- GET /health returns ok
- Supports Micro-Endpoint header for endpoint routing
- No dashboard, no auth, no hot reload — just the proxy
Update help text to clarify the three gateway modes:
- micro api: bare HTTP-to-RPC proxy
- micro run: development mode (hot reload + gateway + agent playground)
- micro server: production mode (dashboard + auth + JWT)
* docs: update README, getting started, and AI integration for all new features
Update the development workflow table in both README and getting
started to include all CLI commands: micro new --template,
micro api, micro chat, micro flow, micro call.
Getting started:
- Add CRUD template example to quick start
- Update workflow table with 8 stages
- Add AI Integration, MCP, and gRPC Interop to Next Steps
README:
- Add template flag to quick start example
- Update workflow table
- Reorder User Guides with AI Integration prominent
AI Integration doc:
- Update stack diagram to include micro api and ai/flow
- Add micro flow section with Go API and CLI examples
- Add micro api section
- Renumber layers (now 8 instead of 7)
---------
Co-authored-by: Claude <noreply@anthropic.com>
* feat: update Go Micro logo to interconnected nodes design
Replace the text-on-blue-square logo with a modern icon: three
teal nodes connected in a triangle, representing distributed
systems. Generated via Atlas Cloud. Clean at all sizes — works
as GitHub avatar, favicon, and nav bar icon.
* feat: new logo, AI integration architecture doc, and landing page CTA
Update logo to triangle-nodes icon + "Go Micro" text wordmark.
Save icon-only variant for favicon/avatar use.
Add docs/ai-integration.md — a single page that explains how the
AI stack fits together: services → registry → MCP gateway →
ai/tools → ai.Model → micro chat. Layer-by-layer with code
examples, provider table, and "what you don't need" section.
Add AI Integration to docs sidebar navigation (after Getting
Started). Update the landing page AI section with a direct CTA
button linking to the new doc.
* fix: restore original logo and add border-radius to all renders
Revert logo to original. Add border-radius: 8px to the logo img
in the landing page nav, docs layout nav, and blog layout nav
so the square logo renders with rounded corners everywhere.
Remove unused icon.png.
* feat(ai): add ai/flow package and micro flow CLI
Add ai/flow — event-driven LLM orchestration for go-micro. A Flow
subscribes to a broker topic, discovers services as tools, and
feeds each event into an LLM that decides which RPCs to call.
Key types:
- flow.New(name, opts...) creates a flow with trigger topic,
prompt template, provider config
- flow.Register(registry, broker, client) wires it into a service
- flow.Execute(ctx, data) runs the flow once (for testing/CLI)
- flow.Results() returns execution history
Add micro flow CLI with two subcommands:
- micro flow run: subscribe to a topic and react to events
- micro flow exec: one-shot execution with inline data
Both output JSON results with flow name, prompt, tool calls,
reply, answer, duration, and errors.
Example:
micro flow run --trigger events.user.created \
--prompt "New user: {{.Data}}. Send welcome email." \
--provider anthropic
micro flow exec --prompt "List all users" --provider anthropic
* docs: update flows blog post with ai/flow package and CLI examples
Add "Update: We Built It" section to blog/9 showing the ai/flow
package API, CLI usage for both event-driven and one-shot modes,
and what it does/doesn't do. Links the conceptual discussion to
the shipped implementation.
* feat(cli): add micro api gateway command, clarify run vs server
Add 'micro api' — a standalone lightweight HTTP-to-RPC gateway:
- POST /{service}/{endpoint} proxies to RPC calls
- GET / lists all services and endpoints
- GET /{service} describes a service
- GET /health returns ok
- Supports Micro-Endpoint header for endpoint routing
- No dashboard, no auth, no hot reload — just the proxy
Update help text to clarify the three gateway modes:
- micro api: bare HTTP-to-RPC proxy
- micro run: development mode (hot reload + gateway + agent playground)
- micro server: production mode (dashboard + auth + JWT)
---------
Co-authored-by: Claude <noreply@anthropic.com>
* feat: update Go Micro logo to interconnected nodes design
Replace the text-on-blue-square logo with a modern icon: three
teal nodes connected in a triangle, representing distributed
systems. Generated via Atlas Cloud. Clean at all sizes — works
as GitHub avatar, favicon, and nav bar icon.
* feat: new logo, AI integration architecture doc, and landing page CTA
Update logo to triangle-nodes icon + "Go Micro" text wordmark.
Save icon-only variant for favicon/avatar use.
Add docs/ai-integration.md — a single page that explains how the
AI stack fits together: services → registry → MCP gateway →
ai/tools → ai.Model → micro chat. Layer-by-layer with code
examples, provider table, and "what you don't need" section.
Add AI Integration to docs sidebar navigation (after Getting
Started). Update the landing page AI section with a direct CTA
button linking to the new doc.
* fix: restore original logo and add border-radius to all renders
Revert logo to original. Add border-radius: 8px to the logo img
in the landing page nav, docs layout nav, and blog layout nav
so the square logo renders with rounded corners everywhere.
Remove unused icon.png.
* feat(ai): add ai/flow package and micro flow CLI
Add ai/flow — event-driven LLM orchestration for go-micro. A Flow
subscribes to a broker topic, discovers services as tools, and
feeds each event into an LLM that decides which RPCs to call.
Key types:
- flow.New(name, opts...) creates a flow with trigger topic,
prompt template, provider config
- flow.Register(registry, broker, client) wires it into a service
- flow.Execute(ctx, data) runs the flow once (for testing/CLI)
- flow.Results() returns execution history
Add micro flow CLI with two subcommands:
- micro flow run: subscribe to a topic and react to events
- micro flow exec: one-shot execution with inline data
Both output JSON results with flow name, prompt, tool calls,
reply, answer, duration, and errors.
Example:
micro flow run --trigger events.user.created \
--prompt "New user: {{.Data}}. Send welcome email." \
--provider anthropic
micro flow exec --prompt "List all users" --provider anthropic
* docs: update flows blog post with ai/flow package and CLI examples
Add "Update: We Built It" section to blog/9 showing the ai/flow
package API, CLI usage for both event-driven and one-shot modes,
and what it does/doesn't do. Links the conceptual discussion to
the shipped implementation.
---------
Co-authored-by: Claude <noreply@anthropic.com>
* feat: update Go Micro logo to interconnected nodes design
Replace the text-on-blue-square logo with a modern icon: three
teal nodes connected in a triangle, representing distributed
systems. Generated via Atlas Cloud. Clean at all sizes — works
as GitHub avatar, favicon, and nav bar icon.
* feat: new logo, AI integration architecture doc, and landing page CTA
Update logo to triangle-nodes icon + "Go Micro" text wordmark.
Save icon-only variant for favicon/avatar use.
Add docs/ai-integration.md — a single page that explains how the
AI stack fits together: services → registry → MCP gateway →
ai/tools → ai.Model → micro chat. Layer-by-layer with code
examples, provider table, and "what you don't need" section.
Add AI Integration to docs sidebar navigation (after Getting
Started). Update the landing page AI section with a direct CTA
button linking to the new doc.
* fix: restore original logo and add border-radius to all renders
Revert logo to original. Add border-radius: 8px to the logo img
in the landing page nav, docs layout nav, and blog layout nav
so the square logo renders with rounded corners everywhere.
Remove unused icon.png.
* fix: trim nav to 3 links across all layouts
Remove Reference and Home links from nav across landing page,
docs layout, and blog layout. Keep only Docs, Blog, GitHub —
the three things people actually need. Fixes crowded nav on
mobile where 5 links plus a menu button didn't fit.
---------
Co-authored-by: Claude <noreply@anthropic.com>
* feat: update Go Micro logo to interconnected nodes design
Replace the text-on-blue-square logo with a modern icon: three
teal nodes connected in a triangle, representing distributed
systems. Generated via Atlas Cloud. Clean at all sizes — works
as GitHub avatar, favicon, and nav bar icon.
* feat: new logo, AI integration architecture doc, and landing page CTA
Update logo to triangle-nodes icon + "Go Micro" text wordmark.
Save icon-only variant for favicon/avatar use.
Add docs/ai-integration.md — a single page that explains how the
AI stack fits together: services → registry → MCP gateway →
ai/tools → ai.Model → micro chat. Layer-by-layer with code
examples, provider table, and "what you don't need" section.
Add AI Integration to docs sidebar navigation (after Getting
Started). Update the landing page AI section with a direct CTA
button linking to the new doc.
* fix: restore original logo and add border-radius to all renders
Revert logo to original. Add border-radius: 8px to the logo img
in the landing page nav, docs layout nav, and blog layout nav
so the square logo renders with rounded corners everywhere.
Remove unused icon.png.
---------
Co-authored-by: Claude <noreply@anthropic.com>
Rewrite blog/3 to reflect current state of the project:
- Update numbers (7 providers, image/video support, micro chat)
- Add "What Came After" section covering everything shipped since
- Tighten prose, remove stale roadmap percentages
- Replace generic MCP image with Claude-themed header generated
via Atlas Cloud (orange AI orb connecting to service nodes)
- Streamline code examples
- Update star count and Try It section
Co-authored-by: Claude <noreply@anthropic.com>
* feat(website): redesign docs and blog layouts, add blog header images
Redesign both layouts to match the new landing page:
- Consistent nav bar with logo, Docs, Blog, GitHub, Reference, Home
- Consistent footer with copyright and links
- CSS custom properties for theming
- Updated typography, spacing, and code block styling
- Active sidebar link highlighting in docs
- Dark mode support preserved
Generate 4 blog header images via Atlas Cloud:
- blog-deploy.png for post 1 (micro deploy)
- blog-mcp.png for posts 2, 3, 7 (MCP-related)
- blog-agents-demo.png for post 4 (agents demo)
- blog-dx.png for post 5 (DX cleanup)
- Reuse data-model.png for post 6 (model package)
All 7 existing blog posts now have header images.
* fix(website): prevent horizontal scroll on mobile landing page
Add overflow-x: hidden on html and body. Set max-width: 100% and
height: auto on all section and two-col images. Add overflow:
hidden to .two-col grid. Constrain hero pre with max-width and
overflow-x. Reduce font sizes and padding at mobile breakpoint.
* feat(website): add images to remaining core doc pages
Generate 5 more images via Atlas Cloud for docs:
- registry.png: service discovery diagram
- broker.png: pub/sub message broker pattern
- transport.png: multi-transport layers (HTTP, gRPC, NATS)
- config.png: dynamic configuration from multiple sources
- observability.png: monitoring dashboard with metrics/traces
Add images to registry.md, broker.md, transport.md, config.md,
observability.md, and architecture.md. All 11 main doc pages
now have header images.
* feat: add sponsor logos to landing page, README images, and flows blog post
Add Anthropic and Atlas Cloud sponsor logos to the landing page
with links to their respective blog posts. Logos display at 0.7
opacity with hover effect.
Add architecture and MCP agent images to the GitHub README for
the Overview and MCP sections.
Write blog post 9: "From Chat to Flows" — explores the concept
of LLM-powered service orchestration. Compares micro chat's
interactive model with persistent event-driven flows, shows how
the existing building blocks (ai/tools, History, broker) could
compose into a flow engine, discusses tradeoffs vs traditional
orchestration (Step Functions, Temporal), and includes a working
15-line code example. Explicitly positions it as a concept for
community feedback, not an announcement.
* feat(website): add animated hero video to landing page
Generate a 6-second hero video via Atlas Cloud's image-to-video
API (gemini-omni-flash). Shows the microservices network diagram
animating with data flowing between nodes.
Replace the static hero image with an autoplay muted looping
video element. Falls back to the static image via poster
attribute and img fallback for browsers without video support.
* feat(ai): add VideoModel interface with Atlas Cloud provider
Add ai.VideoModel interface for video generation alongside Model
and ImageModel. Supports text-to-video and image-to-video via
VideoRequest with prompt, reference images, duration, aspect
ratio, and resolution fields.
Implement GenerateVideo for Atlas Cloud using their async API:
POST /api/v1/model/generateVideo → poll /api/v1/model/prediction.
Default model is gemini-omni-flash image-to-video. Polls every
5 seconds until completion or context cancellation.
Register Atlas Cloud as a video provider via ai.RegisterVideo.
Add 3 tests: registration, no-key error, compile-time interface
check. Update ai/README.md with VideoModel docs.
The ai package now covers all three modalities:
- Model (text) — 7 providers
- ImageModel (image) — 2 providers (Atlas Cloud, OpenAI)
- VideoModel (video) — 1 provider (Atlas Cloud)
---------
Co-authored-by: Claude <noreply@anthropic.com>
* feat(cli): add CRUD, pub/sub, and API gateway templates for micro new
Add --template flag to 'micro new' with three preset templates:
- crud: CRUD service with Create/Read/Update/Delete/List, in-memory
store with sync.RWMutex, UUID generation, pagination, and doc
comments with @example tags for MCP tool discovery.
- pubsub: Event-driven service with Publish/Stats RPCs and a
Subscribe method that hooks into the broker. Includes event
types with ID, type, source, data, and timestamp.
- api: API gateway service with Health and Endpoint RPCs, an
internal HTTP route table, and a response recorder for
proxying requests through RPC.
All templates include MCP-ready doc comments and work with
--no-mcp. The default template (no flag) is unchanged.
Usage:
micro new myservice --template crud
micro new myservice --template pubsub
micro new myservice --template api
* fix(ai): update Atlas Cloud provider to use actual API formats
Fix the Atlas Cloud image generation to use their real async API:
POST /api/v1/model/generateImage → poll /api/v1/model/prediction/{id}
instead of the OpenAI-compatible endpoint which doesn't exist.
Add Quality and OutputFormat fields to ai.ImageRequest for
provider-specific image parameters.
Update default text model from llama-3.3-70b (doesn't exist) to
deepseek-ai/DeepSeek-V3-0324 (their flagship model). Update
default image model to openai/gpt-image-2/text-to-image.
* feat(website): add AI-generated images to landing page, docs, and blog
Generate 5 images via Atlas Cloud's image API (gpt-image-2) to
elevate the website experience:
- hero.png: microservices network graph for landing page
- architecture.png: registry + broker architecture diagram
- mcp-agent.png: AI agent calling services via MCP
- developer-experience.png: terminal showing micro run/chat
- blog-atlas.png: Atlas Cloud unified API illustration
Add visual sections to the landing page with architecture,
MCP integration, and developer experience showcases. Add
images to docs index, MCP docs, and Atlas Cloud blog post.
All images resized to 1200px wide and optimized for web.
Generated using Atlas Cloud sponsor credits.
* feat(website): redesign landing page and add images to docs
Redesign the landing page from a centered card layout to a
full-width modern site with:
- Top navigation bar
- Hero section with gradient background and CTA buttons
- Full-width image showcase sections
- Two-column layout for architecture, MCP, and DX sections
- Feature grid with 6 capabilities
- Footer with links
- Responsive breakpoints for mobile
Generate 3 more images via Atlas Cloud for docs:
- getting-started.png for the getting started guide
- deployment.png for the deployment guide
- data-model.png for the data model docs
Add images to getting-started.md, model.md, and deployment.md.
---------
Co-authored-by: Claude <noreply@anthropic.com>
* feat(ai): add ImageModel interface with Atlas Cloud and OpenAI support
Add ai.ImageModel interface for text-to-image generation alongside
the existing ai.Model for text. Uses the same options pattern
(WithAPIKey, WithBaseURL) and the same provider registration
system (RegisterImage/NewImage).
Implement GenerateImage for Atlas Cloud and OpenAI providers via
the OpenAI-compatible /v1/images/generations endpoint. Default
image model is gpt-image-1. Responses return images as URL,
base64, or both depending on the provider.
Update Atlas Cloud blog post and integration guide with image
generation examples. Update ai/README.md with ImageModel docs.
* fix(website): widen docs content by reducing layout max-width to 1100px
Remove the 800px max-width on .content (which left empty space on
the right) and reduce the overall .layout and footer from 1400px
to 1100px. With the 230px sidebar this gives ~830px of content
width — readable and fills the page properly on desktop.
* feat(ai): add History for multi-turn conversation state
Add ai.History — a lightweight message accumulator that tracks
user prompts, assistant replies, and tool call/result pairs
across turns. FIFO truncation when message count exceeds the
configured limit. System prompt is passed through on every
Generate call.
Wire History into micro chat so conversations are multi-turn by
default (limit 50 messages). Add 'reset' command to clear
history mid-session.
5 unit tests covering accumulation, truncation, reset, snapshot
isolation, and tool call recording.
---------
Co-authored-by: Claude <noreply@anthropic.com>
Add ai.ImageModel interface for text-to-image generation alongside
the existing ai.Model for text. Uses the same options pattern
(WithAPIKey, WithBaseURL) and the same provider registration
system (RegisterImage/NewImage).
Implement GenerateImage for Atlas Cloud and OpenAI providers via
the OpenAI-compatible /v1/images/generations endpoint. Default
image model is gpt-image-1. Responses return images as URL,
base64, or both depending on the provider.
Update Atlas Cloud blog post and integration guide with image
generation examples. Update ai/README.md with ImageModel docs.
Co-authored-by: Claude <noreply@anthropic.com>
Use height="26" on both logos for consistent alignment. Switch
Anthropic to the Wikimedia wordmark SVG (no padding) instead of
the logo.wine version which had excessive whitespace.
Co-authored-by: Claude <noreply@anthropic.com>
Add blog/8 announcing Atlas Cloud as an official Go Micro sponsor.
Covers the sponsorship, Atlas Cloud's platform (300+ models, OpenAI
compatibility, enterprise compliance), and how the integration
works with the ai package, ai/tools, micro chat, and micro run.
Add guides/atlascloud-integration.md with full setup instructions:
quick start, configuration options, environment variables, model
selection, tool calling with services, and provider swapping.
Add Atlas Cloud and AI Provider guides to the docs sidebar
navigation. Add sponsorship link to README header.
Co-authored-by: Claude <noreply@anthropic.com>
* docs: add AI provider integration guide and Supported AI Providers section
Add a step-by-step guide for AI infrastructure companies to implement
ai.Model and contribute a provider to go-micro. Covers the full
lifecycle: skeleton, tool call handling, tests, registration, and PR
checklist.
Add a "Supported AI Providers" section to the project README that lists
current providers (Anthropic, OpenAI) in a table and links to the
integration guide with a call-to-action for new providers and sponsors.
Streamline the "Adding a New Provider" section in ai/README.md to point
to the new guide instead of duplicating a full code listing.
* fix: remove nonexistent Discord link from README
* fix(website): set content container width to 800px on desktop
Move the 800px max-width from .markdown-body up to .content so
the entire content pane (not just the inner body) is sized
correctly. The container now fills up to 800px beside the sidebar.
* feat(ai): wire Atlas Cloud into server and auto-detection
Import atlascloud provider in the micro server so it is available
when running micro run / micro server. Add atlascloud to
AutoDetectProvider so --ai_base_url with an atlascloud domain
selects the right provider automatically.
* feat(ai): add Google Gemini provider
Add ai/gemini implementing ai.Model for Google's Gemini API. Uses
the native generateContent endpoint with system_instruction,
contents/parts, and functionDeclarations — not an OpenAI shim.
Default model gemini-2.5-flash, auth via x-goog-api-key header.
Wire into micro server imports and AutoDetectProvider (matches
googleapis.com and google in base URL).
Update README.md and ai/README.md with provider listing.
* feat(ai): add Groq, Mistral, and Together AI providers
Add three new OpenAI-compatible providers:
- ai/groq: ultra-fast inference, default model llama-3.3-70b-versatile
- ai/mistral: Mistral AI, default model mistral-large-latest
- ai/together: Together AI, default model Llama-3.3-70B-Instruct-Turbo
All three are wired into the micro server imports and
AutoDetectProvider. README and ai/README updated with the full
provider table.
* feat(ai): add ai/tools helper and 'micro chat' interactive agent
Extract the registry-discovery + RPC-execution loop from the web
agent playground into a reusable ai/tools package:
- tools.New(reg) creates a Set bound to a registry
- Set.Discover() walks the registry and returns []ai.Tool with
LLM-safe (underscored) names, remembering the mapping back to
the original dotted form
- Set.Handler(client) returns an ai.ToolHandler that resolves
the safe name and issues the RPC
Add cmd/micro/chat — an interactive 'micro chat' REPL that uses
ai/tools to let users talk to their services through any
registered AI provider. Supports --prompt for single-shot use,
auto-detects the provider from --base_url, and falls back to the
provider's conventional env var (ANTHROPIC_API_KEY, etc).
Update README with the new command and the programmatic example.
* feat(examples): add gRPC interop example
Add examples/grpc-interop showing that any standard gRPC client can
call a go-micro service — no go-micro SDK required on the client
side. Includes:
- proto/greeter.proto with generated Go, gRPC, and micro stubs
- server/ using go-micro gRPC transport
- client/ using stock google.golang.org/grpc (no go-micro imports)
- README with Python example and explanation of how routing works
Addresses the confusion from issue #2818 where users didn't know
that go-micro gRPC services are callable by any gRPC client.
* fix: strip /api prefix from MCP routes
Change /api/mcp/tools and /api/mcp/call to /mcp/tools and
/mcp/call. MCP is a first-class feature, not a sub-path of the
API proxy. Update server routes, playground template, scopes
template, run.go output, README, CLI README, and all docs.
---------
Co-authored-by: Claude <noreply@anthropic.com>
* docs: add AI provider integration guide and Supported AI Providers section
Add a step-by-step guide for AI infrastructure companies to implement
ai.Model and contribute a provider to go-micro. Covers the full
lifecycle: skeleton, tool call handling, tests, registration, and PR
checklist.
Add a "Supported AI Providers" section to the project README that lists
current providers (Anthropic, OpenAI) in a table and links to the
integration guide with a call-to-action for new providers and sponsors.
Streamline the "Adding a New Provider" section in ai/README.md to point
to the new guide instead of duplicating a full code listing.
* fix: remove nonexistent Discord link from README
* fix(website): set content container width to 800px on desktop
Move the 800px max-width from .markdown-body up to .content so
the entire content pane (not just the inner body) is sized
correctly. The container now fills up to 800px beside the sidebar.
* feat(ai): wire Atlas Cloud into server and auto-detection
Import atlascloud provider in the micro server so it is available
when running micro run / micro server. Add atlascloud to
AutoDetectProvider so --ai_base_url with an atlascloud domain
selects the right provider automatically.
* feat(ai): add Google Gemini provider
Add ai/gemini implementing ai.Model for Google's Gemini API. Uses
the native generateContent endpoint with system_instruction,
contents/parts, and functionDeclarations — not an OpenAI shim.
Default model gemini-2.5-flash, auth via x-goog-api-key header.
Wire into micro server imports and AutoDetectProvider (matches
googleapis.com and google in base URL).
Update README.md and ai/README.md with provider listing.
* feat(ai): add Groq, Mistral, and Together AI providers
Add three new OpenAI-compatible providers:
- ai/groq: ultra-fast inference, default model llama-3.3-70b-versatile
- ai/mistral: Mistral AI, default model mistral-large-latest
- ai/together: Together AI, default model Llama-3.3-70B-Instruct-Turbo
All three are wired into the micro server imports and
AutoDetectProvider. README and ai/README updated with the full
provider table.
* feat(ai): add ai/tools helper and 'micro chat' interactive agent
Extract the registry-discovery + RPC-execution loop from the web
agent playground into a reusable ai/tools package:
- tools.New(reg) creates a Set bound to a registry
- Set.Discover() walks the registry and returns []ai.Tool with
LLM-safe (underscored) names, remembering the mapping back to
the original dotted form
- Set.Handler(client) returns an ai.ToolHandler that resolves
the safe name and issues the RPC
Add cmd/micro/chat — an interactive 'micro chat' REPL that uses
ai/tools to let users talk to their services through any
registered AI provider. Supports --prompt for single-shot use,
auto-detects the provider from --base_url, and falls back to the
provider's conventional env var (ANTHROPIC_API_KEY, etc).
Update README with the new command and the programmatic example.
* feat(examples): add gRPC interop example
Add examples/grpc-interop showing that any standard gRPC client can
call a go-micro service — no go-micro SDK required on the client
side. Includes:
- proto/greeter.proto with generated Go, gRPC, and micro stubs
- server/ using go-micro gRPC transport
- client/ using stock google.golang.org/grpc (no go-micro imports)
- README with Python example and explanation of how routing works
Addresses the confusion from issue #2818 where users didn't know
that go-micro gRPC services are callable by any gRPC client.
---------
Co-authored-by: Claude <noreply@anthropic.com>
* docs: add AI provider integration guide and Supported AI Providers section
Add a step-by-step guide for AI infrastructure companies to implement
ai.Model and contribute a provider to go-micro. Covers the full
lifecycle: skeleton, tool call handling, tests, registration, and PR
checklist.
Add a "Supported AI Providers" section to the project README that lists
current providers (Anthropic, OpenAI) in a table and links to the
integration guide with a call-to-action for new providers and sponsors.
Streamline the "Adding a New Provider" section in ai/README.md to point
to the new guide instead of duplicating a full code listing.
* feat(ai): add Atlas Cloud provider
Add ai/atlascloud implementing ai.Model for Atlas Cloud's
OpenAI-compatible chat completions API. Registers as "atlascloud"
with default model llama-3.3-70b and base URL
https://api.atlascloud.ai. Supports tool calling via ToolHandler.
Includes 7 unit tests covering registration, defaults, init,
generate-without-key, and stream-not-implemented.
Update the Supported AI Providers table in README.md and the
Supported Providers section in ai/README.md.
* fix: remove nonexistent Discord link from README
* fix(website): remove Micro app banner and widen content to 800px
Remove the "Try Micro" promotional banner from the homepage. Set
the docs content max-width to 800px for better readability on
desktop.
---------
Co-authored-by: Claude <noreply@anthropic.com>
* docs: add AI provider integration guide and Supported AI Providers section
Add a step-by-step guide for AI infrastructure companies to implement
ai.Model and contribute a provider to go-micro. Covers the full
lifecycle: skeleton, tool call handling, tests, registration, and PR
checklist.
Add a "Supported AI Providers" section to the project README that lists
current providers (Anthropic, OpenAI) in a table and links to the
integration guide with a call-to-action for new providers and sponsors.
Streamline the "Adding a New Provider" section in ai/README.md to point
to the new guide instead of duplicating a full code listing.
* feat(ai): add Atlas Cloud provider
Add ai/atlascloud implementing ai.Model for Atlas Cloud's
OpenAI-compatible chat completions API. Registers as "atlascloud"
with default model llama-3.3-70b and base URL
https://api.atlascloud.ai. Supports tool calling via ToolHandler.
Includes 7 unit tests covering registration, defaults, init,
generate-without-key, and stream-not-implemented.
Update the Supported AI Providers table in README.md and the
Supported Providers section in ai/README.md.
* fix: remove nonexistent Discord link from README
---------
Co-authored-by: Claude <noreply@anthropic.com>
* feat: add prometheus monitoring wrapper
Reintroduces the Prometheus metrics wrapper previously available in the
plugins repository, updated for go-micro v5. Exposes request count and
latency histograms for handlers, subscribers, and outgoing client calls
via NewHandlerWrapper, NewSubscriberWrapper, NewCallWrapper and
NewClientWrapper, labelled with service/endpoint/status.
Options cover namespace, subsystem, const labels, histogram buckets and
a custom registerer; duplicate collectors (e.g. from multiple wrappers
sharing the same config) are reused transparently via a cached
metrics bundle.
Fixes#2893
* fix(registry/etcd): clear lease/register caches on KeepAlive channel closure
When the etcd client's long-lived KeepAlive channel closes (e.g. because
the lease expired on the server side during a network partition), the
previous cleanup only removed the channel bookkeeping. The stale entries
in `leases` and `register` caused the next registerNode() heartbeat to
hit the "unchanged hash" short-circuit and skip re-registration entirely,
so the service permanently disappeared from etcd.
Extract the cleanup into handleKeepAliveClosed and also drop the cached
lease id and hash so the next heartbeat performs a full Grant+Put and
the service recovers within one RegisterInterval.
Regression introduced by #2822; fix is symmetric with the existing
synchronous KeepAliveOnce recovery path that propagates
rpctypes.ErrLeaseNotFound.
* docs: add AI provider integration guide and Supported AI Providers section
Add a step-by-step guide for AI infrastructure companies to implement
ai.Model and contribute a provider to go-micro. Covers the full
lifecycle: skeleton, tool call handling, tests, registration, and PR
checklist.
Add a "Supported AI Providers" section to the project README that lists
current providers (Anthropic, OpenAI) in a table and links to the
integration guide with a call-to-action for new providers and sponsors.
Streamline the "Adding a New Provider" section in ai/README.md to point
to the new guide instead of duplicating a full code listing.
* Update contribution guidelines in README.md
Removed Discord contact information for platform contributions.
---------
Co-authored-by: Claude <noreply@anthropic.com>
* feat: add prometheus monitoring wrapper
Reintroduces the Prometheus metrics wrapper previously available in the
plugins repository, updated for go-micro v5. Exposes request count and
latency histograms for handlers, subscribers, and outgoing client calls
via NewHandlerWrapper, NewSubscriberWrapper, NewCallWrapper and
NewClientWrapper, labelled with service/endpoint/status.
Options cover namespace, subsystem, const labels, histogram buckets and
a custom registerer; duplicate collectors (e.g. from multiple wrappers
sharing the same config) are reused transparently via a cached
metrics bundle.
Fixes#2893
* fix(registry/etcd): clear lease/register caches on KeepAlive channel closure
When the etcd client's long-lived KeepAlive channel closes (e.g. because
the lease expired on the server side during a network partition), the
previous cleanup only removed the channel bookkeeping. The stale entries
in `leases` and `register` caused the next registerNode() heartbeat to
hit the "unchanged hash" short-circuit and skip re-registration entirely,
so the service permanently disappeared from etcd.
Extract the cleanup into handleKeepAliveClosed and also drop the cached
lease id and hash so the next heartbeat performs a full Grant+Put and
the service recovers within one RegisterInterval.
Regression introduced by #2822; fix is symmetric with the existing
synchronous KeepAliveOnce recovery path that propagates
rpctypes.ErrLeaseNotFound.
---------
Co-authored-by: Claude <noreply@anthropic.com>
Reintroduces the Prometheus metrics wrapper previously available in the
plugins repository, updated for go-micro v5. Exposes request count and
latency histograms for handlers, subscribers, and outgoing client calls
via NewHandlerWrapper, NewSubscriberWrapper, NewCallWrapper and
NewClientWrapper, labelled with service/endpoint/status.
Options cover namespace, subsystem, const labels, histogram buckets and
a custom registerer; duplicate collectors (e.g. from multiple wrappers
sharing the same config) are reused transparently via a cached
metrics bundle.
Fixes#2893
Co-authored-by: Claude <noreply@anthropic.com>
* feat: add agent platform showcase and blog post
Add a complete platform example (Users, Posts, Comments, Mail) that
mirrors micro/blog, demonstrating how existing microservices become
AI-accessible through MCP with zero code changes.
Includes blog post "Your Microservices Are Already an AI Platform"
walking through real agent workflows: signup, content creation,
commenting, tagging, and cross-service messaging.
https://claude.ai/code/session_01GkduEhcrqcG45rdfYh8dAc
* refactor: rename handler types to drop redundant Service suffix
UserService → Users, PostService → Posts, CommentService → Comments,
MailService → Mail. Matches micro/blog naming convention.
https://claude.ai/code/session_01GkduEhcrqcG45rdfYh8dAc
* refactor: consolidate top-level directories, reduce framework bloat
Move internal/non-public packages behind internal/ or into their
parent packages where they belong:
- deploy/ → gateway/mcp/deploy/ (Helm charts belong with the gateway)
- profile/ → service/profile/ (preset plugin profiles are a service concern)
- scripts/ → internal/scripts/ (install script is not public API)
- test/ → internal/test/ (test harness is not public API)
- util/ → internal/util/ (internal helpers shouldn't be imported externally)
Also fixes CLAUDE.md merge conflict markers and updates project
structure documentation.
All import paths updated. Build and tests pass.
https://claude.ai/code/session_01GkduEhcrqcG45rdfYh8dAc
* refactor: redesign model package to match framework conventions
Rename model.Database interface to model.Model (consistent with
client.Client, server.Server, store.Store). Remove generics in
favor of interface{}-based API with reflection.
Key changes:
- model.Model interface: Register once, CRUD infers table from type
- DefaultModel + NewModel() + package-level convenience functions
- Schema registered via Register(&User{}), no per-call schema passing
- Memory implementation as default (in model package, like store)
- memory/sqlite/postgres backends updated for new interface
- protoc-gen-micro generates RegisterXModel() instead of generic factory
- All docs, blog, and README updated
https://claude.ai/code/session_01GkduEhcrqcG45rdfYh8dAc
* docs: clarify blog post 7 uses modular monolith, not multi-service
Blog post 7 demonstrated all handlers in a single process but framed
it as microservices without acknowledging the architectural difference.
- Add "A Note on Architecture" section explaining this is a modular
monolith demo and pointing to micro/blog for multi-service
- Clarify that handlers can be broken out into separate services later
- Fix "service registry" language to match single-process reality
- Restructure "Adding MCP to Existing Services" to distinguish the
in-process approach from registry-based gateway options
- Update closing to acknowledge both paradigms
- Fix README type names (&CommentService{} -> &Comments{}, etc.)
https://claude.ai/code/session_01GkduEhcrqcG45rdfYh8dAc
* docs: add Micro Chat to website showcase
https://claude.ai/code/session_01GkduEhcrqcG45rdfYh8dAc
* feat: github artifact release CI (#2886)
* 👷feat(ci): add artifact and docker releases
* 💚fix(ci): build issues
* 💚fix(ci): add permissions
* 💚fix(ci): multiple artifacts
* 💚fix(ci): split archives
* 💚fix(ci): cross platform list
* 🚧chore(ci): package name
* 🐛fix(script): install script extract arch
* 👷fix(ci): docker origin go-micro
* Update image reference in goreleaser configuration (#2887)
Fix wrong order `user/repo`
* Add blog post on building a chat app with Go Micro
Added a blog post detailing the development of a full chat app using Go Micro, outlining features, architecture, and lessons learned.
* docs: add blog post 8 to index, put Blog before Docs on homepage
- Add "We Built a Full Chat App in a Day" (blog/8) to blog index
- Reorder homepage links: Blog first (primary), Docs second
- Rename "Documentation" to "Docs"
https://claude.ai/code/session_01GkduEhcrqcG45rdfYh8dAc
---------
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Alexander Serheyev <74361701+alex-dna-tech@users.noreply.github.com>
* feat: add agent platform showcase and blog post
Add a complete platform example (Users, Posts, Comments, Mail) that
mirrors micro/blog, demonstrating how existing microservices become
AI-accessible through MCP with zero code changes.
Includes blog post "Your Microservices Are Already an AI Platform"
walking through real agent workflows: signup, content creation,
commenting, tagging, and cross-service messaging.
https://claude.ai/code/session_01GkduEhcrqcG45rdfYh8dAc
* refactor: rename handler types to drop redundant Service suffix
UserService → Users, PostService → Posts, CommentService → Comments,
MailService → Mail. Matches micro/blog naming convention.
https://claude.ai/code/session_01GkduEhcrqcG45rdfYh8dAc
* refactor: consolidate top-level directories, reduce framework bloat
Move internal/non-public packages behind internal/ or into their
parent packages where they belong:
- deploy/ → gateway/mcp/deploy/ (Helm charts belong with the gateway)
- profile/ → service/profile/ (preset plugin profiles are a service concern)
- scripts/ → internal/scripts/ (install script is not public API)
- test/ → internal/test/ (test harness is not public API)
- util/ → internal/util/ (internal helpers shouldn't be imported externally)
Also fixes CLAUDE.md merge conflict markers and updates project
structure documentation.
All import paths updated. Build and tests pass.
https://claude.ai/code/session_01GkduEhcrqcG45rdfYh8dAc
* refactor: redesign model package to match framework conventions
Rename model.Database interface to model.Model (consistent with
client.Client, server.Server, store.Store). Remove generics in
favor of interface{}-based API with reflection.
Key changes:
- model.Model interface: Register once, CRUD infers table from type
- DefaultModel + NewModel() + package-level convenience functions
- Schema registered via Register(&User{}), no per-call schema passing
- Memory implementation as default (in model package, like store)
- memory/sqlite/postgres backends updated for new interface
- protoc-gen-micro generates RegisterXModel() instead of generic factory
- All docs, blog, and README updated
https://claude.ai/code/session_01GkduEhcrqcG45rdfYh8dAc
* docs: clarify blog post 7 uses modular monolith, not multi-service
Blog post 7 demonstrated all handlers in a single process but framed
it as microservices without acknowledging the architectural difference.
- Add "A Note on Architecture" section explaining this is a modular
monolith demo and pointing to micro/blog for multi-service
- Clarify that handlers can be broken out into separate services later
- Fix "service registry" language to match single-process reality
- Restructure "Adding MCP to Existing Services" to distinguish the
in-process approach from registry-based gateway options
- Update closing to acknowledge both paradigms
- Fix README type names (&CommentService{} -> &Comments{}, etc.)
https://claude.ai/code/session_01GkduEhcrqcG45rdfYh8dAc
* docs: add Micro Chat to website showcase
https://claude.ai/code/session_01GkduEhcrqcG45rdfYh8dAc
---------
Co-authored-by: Claude <noreply@anthropic.com>
* feat: add agent platform showcase and blog post
Add a complete platform example (Users, Posts, Comments, Mail) that
mirrors micro/blog, demonstrating how existing microservices become
AI-accessible through MCP with zero code changes.
Includes blog post "Your Microservices Are Already an AI Platform"
walking through real agent workflows: signup, content creation,
commenting, tagging, and cross-service messaging.
https://claude.ai/code/session_01GkduEhcrqcG45rdfYh8dAc
* refactor: rename handler types to drop redundant Service suffix
UserService → Users, PostService → Posts, CommentService → Comments,
MailService → Mail. Matches micro/blog naming convention.
https://claude.ai/code/session_01GkduEhcrqcG45rdfYh8dAc
* refactor: consolidate top-level directories, reduce framework bloat
Move internal/non-public packages behind internal/ or into their
parent packages where they belong:
- deploy/ → gateway/mcp/deploy/ (Helm charts belong with the gateway)
- profile/ → service/profile/ (preset plugin profiles are a service concern)
- scripts/ → internal/scripts/ (install script is not public API)
- test/ → internal/test/ (test harness is not public API)
- util/ → internal/util/ (internal helpers shouldn't be imported externally)
Also fixes CLAUDE.md merge conflict markers and updates project
structure documentation.
All import paths updated. Build and tests pass.
https://claude.ai/code/session_01GkduEhcrqcG45rdfYh8dAc
* refactor: redesign model package to match framework conventions
Rename model.Database interface to model.Model (consistent with
client.Client, server.Server, store.Store). Remove generics in
favor of interface{}-based API with reflection.
Key changes:
- model.Model interface: Register once, CRUD infers table from type
- DefaultModel + NewModel() + package-level convenience functions
- Schema registered via Register(&User{}), no per-call schema passing
- Memory implementation as default (in model package, like store)
- memory/sqlite/postgres backends updated for new interface
- protoc-gen-micro generates RegisterXModel() instead of generic factory
- All docs, blog, and README updated
https://claude.ai/code/session_01GkduEhcrqcG45rdfYh8dAc
* docs: clarify blog post 7 uses modular monolith, not multi-service
Blog post 7 demonstrated all handlers in a single process but framed
it as microservices without acknowledging the architectural difference.
- Add "A Note on Architecture" section explaining this is a modular
monolith demo and pointing to micro/blog for multi-service
- Clarify that handlers can be broken out into separate services later
- Fix "service registry" language to match single-process reality
- Restructure "Adding MCP to Existing Services" to distinguish the
in-process approach from registry-based gateway options
- Update closing to acknowledge both paradigms
- Fix README type names (&CommentService{} -> &Comments{}, etc.)
https://claude.ai/code/session_01GkduEhcrqcG45rdfYh8dAc
---------
Co-authored-by: Claude <noreply@anthropic.com>
* feat: add agent platform showcase and blog post
Add a complete platform example (Users, Posts, Comments, Mail) that
mirrors micro/blog, demonstrating how existing microservices become
AI-accessible through MCP with zero code changes.
Includes blog post "Your Microservices Are Already an AI Platform"
walking through real agent workflows: signup, content creation,
commenting, tagging, and cross-service messaging.
https://claude.ai/code/session_01GkduEhcrqcG45rdfYh8dAc
* refactor: rename handler types to drop redundant Service suffix
UserService → Users, PostService → Posts, CommentService → Comments,
MailService → Mail. Matches micro/blog naming convention.
https://claude.ai/code/session_01GkduEhcrqcG45rdfYh8dAc
* refactor: consolidate top-level directories, reduce framework bloat
Move internal/non-public packages behind internal/ or into their
parent packages where they belong:
- deploy/ → gateway/mcp/deploy/ (Helm charts belong with the gateway)
- profile/ → service/profile/ (preset plugin profiles are a service concern)
- scripts/ → internal/scripts/ (install script is not public API)
- test/ → internal/test/ (test harness is not public API)
- util/ → internal/util/ (internal helpers shouldn't be imported externally)
Also fixes CLAUDE.md merge conflict markers and updates project
structure documentation.
All import paths updated. Build and tests pass.
https://claude.ai/code/session_01GkduEhcrqcG45rdfYh8dAc
* refactor: redesign model package to match framework conventions
Rename model.Database interface to model.Model (consistent with
client.Client, server.Server, store.Store). Remove generics in
favor of interface{}-based API with reflection.
Key changes:
- model.Model interface: Register once, CRUD infers table from type
- DefaultModel + NewModel() + package-level convenience functions
- Schema registered via Register(&User{}), no per-call schema passing
- Memory implementation as default (in model package, like store)
- memory/sqlite/postgres backends updated for new interface
- protoc-gen-micro generates RegisterXModel() instead of generic factory
- All docs, blog, and README updated
https://claude.ai/code/session_01GkduEhcrqcG45rdfYh8dAc
---------
Co-authored-by: Claude <noreply@anthropic.com>
* feat: add agent platform showcase and blog post
Add a complete platform example (Users, Posts, Comments, Mail) that
mirrors micro/blog, demonstrating how existing microservices become
AI-accessible through MCP with zero code changes.
Includes blog post "Your Microservices Are Already an AI Platform"
walking through real agent workflows: signup, content creation,
commenting, tagging, and cross-service messaging.
https://claude.ai/code/session_01GkduEhcrqcG45rdfYh8dAc
* refactor: rename handler types to drop redundant Service suffix
UserService → Users, PostService → Posts, CommentService → Comments,
MailService → Mail. Matches micro/blog naming convention.
https://claude.ai/code/session_01GkduEhcrqcG45rdfYh8dAc
---------
Co-authored-by: Claude <noreply@anthropic.com>
* docs: update all four documentation guides and mark Q2 complete
- ai-native-services: add WithMCP one-liner, standalone gateway,
WebSocket client example, and OpenTelemetry observability section
- mcp-security: add OTel distributed tracing, WebSocket authentication
(connection-level and per-message), DeniedReason audit field
- tool-descriptions: add manual overrides with WithEndpointDocs and
export formats section
- agent-patterns: add LangChain/LlamaIndex SDK pattern and standalone
gateway production pattern with Docker example
- Update roadmap: mark Q2 documentation as complete, Q2 at 100%
- Update status: reflect all recent completions, shift priorities
https://claude.ai/code/session_01GkduEhcrqcG45rdfYh8dAc
* feat: add agent demo example and blog post
Add examples/agent-demo with a multi-service project management app
(projects, tasks, team) that demonstrates AI agents interacting with
Go Micro services through MCP. Includes seed data and example prompts.
Add blog post 4 "Agents Meet Microservices: A Hands-On Demo" walking
through the example code and showing cross-service agent workflows.
https://claude.ai/code/session_01GkduEhcrqcG45rdfYh8dAc
* feat: enable multiple services in a single binary
Remove global state mutations from service and cmd option functions so
that configuring one service no longer overwrites another's settings.
Key changes:
- service/options.go: remove all DefaultXxx global writes from option
functions; newOptions() now creates fresh Server, Client, Store, and
Cache per service while sharing Registry, Broker, and Transport
- cmd/cmd.go: newCmd() uses local copies instead of pointers to package
globals; Before() no longer mutates DefaultXxx vars
- cmd/options.go: remove global mutations from all option functions
- service/service.go: export ServiceImpl type for cross-package use
- service/group.go: new Group type for multi-service lifecycle
- micro.go: add Start/Stop to Service interface, expose Group and
NewGroup convenience function
- examples/multi-service: working example with two services
https://claude.ai/code/session_01GkduEhcrqcG45rdfYh8dAc
* docs: highlight multi-service binary support
Add multi-service section to README with code example, update features
list, add to examples index, and note in status summary.
https://claude.ai/code/session_01GkduEhcrqcG45rdfYh8dAc
* feat: unify service API and clean up developer experience
- Unified service creation: micro.New("name", opts...) as canonical API
- Clean handler registration: service.Handle(handler, opts...) accepts
server.HandlerOption args directly, no need to reach through Server()
- Unexported serviceImpl: users interact through Service interface only
- Service groups use Service interface (not concrete type)
- Fixed Stop() to properly propagate BeforeStop/AfterStop errors
- Fixed store init: error-level log instead of fatal on init failure
- Updated all examples to use consistent patterns
- Updated README, getting-started, MCP docs, and guides
- Added blog post about the DX cleanup
https://claude.ai/code/session_01GkduEhcrqcG45rdfYh8dAc
* fix: add blog post 5 to blog index
Blog post 5 (Developer Experience Cleanup) existed as a file but was
missing from the blog index page.
https://claude.ai/code/session_01GkduEhcrqcG45rdfYh8dAc
* feat: make micro new generate MCP-enabled services by default
- main.go template includes mcp.WithMCP(":3001") by default
- Handler template has agent-friendly doc comments with @example tags
- Proto template has descriptive field comments
- README includes MCP usage, Claude Code config, and tool description tips
- Makefile adds mcp-tools, mcp-test, mcp-serve targets
- go.mod updated to Go 1.22
- Added --no-mcp flag to opt out of MCP integration
- Post-create output shows MCP endpoint URLs
https://claude.ai/code/session_01GkduEhcrqcG45rdfYh8dAc
* docs: add MCP migration guide and troubleshooting guide
- Migration guide: 3 approaches to add MCP to existing services
(WithMCP one-liner, standalone gateway, CLI)
- Troubleshooting guide: common issues with agents, WebSocket,
Claude Code, auth, rate limiting, and performance
https://claude.ai/code/session_01GkduEhcrqcG45rdfYh8dAc
* refactor: rename model/ package to ai/ for AI model providers
The model/ package name conflicted with the conventional use of "model"
for data models. Renamed to ai/ which better describes the package's
purpose (AI provider abstraction for Anthropic, OpenAI, etc.) and frees
up model/ for future data model layer use.
- Rename model/ → ai/ with package name change
- Update all Go imports from go-micro.dev/v5/model to go-micro.dev/v5/ai
- Update cmd/micro/server/server.go references (model.X → ai.X)
- Update all documentation and roadmap references
- All tests pass, CLI builds successfully
https://claude.ai/code/session_01GkduEhcrqcG45rdfYh8dAc
* feat: add model package for typed data access with CRUD and queries
New model/ package provides a typed data model layer using Go generics.
Supports structured CRUD operations, WHERE filters, ordering, pagination,
and automatic schema creation from struct tags.
Three backends:
- memory: in-memory for development and testing
- sqlite: embedded SQL for dev and single-node production
- postgres: full PostgreSQL for production deployments
Key features:
- Generic Model[T] with Create/Read/Update/Delete/List/Count
- Query builder: Where(), WhereOp(), OrderAsc/Desc(), Limit(), Offset()
- Struct tags: model:"key" for primary key, model:"index" for indexes
- Auto table creation from struct schema
- 19 tests passing across memory and sqlite backends
https://claude.ai/code/session_01GkduEhcrqcG45rdfYh8dAc
* feat: add model code generation to protoc-gen-micro
Extend the micro plugin to generate model structs from proto messages
annotated with // @model. Generated alongside client/server code in
the same .pb.micro.go file.
For a proto message like:
// @model
message User { string id = 1; string name = 2; }
Generates:
- UserModel struct with model:"key" and json tags
- NewUserModel(db) factory returning *model.Model[UserModel]
- UserModelFromProto(*User) *UserModel converter
- (*UserModel).ToProto() *User converter
Supports @model(table=custom_table, key=custom_field) options.
Adds GetComments() to generator for plugin comment inspection.
https://claude.ai/code/session_01GkduEhcrqcG45rdfYh8dAc
* feat: add Model() to Service interface for Client/Server/Model trifecta
Every service now exposes Client(), Server(), and Model() — call services,
handle requests, and save/query data from the same interface. Includes
README docs, blog post, and a full model guide on the docs site.
https://claude.ai/code/session_01GkduEhcrqcG45rdfYh8dAc
* feat: add Helm chart for MCP gateway Kubernetes deployment
Adds official Helm chart at deploy/helm/mcp-gateway/ with:
- Deployment, Service, ServiceAccount templates
- HPA for auto-scaling based on CPU/memory
- Ingress with TLS support
- Configurable registry (consul, etcd, mdns), rate limiting,
JWT auth, audit logging, and per-tool scopes
- Security context (non-root, read-only rootfs, drop all caps)
- NOTES.txt with post-install connection instructions
Updates roadmap and status docs to reflect Helm Charts as delivered.
https://claude.ai/code/session_01GkduEhcrqcG45rdfYh8dAc
* docs: add Helm chart entry to changelog
https://claude.ai/code/session_01GkduEhcrqcG45rdfYh8dAc
* feat: add per-tool circuit breakers to MCP gateway
Protects downstream services from cascading failures. When a tool's
RPC calls fail repeatedly, the circuit opens and rejects requests
immediately until the service recovers (half-open probe pattern).
- CircuitBreakerConfig with MaxFailures, Timeout, MaxHalfOpen
- Per-tool breakers created during service discovery
- Integrated into HTTP call path with 503 response when open
- Records success/failure after each RPC call
- --circuit-breaker and --circuit-breaker-timeout CLI flags
- 8 unit tests covering all state transitions
https://claude.ai/code/session_01GkduEhcrqcG45rdfYh8dAc
---------
Co-authored-by: Claude <noreply@anthropic.com>
* docs: update all four documentation guides and mark Q2 complete
- ai-native-services: add WithMCP one-liner, standalone gateway,
WebSocket client example, and OpenTelemetry observability section
- mcp-security: add OTel distributed tracing, WebSocket authentication
(connection-level and per-message), DeniedReason audit field
- tool-descriptions: add manual overrides with WithEndpointDocs and
export formats section
- agent-patterns: add LangChain/LlamaIndex SDK pattern and standalone
gateway production pattern with Docker example
- Update roadmap: mark Q2 documentation as complete, Q2 at 100%
- Update status: reflect all recent completions, shift priorities
https://claude.ai/code/session_01GkduEhcrqcG45rdfYh8dAc
* feat: add agent demo example and blog post
Add examples/agent-demo with a multi-service project management app
(projects, tasks, team) that demonstrates AI agents interacting with
Go Micro services through MCP. Includes seed data and example prompts.
Add blog post 4 "Agents Meet Microservices: A Hands-On Demo" walking
through the example code and showing cross-service agent workflows.
https://claude.ai/code/session_01GkduEhcrqcG45rdfYh8dAc
* feat: enable multiple services in a single binary
Remove global state mutations from service and cmd option functions so
that configuring one service no longer overwrites another's settings.
Key changes:
- service/options.go: remove all DefaultXxx global writes from option
functions; newOptions() now creates fresh Server, Client, Store, and
Cache per service while sharing Registry, Broker, and Transport
- cmd/cmd.go: newCmd() uses local copies instead of pointers to package
globals; Before() no longer mutates DefaultXxx vars
- cmd/options.go: remove global mutations from all option functions
- service/service.go: export ServiceImpl type for cross-package use
- service/group.go: new Group type for multi-service lifecycle
- micro.go: add Start/Stop to Service interface, expose Group and
NewGroup convenience function
- examples/multi-service: working example with two services
https://claude.ai/code/session_01GkduEhcrqcG45rdfYh8dAc
* docs: highlight multi-service binary support
Add multi-service section to README with code example, update features
list, add to examples index, and note in status summary.
https://claude.ai/code/session_01GkduEhcrqcG45rdfYh8dAc
* feat: unify service API and clean up developer experience
- Unified service creation: micro.New("name", opts...) as canonical API
- Clean handler registration: service.Handle(handler, opts...) accepts
server.HandlerOption args directly, no need to reach through Server()
- Unexported serviceImpl: users interact through Service interface only
- Service groups use Service interface (not concrete type)
- Fixed Stop() to properly propagate BeforeStop/AfterStop errors
- Fixed store init: error-level log instead of fatal on init failure
- Updated all examples to use consistent patterns
- Updated README, getting-started, MCP docs, and guides
- Added blog post about the DX cleanup
https://claude.ai/code/session_01GkduEhcrqcG45rdfYh8dAc
* fix: add blog post 5 to blog index
Blog post 5 (Developer Experience Cleanup) existed as a file but was
missing from the blog index page.
https://claude.ai/code/session_01GkduEhcrqcG45rdfYh8dAc
* feat: make micro new generate MCP-enabled services by default
- main.go template includes mcp.WithMCP(":3001") by default
- Handler template has agent-friendly doc comments with @example tags
- Proto template has descriptive field comments
- README includes MCP usage, Claude Code config, and tool description tips
- Makefile adds mcp-tools, mcp-test, mcp-serve targets
- go.mod updated to Go 1.22
- Added --no-mcp flag to opt out of MCP integration
- Post-create output shows MCP endpoint URLs
https://claude.ai/code/session_01GkduEhcrqcG45rdfYh8dAc
* docs: add MCP migration guide and troubleshooting guide
- Migration guide: 3 approaches to add MCP to existing services
(WithMCP one-liner, standalone gateway, CLI)
- Troubleshooting guide: common issues with agents, WebSocket,
Claude Code, auth, rate limiting, and performance
https://claude.ai/code/session_01GkduEhcrqcG45rdfYh8dAc
* refactor: rename model/ package to ai/ for AI model providers
The model/ package name conflicted with the conventional use of "model"
for data models. Renamed to ai/ which better describes the package's
purpose (AI provider abstraction for Anthropic, OpenAI, etc.) and frees
up model/ for future data model layer use.
- Rename model/ → ai/ with package name change
- Update all Go imports from go-micro.dev/v5/model to go-micro.dev/v5/ai
- Update cmd/micro/server/server.go references (model.X → ai.X)
- Update all documentation and roadmap references
- All tests pass, CLI builds successfully
https://claude.ai/code/session_01GkduEhcrqcG45rdfYh8dAc
* feat: add model package for typed data access with CRUD and queries
New model/ package provides a typed data model layer using Go generics.
Supports structured CRUD operations, WHERE filters, ordering, pagination,
and automatic schema creation from struct tags.
Three backends:
- memory: in-memory for development and testing
- sqlite: embedded SQL for dev and single-node production
- postgres: full PostgreSQL for production deployments
Key features:
- Generic Model[T] with Create/Read/Update/Delete/List/Count
- Query builder: Where(), WhereOp(), OrderAsc/Desc(), Limit(), Offset()
- Struct tags: model:"key" for primary key, model:"index" for indexes
- Auto table creation from struct schema
- 19 tests passing across memory and sqlite backends
https://claude.ai/code/session_01GkduEhcrqcG45rdfYh8dAc
* feat: add model code generation to protoc-gen-micro
Extend the micro plugin to generate model structs from proto messages
annotated with // @model. Generated alongside client/server code in
the same .pb.micro.go file.
For a proto message like:
// @model
message User { string id = 1; string name = 2; }
Generates:
- UserModel struct with model:"key" and json tags
- NewUserModel(db) factory returning *model.Model[UserModel]
- UserModelFromProto(*User) *UserModel converter
- (*UserModel).ToProto() *User converter
Supports @model(table=custom_table, key=custom_field) options.
Adds GetComments() to generator for plugin comment inspection.
https://claude.ai/code/session_01GkduEhcrqcG45rdfYh8dAc
* feat: add Model() to Service interface for Client/Server/Model trifecta
Every service now exposes Client(), Server(), and Model() — call services,
handle requests, and save/query data from the same interface. Includes
README docs, blog post, and a full model guide on the docs site.
https://claude.ai/code/session_01GkduEhcrqcG45rdfYh8dAc
* feat: add Helm chart for MCP gateway Kubernetes deployment
Adds official Helm chart at deploy/helm/mcp-gateway/ with:
- Deployment, Service, ServiceAccount templates
- HPA for auto-scaling based on CPU/memory
- Ingress with TLS support
- Configurable registry (consul, etcd, mdns), rate limiting,
JWT auth, audit logging, and per-tool scopes
- Security context (non-root, read-only rootfs, drop all caps)
- NOTES.txt with post-install connection instructions
Updates roadmap and status docs to reflect Helm Charts as delivered.
https://claude.ai/code/session_01GkduEhcrqcG45rdfYh8dAc
---------
Co-authored-by: Claude <noreply@anthropic.com>
* docs: update all four documentation guides and mark Q2 complete
- ai-native-services: add WithMCP one-liner, standalone gateway,
WebSocket client example, and OpenTelemetry observability section
- mcp-security: add OTel distributed tracing, WebSocket authentication
(connection-level and per-message), DeniedReason audit field
- tool-descriptions: add manual overrides with WithEndpointDocs and
export formats section
- agent-patterns: add LangChain/LlamaIndex SDK pattern and standalone
gateway production pattern with Docker example
- Update roadmap: mark Q2 documentation as complete, Q2 at 100%
- Update status: reflect all recent completions, shift priorities
https://claude.ai/code/session_01GkduEhcrqcG45rdfYh8dAc
* feat: add agent demo example and blog post
Add examples/agent-demo with a multi-service project management app
(projects, tasks, team) that demonstrates AI agents interacting with
Go Micro services through MCP. Includes seed data and example prompts.
Add blog post 4 "Agents Meet Microservices: A Hands-On Demo" walking
through the example code and showing cross-service agent workflows.
https://claude.ai/code/session_01GkduEhcrqcG45rdfYh8dAc
* feat: enable multiple services in a single binary
Remove global state mutations from service and cmd option functions so
that configuring one service no longer overwrites another's settings.
Key changes:
- service/options.go: remove all DefaultXxx global writes from option
functions; newOptions() now creates fresh Server, Client, Store, and
Cache per service while sharing Registry, Broker, and Transport
- cmd/cmd.go: newCmd() uses local copies instead of pointers to package
globals; Before() no longer mutates DefaultXxx vars
- cmd/options.go: remove global mutations from all option functions
- service/service.go: export ServiceImpl type for cross-package use
- service/group.go: new Group type for multi-service lifecycle
- micro.go: add Start/Stop to Service interface, expose Group and
NewGroup convenience function
- examples/multi-service: working example with two services
https://claude.ai/code/session_01GkduEhcrqcG45rdfYh8dAc
* docs: highlight multi-service binary support
Add multi-service section to README with code example, update features
list, add to examples index, and note in status summary.
https://claude.ai/code/session_01GkduEhcrqcG45rdfYh8dAc
* feat: unify service API and clean up developer experience
- Unified service creation: micro.New("name", opts...) as canonical API
- Clean handler registration: service.Handle(handler, opts...) accepts
server.HandlerOption args directly, no need to reach through Server()
- Unexported serviceImpl: users interact through Service interface only
- Service groups use Service interface (not concrete type)
- Fixed Stop() to properly propagate BeforeStop/AfterStop errors
- Fixed store init: error-level log instead of fatal on init failure
- Updated all examples to use consistent patterns
- Updated README, getting-started, MCP docs, and guides
- Added blog post about the DX cleanup
https://claude.ai/code/session_01GkduEhcrqcG45rdfYh8dAc
* fix: add blog post 5 to blog index
Blog post 5 (Developer Experience Cleanup) existed as a file but was
missing from the blog index page.
https://claude.ai/code/session_01GkduEhcrqcG45rdfYh8dAc
* feat: make micro new generate MCP-enabled services by default
- main.go template includes mcp.WithMCP(":3001") by default
- Handler template has agent-friendly doc comments with @example tags
- Proto template has descriptive field comments
- README includes MCP usage, Claude Code config, and tool description tips
- Makefile adds mcp-tools, mcp-test, mcp-serve targets
- go.mod updated to Go 1.22
- Added --no-mcp flag to opt out of MCP integration
- Post-create output shows MCP endpoint URLs
https://claude.ai/code/session_01GkduEhcrqcG45rdfYh8dAc
* docs: add MCP migration guide and troubleshooting guide
- Migration guide: 3 approaches to add MCP to existing services
(WithMCP one-liner, standalone gateway, CLI)
- Troubleshooting guide: common issues with agents, WebSocket,
Claude Code, auth, rate limiting, and performance
https://claude.ai/code/session_01GkduEhcrqcG45rdfYh8dAc
* refactor: rename model/ package to ai/ for AI model providers
The model/ package name conflicted with the conventional use of "model"
for data models. Renamed to ai/ which better describes the package's
purpose (AI provider abstraction for Anthropic, OpenAI, etc.) and frees
up model/ for future data model layer use.
- Rename model/ → ai/ with package name change
- Update all Go imports from go-micro.dev/v5/model to go-micro.dev/v5/ai
- Update cmd/micro/server/server.go references (model.X → ai.X)
- Update all documentation and roadmap references
- All tests pass, CLI builds successfully
https://claude.ai/code/session_01GkduEhcrqcG45rdfYh8dAc
* feat: add model package for typed data access with CRUD and queries
New model/ package provides a typed data model layer using Go generics.
Supports structured CRUD operations, WHERE filters, ordering, pagination,
and automatic schema creation from struct tags.
Three backends:
- memory: in-memory for development and testing
- sqlite: embedded SQL for dev and single-node production
- postgres: full PostgreSQL for production deployments
Key features:
- Generic Model[T] with Create/Read/Update/Delete/List/Count
- Query builder: Where(), WhereOp(), OrderAsc/Desc(), Limit(), Offset()
- Struct tags: model:"key" for primary key, model:"index" for indexes
- Auto table creation from struct schema
- 19 tests passing across memory and sqlite backends
https://claude.ai/code/session_01GkduEhcrqcG45rdfYh8dAc
* feat: add model code generation to protoc-gen-micro
Extend the micro plugin to generate model structs from proto messages
annotated with // @model. Generated alongside client/server code in
the same .pb.micro.go file.
For a proto message like:
// @model
message User { string id = 1; string name = 2; }
Generates:
- UserModel struct with model:"key" and json tags
- NewUserModel(db) factory returning *model.Model[UserModel]
- UserModelFromProto(*User) *UserModel converter
- (*UserModel).ToProto() *User converter
Supports @model(table=custom_table, key=custom_field) options.
Adds GetComments() to generator for plugin comment inspection.
https://claude.ai/code/session_01GkduEhcrqcG45rdfYh8dAc
* feat: add Model() to Service interface for Client/Server/Model trifecta
Every service now exposes Client(), Server(), and Model() — call services,
handle requests, and save/query data from the same interface. Includes
README docs, blog post, and a full model guide on the docs site.
https://claude.ai/code/session_01GkduEhcrqcG45rdfYh8dAc
---------
Co-authored-by: Claude <noreply@anthropic.com>
Keep a Changelog format covering 2026.01 through current unreleased
work. Includes all MCP gateway features, CLI commands, agent SDKs,
developer experience improvements, and documentation additions.
This replaces ad-hoc blog posts as the canonical "what changed" reference.
https://claude.ai/code/session_01GkduEhcrqcG45rdfYh8dAc
Co-authored-by: Claude <noreply@anthropic.com>
Move Claude-context working documents to internal/docs/:
- CURRENT_STATUS_SUMMARY.md
- PROJECT_STATUS_2026.md
- ROADMAP_2026.md
- IMPLEMENTATION_SUMMARY.md
These are session-tracking docs, not useful to most contributors.
Top level now only has standard files: README, CHANGELOG,
CONTRIBUTING, SECURITY, CLAUDE.md, and ROADMAP.
Updated all cross-references in CLAUDE.md, ROADMAP.md, and
website docs.
https://claude.ai/code/session_01GkduEhcrqcG45rdfYh8dAc
Co-authored-by: Claude <noreply@anthropic.com>
* docs: update all four documentation guides and mark Q2 complete
- ai-native-services: add WithMCP one-liner, standalone gateway,
WebSocket client example, and OpenTelemetry observability section
- mcp-security: add OTel distributed tracing, WebSocket authentication
(connection-level and per-message), DeniedReason audit field
- tool-descriptions: add manual overrides with WithEndpointDocs and
export formats section
- agent-patterns: add LangChain/LlamaIndex SDK pattern and standalone
gateway production pattern with Docker example
- Update roadmap: mark Q2 documentation as complete, Q2 at 100%
- Update status: reflect all recent completions, shift priorities
https://claude.ai/code/session_01GkduEhcrqcG45rdfYh8dAc
* feat: add agent demo example and blog post
Add examples/agent-demo with a multi-service project management app
(projects, tasks, team) that demonstrates AI agents interacting with
Go Micro services through MCP. Includes seed data and example prompts.
Add blog post 4 "Agents Meet Microservices: A Hands-On Demo" walking
through the example code and showing cross-service agent workflows.
https://claude.ai/code/session_01GkduEhcrqcG45rdfYh8dAc
* feat: enable multiple services in a single binary
Remove global state mutations from service and cmd option functions so
that configuring one service no longer overwrites another's settings.
Key changes:
- service/options.go: remove all DefaultXxx global writes from option
functions; newOptions() now creates fresh Server, Client, Store, and
Cache per service while sharing Registry, Broker, and Transport
- cmd/cmd.go: newCmd() uses local copies instead of pointers to package
globals; Before() no longer mutates DefaultXxx vars
- cmd/options.go: remove global mutations from all option functions
- service/service.go: export ServiceImpl type for cross-package use
- service/group.go: new Group type for multi-service lifecycle
- micro.go: add Start/Stop to Service interface, expose Group and
NewGroup convenience function
- examples/multi-service: working example with two services
https://claude.ai/code/session_01GkduEhcrqcG45rdfYh8dAc
* docs: highlight multi-service binary support
Add multi-service section to README with code example, update features
list, add to examples index, and note in status summary.
https://claude.ai/code/session_01GkduEhcrqcG45rdfYh8dAc
* feat: unify service API and clean up developer experience
- Unified service creation: micro.New("name", opts...) as canonical API
- Clean handler registration: service.Handle(handler, opts...) accepts
server.HandlerOption args directly, no need to reach through Server()
- Unexported serviceImpl: users interact through Service interface only
- Service groups use Service interface (not concrete type)
- Fixed Stop() to properly propagate BeforeStop/AfterStop errors
- Fixed store init: error-level log instead of fatal on init failure
- Updated all examples to use consistent patterns
- Updated README, getting-started, MCP docs, and guides
- Added blog post about the DX cleanup
https://claude.ai/code/session_01GkduEhcrqcG45rdfYh8dAc
* fix: add blog post 5 to blog index
Blog post 5 (Developer Experience Cleanup) existed as a file but was
missing from the blog index page.
https://claude.ai/code/session_01GkduEhcrqcG45rdfYh8dAc
* feat: make micro new generate MCP-enabled services by default
- main.go template includes mcp.WithMCP(":3001") by default
- Handler template has agent-friendly doc comments with @example tags
- Proto template has descriptive field comments
- README includes MCP usage, Claude Code config, and tool description tips
- Makefile adds mcp-tools, mcp-test, mcp-serve targets
- go.mod updated to Go 1.22
- Added --no-mcp flag to opt out of MCP integration
- Post-create output shows MCP endpoint URLs
https://claude.ai/code/session_01GkduEhcrqcG45rdfYh8dAc
---------
Co-authored-by: Claude <noreply@anthropic.com>
* docs: update all four documentation guides and mark Q2 complete
- ai-native-services: add WithMCP one-liner, standalone gateway,
WebSocket client example, and OpenTelemetry observability section
- mcp-security: add OTel distributed tracing, WebSocket authentication
(connection-level and per-message), DeniedReason audit field
- tool-descriptions: add manual overrides with WithEndpointDocs and
export formats section
- agent-patterns: add LangChain/LlamaIndex SDK pattern and standalone
gateway production pattern with Docker example
- Update roadmap: mark Q2 documentation as complete, Q2 at 100%
- Update status: reflect all recent completions, shift priorities
https://claude.ai/code/session_01GkduEhcrqcG45rdfYh8dAc
* feat: add agent demo example and blog post
Add examples/agent-demo with a multi-service project management app
(projects, tasks, team) that demonstrates AI agents interacting with
Go Micro services through MCP. Includes seed data and example prompts.
Add blog post 4 "Agents Meet Microservices: A Hands-On Demo" walking
through the example code and showing cross-service agent workflows.
https://claude.ai/code/session_01GkduEhcrqcG45rdfYh8dAc
* feat: enable multiple services in a single binary
Remove global state mutations from service and cmd option functions so
that configuring one service no longer overwrites another's settings.
Key changes:
- service/options.go: remove all DefaultXxx global writes from option
functions; newOptions() now creates fresh Server, Client, Store, and
Cache per service while sharing Registry, Broker, and Transport
- cmd/cmd.go: newCmd() uses local copies instead of pointers to package
globals; Before() no longer mutates DefaultXxx vars
- cmd/options.go: remove global mutations from all option functions
- service/service.go: export ServiceImpl type for cross-package use
- service/group.go: new Group type for multi-service lifecycle
- micro.go: add Start/Stop to Service interface, expose Group and
NewGroup convenience function
- examples/multi-service: working example with two services
https://claude.ai/code/session_01GkduEhcrqcG45rdfYh8dAc
* docs: highlight multi-service binary support
Add multi-service section to README with code example, update features
list, add to examples index, and note in status summary.
https://claude.ai/code/session_01GkduEhcrqcG45rdfYh8dAc
* feat: unify service API and clean up developer experience
- Unified service creation: micro.New("name", opts...) as canonical API
- Clean handler registration: service.Handle(handler, opts...) accepts
server.HandlerOption args directly, no need to reach through Server()
- Unexported serviceImpl: users interact through Service interface only
- Service groups use Service interface (not concrete type)
- Fixed Stop() to properly propagate BeforeStop/AfterStop errors
- Fixed store init: error-level log instead of fatal on init failure
- Updated all examples to use consistent patterns
- Updated README, getting-started, MCP docs, and guides
- Added blog post about the DX cleanup
https://claude.ai/code/session_01GkduEhcrqcG45rdfYh8dAc
* fix: add blog post 5 to blog index
Blog post 5 (Developer Experience Cleanup) existed as a file but was
missing from the blog index page.
https://claude.ai/code/session_01GkduEhcrqcG45rdfYh8dAc
---------
Co-authored-by: Claude <noreply@anthropic.com>
* docs: update all four documentation guides and mark Q2 complete
- ai-native-services: add WithMCP one-liner, standalone gateway,
WebSocket client example, and OpenTelemetry observability section
- mcp-security: add OTel distributed tracing, WebSocket authentication
(connection-level and per-message), DeniedReason audit field
- tool-descriptions: add manual overrides with WithEndpointDocs and
export formats section
- agent-patterns: add LangChain/LlamaIndex SDK pattern and standalone
gateway production pattern with Docker example
- Update roadmap: mark Q2 documentation as complete, Q2 at 100%
- Update status: reflect all recent completions, shift priorities
https://claude.ai/code/session_01GkduEhcrqcG45rdfYh8dAc
* feat: add agent demo example and blog post
Add examples/agent-demo with a multi-service project management app
(projects, tasks, team) that demonstrates AI agents interacting with
Go Micro services through MCP. Includes seed data and example prompts.
Add blog post 4 "Agents Meet Microservices: A Hands-On Demo" walking
through the example code and showing cross-service agent workflows.
https://claude.ai/code/session_01GkduEhcrqcG45rdfYh8dAc
* feat: enable multiple services in a single binary
Remove global state mutations from service and cmd option functions so
that configuring one service no longer overwrites another's settings.
Key changes:
- service/options.go: remove all DefaultXxx global writes from option
functions; newOptions() now creates fresh Server, Client, Store, and
Cache per service while sharing Registry, Broker, and Transport
- cmd/cmd.go: newCmd() uses local copies instead of pointers to package
globals; Before() no longer mutates DefaultXxx vars
- cmd/options.go: remove global mutations from all option functions
- service/service.go: export ServiceImpl type for cross-package use
- service/group.go: new Group type for multi-service lifecycle
- micro.go: add Start/Stop to Service interface, expose Group and
NewGroup convenience function
- examples/multi-service: working example with two services
https://claude.ai/code/session_01GkduEhcrqcG45rdfYh8dAc
* docs: highlight multi-service binary support
Add multi-service section to README with code example, update features
list, add to examples index, and note in status summary.
https://claude.ai/code/session_01GkduEhcrqcG45rdfYh8dAc
* feat: unify service API and clean up developer experience
- Unified service creation: micro.New("name", opts...) as canonical API
- Clean handler registration: service.Handle(handler, opts...) accepts
server.HandlerOption args directly, no need to reach through Server()
- Unexported serviceImpl: users interact through Service interface only
- Service groups use Service interface (not concrete type)
- Fixed Stop() to properly propagate BeforeStop/AfterStop errors
- Fixed store init: error-level log instead of fatal on init failure
- Updated all examples to use consistent patterns
- Updated README, getting-started, MCP docs, and guides
- Added blog post about the DX cleanup
https://claude.ai/code/session_01GkduEhcrqcG45rdfYh8dAc
---------
Co-authored-by: Claude <noreply@anthropic.com>
* docs: update all four documentation guides and mark Q2 complete
- ai-native-services: add WithMCP one-liner, standalone gateway,
WebSocket client example, and OpenTelemetry observability section
- mcp-security: add OTel distributed tracing, WebSocket authentication
(connection-level and per-message), DeniedReason audit field
- tool-descriptions: add manual overrides with WithEndpointDocs and
export formats section
- agent-patterns: add LangChain/LlamaIndex SDK pattern and standalone
gateway production pattern with Docker example
- Update roadmap: mark Q2 documentation as complete, Q2 at 100%
- Update status: reflect all recent completions, shift priorities
https://claude.ai/code/session_01GkduEhcrqcG45rdfYh8dAc
* feat: add agent demo example and blog post
Add examples/agent-demo with a multi-service project management app
(projects, tasks, team) that demonstrates AI agents interacting with
Go Micro services through MCP. Includes seed data and example prompts.
Add blog post 4 "Agents Meet Microservices: A Hands-On Demo" walking
through the example code and showing cross-service agent workflows.
https://claude.ai/code/session_01GkduEhcrqcG45rdfYh8dAc
* feat: enable multiple services in a single binary
Remove global state mutations from service and cmd option functions so
that configuring one service no longer overwrites another's settings.
Key changes:
- service/options.go: remove all DefaultXxx global writes from option
functions; newOptions() now creates fresh Server, Client, Store, and
Cache per service while sharing Registry, Broker, and Transport
- cmd/cmd.go: newCmd() uses local copies instead of pointers to package
globals; Before() no longer mutates DefaultXxx vars
- cmd/options.go: remove global mutations from all option functions
- service/service.go: export ServiceImpl type for cross-package use
- service/group.go: new Group type for multi-service lifecycle
- micro.go: add Start/Stop to Service interface, expose Group and
NewGroup convenience function
- examples/multi-service: working example with two services
https://claude.ai/code/session_01GkduEhcrqcG45rdfYh8dAc
* docs: highlight multi-service binary support
Add multi-service section to README with code example, update features
list, add to examples index, and note in status summary.
https://claude.ai/code/session_01GkduEhcrqcG45rdfYh8dAc
---------
Co-authored-by: Claude <noreply@anthropic.com>
* docs: update all four documentation guides and mark Q2 complete
- ai-native-services: add WithMCP one-liner, standalone gateway,
WebSocket client example, and OpenTelemetry observability section
- mcp-security: add OTel distributed tracing, WebSocket authentication
(connection-level and per-message), DeniedReason audit field
- tool-descriptions: add manual overrides with WithEndpointDocs and
export formats section
- agent-patterns: add LangChain/LlamaIndex SDK pattern and standalone
gateway production pattern with Docker example
- Update roadmap: mark Q2 documentation as complete, Q2 at 100%
- Update status: reflect all recent completions, shift priorities
https://claude.ai/code/session_01GkduEhcrqcG45rdfYh8dAc
* feat: add agent demo example and blog post
Add examples/agent-demo with a multi-service project management app
(projects, tasks, team) that demonstrates AI agents interacting with
Go Micro services through MCP. Includes seed data and example prompts.
Add blog post 4 "Agents Meet Microservices: A Hands-On Demo" walking
through the example code and showing cross-service agent workflows.
https://claude.ai/code/session_01GkduEhcrqcG45rdfYh8dAc
---------
Co-authored-by: Claude <noreply@anthropic.com>
Redesign the /agent playground with improved UX:
- Chat-focused layout with full-height message area and sticky input
- Collapsible tool call cards showing name, input, result, and timing
- Thinking indicator while waiting for agent response
- Settings panel collapsed by default (auto-opens if no API key)
- Empty state with available tools preview
- Clear chat button
- Better visual hierarchy with distinct message styles
Co-authored-by: Claude <noreply@anthropic.com>
* feat: add LlamaIndex SDK for Go Micro services
Add LlamaIndex integration package that enables LlamaIndex agents to
discover and call Go Micro microservices through the MCP gateway.
Follows the same pattern as the existing LangChain SDK.
- GoMicroToolkit with from_gateway() factory and tool filtering
- FunctionTool integration via llama_index.core.tools
- Auth support, error handling, and retry configuration
- Examples for basic agent and RAG + microservices workflows
- Unit tests with mocked gateway responses
https://claude.ai/code/session_01GkduEhcrqcG45rdfYh8dAc
* docs: update status for OTel, WebSocket, and LlamaIndex SDK completion
Reflect recently completed work in roadmap and status documents:
- Q2 progress: 85% -> 95% (WebSocket, LlamaIndex SDK done)
- Q3 progress: 40% -> 50% (OpenTelemetry integration done)
- Transports: 2 -> 3 (added WebSocket)
- Agent SDKs: 1 -> 2 (added LlamaIndex)
- Test coverage: 568 -> 1,000+ lines
https://claude.ai/code/session_01GkduEhcrqcG45rdfYh8dAc
* feat: add WithMCP convenience option, improve startup banner, and blog post
- Add mcp.WithMCP(":3000") service option for one-line MCP setup
- Improve `micro run` startup banner to show Agent playground, MCP
tools, and WebSocket endpoints prominently
- Add blog post: "Building the AI-Native Future of Go Micro with Claude"
covering WebSocket transport, OTel integration, LlamaIndex SDK, and
Anthropic's Claude Max sponsorship
- Update blog index and navigation links
https://claude.ai/code/session_01GkduEhcrqcG45rdfYh8dAc
---------
Co-authored-by: Claude <noreply@anthropic.com>
* Update docs and roadmap to March 2026 with focus priorities
- ROADMAP.md: Updated from Nov 2025 to reflect Q1 completions and current state
- ROADMAP_2026.md: Updated status to March 2026, added model package as delivered
- CURRENT_STATUS_SUMMARY.md: Rewrote with March 2026 status and clear next priorities
- PROJECT_STATUS_2026.md: Added model package section, updated recommendations
- Website roadmap: Updated Q3 security status and timestamps
Key focus areas identified: documentation guides, multi-protocol MCP,
LlamaIndex SDK, and OpenTelemetry integration.
https://claude.ai/code/session_01GkduEhcrqcG45rdfYh8dAc
* Add CLAUDE.md and four documentation guides to fill doc gaps
- CLAUDE.md: Project guide with structure, build commands, and priorities
- ai-native-services.md: End-to-end tutorial building an MCP-enabled task service
- mcp-security.md: Production security guide (auth, scopes, rate limiting, audit)
- tool-descriptions.md: Best practices for writing Go comments that help agents
- agent-patterns.md: Six integration patterns from single-agent to event-driven
- Updated docs index with new "AI & Agents" section linking all four guides
These were the highest priority gaps identified in the roadmap analysis:
the framework has solid features that were under-documented.
https://claude.ai/code/session_01GkduEhcrqcG45rdfYh8dAc
* feat: add OpenTelemetry tracing to MCP gateway
Integrate OpenTelemetry spans into the MCP gateway for both HTTP and
stdio transports. Each tool call now creates a server span with rich
attributes (tool name, account ID, auth outcome, transport type).
Trace context is propagated to downstream RPC calls via metadata,
enabling end-to-end distributed tracing through Jaeger, Grafana, etc.
New files:
- gateway/mcp/otel.go: Span creation, attribute constants, metadata carrier
- gateway/mcp/otel_test.go: 8 tests covering span creation, auth denied/allowed,
rate limiting, trace propagation, noop provider, and missing token
Changes:
- Options.TraceProvider: Optional trace.TracerProvider field
- handleCallTool (HTTP): Creates OTel spans with auth/rate-limit attributes
- handleToolsCall (stdio): Same instrumentation for stdio transport
- go.mod: Added go.opentelemetry.io/otel/sdk v1.35.0 (test dependency)
The existing MCP trace ID (UUID) is preserved for backward compatibility
and recorded as a span attribute alongside the W3C trace context.
https://claude.ai/code/session_01GkduEhcrqcG45rdfYh8dAc
---------
Co-authored-by: Claude <noreply@anthropic.com>
* Update docs and roadmap to March 2026 with focus priorities
- ROADMAP.md: Updated from Nov 2025 to reflect Q1 completions and current state
- ROADMAP_2026.md: Updated status to March 2026, added model package as delivered
- CURRENT_STATUS_SUMMARY.md: Rewrote with March 2026 status and clear next priorities
- PROJECT_STATUS_2026.md: Added model package section, updated recommendations
- Website roadmap: Updated Q3 security status and timestamps
Key focus areas identified: documentation guides, multi-protocol MCP,
LlamaIndex SDK, and OpenTelemetry integration.
https://claude.ai/code/session_01GkduEhcrqcG45rdfYh8dAc
* Add CLAUDE.md and four documentation guides to fill doc gaps
- CLAUDE.md: Project guide with structure, build commands, and priorities
- ai-native-services.md: End-to-end tutorial building an MCP-enabled task service
- mcp-security.md: Production security guide (auth, scopes, rate limiting, audit)
- tool-descriptions.md: Best practices for writing Go comments that help agents
- agent-patterns.md: Six integration patterns from single-agent to event-driven
- Updated docs index with new "AI & Agents" section linking all four guides
These were the highest priority gaps identified in the roadmap analysis:
the framework has solid features that were under-documented.
https://claude.ai/code/session_01GkduEhcrqcG45rdfYh8dAc
---------
Co-authored-by: Claude <noreply@anthropic.com>
* Initial plan
* Add MCP Playground page to web UI with tool discovery and calling
- Add playground.html template with chat-style agent prompt interface
- Add /playground route handler in server
- Add /api/mcp/tools endpoint to list available MCP tools
- Add /api/mcp/call endpoint to invoke MCP tools via RPC
- Add Playground link to sidebar navigation
- Playground auto-discovers services from registry and renders them as
callable tools with input forms and activity logging
Co-authored-by: asim <17530+asim@users.noreply.github.com>
* Add playground.html template and fix .gitignore micro pattern
Fix .gitignore pattern 'micro' -> '/micro' to only ignore root-level
binary, not paths containing 'micro' as a component.
Co-authored-by: asim <17530+asim@users.noreply.github.com>
* Address code review: use crypto/rand for trace IDs, fix var redecl, remove dup comment
Co-authored-by: asim <17530+asim@users.noreply.github.com>
* Rename Playground to Agent, fix styling, add LLM-powered prompt
- Rename /playground to /agent, move Agent link to top of sidebar menu
- Fix template styling: use existing form/input/button CSS from styles.css
instead of inline styles and form-plain class
- Add /api/agent/settings GET/POST endpoints for model API key, model
name, and base URL configuration (stored in server store)
- Add /api/agent/prompt POST endpoint that sends user prompt to
OpenAI-compatible LLM API with tool definitions from registry,
executes any tool calls via RPC, and returns results with a
follow-up LLM summary
- Show available tools in a table using existing table styles
- Prompt section is placed above settings for primary workflow
Co-authored-by: asim <17530+asim@users.noreply.github.com>
* Address code review: handle unmarshal errors, extract system prompt, improve param descriptions
Co-authored-by: asim <17530+asim@users.noreply.github.com>
* Add Anthropic model support to the agent
Support both OpenAI and Anthropic APIs in the agent prompt handler:
- Add provider selector (OpenAI/Anthropic) to settings UI and backend
- Auto-detect provider from base URL when not explicitly set
- Anthropic: use /v1/messages endpoint, x-api-key header, input_schema
format for tools, content blocks for responses, tool_use/tool_result
message format for follow-ups
- OpenAI: unchanged /v1/chat/completions with Bearer auth
- Default models: gpt-4o (OpenAI), claude-sonnet-4-20250514 (Anthropic)
- Provider-specific defaults for base URLs
Co-authored-by: asim <17530+asim@users.noreply.github.com>
* Remove duplicate Anthropic follow-up message construction
Co-authored-by: asim <17530+asim@users.noreply.github.com>
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: asim <17530+asim@users.noreply.github.com>
* Initial plan
* Add MCP per-tool scopes, tracing, rate limiting, and audit logging
- Add Scopes field to Tool struct for per-tool scope requirements
- Add Auth (auth.Auth) integration to Options for token inspection
- Add trace ID generation (UUID) propagated via metadata to downstream RPCs
- Add per-tool rate limiting with configurable requests/sec and burst
- Add AuditFunc callback for immutable tool-call audit records
- Extract tool scopes from registry endpoint metadata ("scopes" key)
- Update both HTTP and stdio transports with auth/trace/rate/audit
- Add comprehensive tests for all new functionality
Co-authored-by: asim <17530+asim@users.noreply.github.com>
* Revert unrelated example go.mod changes
Co-authored-by: asim <17530+asim@users.noreply.github.com>
* Remove auto-generated example go.sum files
Co-authored-by: asim <17530+asim@users.noreply.github.com>
* Add WithEndpointScopes helper, gateway-level ToolScopes, and documentation
- Add server.WithEndpointScopes() for declaring per-endpoint auth scopes at
handler registration time
- Add mcp.Options.ToolScopes for gateway-level scope overrides without
changing individual services
- Update documented example to show WithEndpointScopes usage
- Update examples/mcp/README.md with scopes, tracing, and rate-limiting docs
- Update gateway/mcp/DOCUMENTATION.md with scopes section and FAQ
- Add tests for both new features
Co-authored-by: asim <17530+asim@users.noreply.github.com>
* Fix ToolScopes doc comment: clarify override (not merge) semantics
Co-authored-by: asim <17530+asim@users.noreply.github.com>
* Revert unrelated example go.mod/go.sum changes
Co-authored-by: asim <17530+asim@users.noreply.github.com>
* Rename ToolScopes to Scopes in MCP Options
The field name "Scopes" is more universal and consistent with how
auth scopes are used throughout go-micro. Updated all code references,
tests, and documentation.
Co-authored-by: asim <17530+asim@users.noreply.github.com>
* MCP gateway: add per-tool scopes, tracing, rate limiting, and audit logging
Co-authored-by: asim <17530+asim@users.noreply.github.com>
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: asim <17530+asim@users.noreply.github.com>
Implement Q2 2026 roadmap items for AI-native microservices:
MCP stdio transport:
- JSON-RPC 2.0 over stdio for Claude Code integration
- Methods: initialize, tools/list, tools/call
- Auto-detection: stdio (no address) vs HTTP/SSE (with address)
micro mcp command:
- 'micro mcp serve' - start MCP server (stdio or HTTP)
- 'micro mcp list' - list available tools
- 'micro mcp test' - test a tool (placeholder)
- Enables Claude Code users to add microservices as tools
Gateway refactor:
- Created gateway/api package (reusable, 150 lines)
- Moved gateway logic from cmd/micro/server/gateway.go
- HandlerRegistrar pattern for flexibility
- cmd/micro/server/gateway.go now compatibility wrapper (72 lines)
- 50% code reduction, better separation of concerns
- Library users can now use gateway in custom apps
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Major Features:
- Unified gateway architecture (micro run + micro server use same code)
- MCP (Model Context Protocol) integration as library package
- AI-accessible microservices with 3 lines of code
Gateway Unification:
- Created reusable gateway module (cmd/micro/server/gateway.go)
- Updated micro run to use unified gateway (removed duplicate code)
- Conditional authentication (disabled in dev, required in prod)
- Reduced code duplication, simplified maintenance
MCP Integration:
- New library package: gateway/mcp
- Automatic service discovery → MCP tools
- HTTP/SSE transport support (stdio coming soon)
- Works for both library users and CLI users
- CLI flags: --mcp-address for micro run and micro server
Documentation:
- ADR-010: Unified Gateway Architecture
- CLI & Gateway Guide for users
- MCP Gateway README and examples
- Blog post: Making Your Microservices AI-Native with MCP
Breaking Changes: None (fully backward compatible)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Major Features:
- Unified gateway architecture (micro run + micro server use same code)
- MCP (Model Context Protocol) integration as library package
- AI-accessible microservices with 3 lines of code
Gateway Unification:
- Created reusable gateway module (cmd/micro/server/gateway.go)
- Updated micro run to use unified gateway (removed duplicate code)
- Conditional authentication (disabled in dev, required in prod)
- Reduced code duplication, simplified maintenance
MCP Integration:
- New library package: gateway/mcp
- Automatic service discovery → MCP tools
- HTTP/SSE transport support (stdio coming soon)
- Works for both library users and CLI users
- CLI flags: --mcp-address for micro run and micro server
Documentation:
- ADR-010: Unified Gateway Architecture
- CLI & Gateway Guide for users
- MCP Gateway README and examples
- Blog post: Making Your Microservices AI-Native with MCP
Breaking Changes: None (fully backward compatible)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* Initial plan
* Fix insecure TLS configuration - make secure by default
- Changed util/tls/Config() to be secure by default (InsecureSkipVerify=false)
- Added MICRO_TLS_INSECURE=true environment variable for development/testing
- Updated documentation to emphasize security-first approach
- Added comprehensive tests for TLS configuration
- All existing broker tests pass
Co-authored-by: asim <17530+asim@users.noreply.github.com>
* Revert to backward-compatible TLS defaults to avoid breaking changes
- Reverted default to InsecureSkipVerify=true for backward compatibility
- Changed environment variable to MICRO_TLS_SECURE=true (opt-in security)
- Added deprecation warning that logs once per process
- Updated tests to reflect backward-compatible behavior
- Added comprehensive migration guide
- No breaking changes - production systems safe to upgrade
- Security improvement is opt-in via environment variable
- Planned breaking change for v6 with proper major version bump
Co-authored-by: asim <17530+asim@users.noreply.github.com>
* Add TLS security update documentation
Co-authored-by: asim <17530+asim@users.noreply.github.com>
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: asim <17530+asim@users.noreply.github.com>
* Initial plan
* Apply rate limiting before singleflight to prevent blocking
- Check rate limiting BEFORE entering singleflight
- If rate-limited AND stale cache exists, return stale cache immediately
- This prevents all goroutines from blocking when etcd is down/slow
- Maintains stampede prevention via singleflight for non-rate-limited requests
- All existing tests pass
Co-authored-by: asim <17530+asim@users.noreply.github.com>
* Fix variable shadowing in rate limiting check
- Rename shadowed variables to currentLastRefresh and currentMinimumRetryInterval
- Improves code clarity and prevents potential bugs
- All tests still pass
Co-authored-by: asim <17530+asim@users.noreply.github.com>
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: asim <17530+asim@users.noreply.github.com>
- /blog/ - Blog index page
- /blog/1 - First post announcing micro deploy
- /docs/deployment.md - Deployment guide in website docs
- Updated navigation to include Blog link
- New blog layout template
Co-authored-by: Shelley <shelley@exe.dev>
* Add systemd-based deployment support
- micro init --server: Initialize server to receive deployments
- Creates /opt/micro/{bin,data,config} directories
- Generates systemd template unit (micro@.service)
- Creates 'micro' system user
- micro deploy: Deploy services via SSH + systemd
- Builds linux/amd64 binaries automatically
- Copies via rsync/scp to server
- Manages services via systemctl
- Helpful error messages for common issues
- micro status --remote: Check remote service status
- micro logs --remote: Stream remote logs via journalctl
- micro stop --remote: Stop services on remote server
- Config: Added 'deploy' blocks to micro.mu for named targets
The deployment model:
- systemd is the process supervisor (battle-tested)
- SSH is the transport (standard, secure)
- No custom daemons or platforms needed
Co-authored-by: Shelley <shelley@exe.dev>
* Add deployment documentation
- docs/deployment.md: Comprehensive guide for server deployment
- README.md: Updated deployment section with full workflow
Co-authored-by: Shelley <shelley@exe.dev>
* Add deployment section to CLI documentation
Co-authored-by: Shelley <shelley@exe.dev>
* Fix systemd template escaping and rsync permission warnings
- Fix %i escaping in systemd template (was being interpreted by fmt.Sprintf)
- Handle rsync exit code 23/24 gracefully (metadata permission warnings)
- Add --omit-dir-times to rsync to avoid directory timestamp errors
Co-authored-by: Shelley <shelley@exe.dev>
* Add install script for micro CLI
Co-authored-by: Shelley <shelley@exe.dev>
* Fix non-constant format string in deploy error
Co-authored-by: Shelley <shelley@exe.dev>
---------
Co-authored-by: Shelley <shelley@exe.dev>
micro build:
- Default: builds Go binaries to ./bin/
- Cross-compile with --os and --arch
- Docker is optional via --docker flag
micro deploy:
- Requires --ssh user@host
- Copies pre-built binaries (if ./bin/ exists)
- Or syncs source and builds on remote
- No Docker dependency
Go binaries are self-contained. No runtime needed.
Co-authored-by: Shelley <shelley@exe.dev>
Provides a test harness for running micro services in isolation:
h := testing.NewHarness(t)
defer h.Stop()
h.Name("users").Register(new(UsersHandler))
h.Start()
var rsp Response
h.Call("UsersHandler.Create", &req, &rsp)
Features:
- Isolated registry, transport, and broker per harness
- Simple API: Name(), Register(), Start(), Stop()
- Call helpers: Call(), CallContext()
- Assertions: AssertServiceRunning(), AssertCallSucceeds(), AssertCallFails()
- Access to underlying Client(), Server(), Registry()
Note: Due to go-micro's global defaults, each harness tests one service.
For multi-service testing, use integration tests or mocks.
Also fixes README.md example showing conflicting port 8080.
Co-authored-by: Shelley <shelley@exe.dev>
micro run now starts an HTTP gateway alongside your services:
- Web dashboard at http://localhost:8080
- API proxy at /api/{service}/{method}
- Health checks at /health
- Service listing at /services
The experience is now:
$ micro new helloworld
$ cd helloworld
$ micro run
Open http://localhost:8080 to see and call your services.
New flags:
--address :3000 # Custom gateway port
--no-gateway # Disable gateway (services only)
Updated documentation to make this the central experience.
Co-authored-by: Shelley <shelley@exe.dev>
Adds a new health package providing:
- /health endpoint for overall health status
- /health/live for Kubernetes liveness probes
- /health/ready for Kubernetes readiness probes
- Built-in checks: PingCheck, TCPCheck, HTTPCheck, DNSCheck
- Critical vs non-critical checks
- Concurrent check execution
- Configurable timeouts
- Service info metadata
Integrates with micro run's health check waiting when services
specify a port in their micro.mu configuration.
Example usage:
health.Register("database", health.PingCheck(db.Ping))
health.Register("redis", health.TCPCheck("localhost:6379", time.Second))
health.RegisterHandlers(mux)
Co-authored-by: Shelley <shelley@exe.dev>
- Add micro.mu DSL and micro.json config file support
- Implement hot reload with file watching (--no-watch to disable)
- Start services in dependency order (topological sort)
- Environment management (--env flag, MICRO_ENV var)
- Health check waiting before starting dependents
- Graceful shutdown in reverse dependency order
Config file example (micro.mu):
service users
path ./users
port 8081
service posts
path ./posts
port 8082
depends users
env development
STORE_ADDRESS file://./data
Closes#2828
Co-authored-by: Shelley <shelley@exe.dev>
* fix: remove deprecated rand.Seed calls
Go 1.20+ automatically seeds the global random number generator.
These calls are no-ops and generate warnings with newer Go versions.
Removed from:
- selector/strategy.go
- registry/cache/cache.go
- broker/memory.go
- broker/http.go
- cmd/cmd.go
- transport/memory.go
Co-authored-by: Shelley <shelley@exe.dev>
* fix: handle previously ignored errors
- MySQL store: properly handle prepared statement errors in initDB()
- Consul registry: handle client creation errors in Client() method
These silent failures could cause hard-to-debug issues in production.
Co-authored-by: Shelley <shelley@exe.dev>
* feat(genai): improve provider interface with context and streaming
Breaking changes:
- Generate() and Stream() now require context.Context as first parameter
- Stream.Close() added for proper resource cleanup
Improvements:
- Proper context support for cancellation and timeouts
- Real SSE streaming for OpenAI and Gemini text generation
- Better error handling with wrapped errors and API error responses
- Thread-safe provider registry with sync.RWMutex
- New options: WithMaxTokens, WithTemperature, WithTimeout
- Stream has proper Close() method for cleanup
- Results can include Error field for per-chunk errors
Provider updates:
- OpenAI: true streaming with SSE parsing, proper HTTP client with timeout
- Gemini: true streaming with streamGenerateContent endpoint
- Default model updated to gpt-4o-mini (OpenAI) and gemini-2.0-flash (Gemini)
Co-authored-by: Shelley <shelley@exe.dev>
* feat(tls): make TLS secure by default, configurable via environment
BREAKING: TLS now verifies certificates by default. Set MICRO_TLS_INSECURE=true
to restore previous behavior (NOT recommended for production).
Changes:
- Add util/tls.Config(), SecureConfig(), InsecureConfig(), ConfigFromEnv() helpers
- Update all components to use ConfigFromEnv() instead of hardcoded InsecureSkipVerify
- Set MinVersion to TLS 1.2 for all TLS configs
Affected components:
- broker/http
- broker/rabbitmq
- registry/etcd
- registry/consul
- transport/grpc
This improves security posture while allowing opt-out for development environments.
Co-authored-by: Shelley <shelley@exe.dev>
* feat(tls): add TLS helpers with opt-in secure mode
NOT a breaking change - keeps InsecureSkipVerify=true as default for
local development compatibility.
New util/tls helpers:
- Config() - returns config based on MICRO_TLS_SECURE env var
- SecureConfig() - certificate verification enabled
- InsecureConfig() - certificate verification disabled (dev only)
For production security, use one of:
- Set MICRO_TLS_SECURE=true with proper CA-signed certs
- Use a service mesh (Istio, Linkerd) for automatic mTLS
- Configure TLSConfig directly with your certificates
Also: Changed CLI alias from 'g' to 'gen' for clarity
- micro generate handler -> micro gen handler
Co-authored-by: Shelley <shelley@exe.dev>
* refactor(cli): rename generate directory to gen for consistency
Directory name now matches the command alias:
cmd/micro/cli/gen/ -> micro gen handler
Co-authored-by: Shelley <shelley@exe.dev>
---------
Co-authored-by: Shelley <shelley@exe.dev>
This adds Server-Sent Events (SSE) support to the web package, enabling
real-time updates in web applications built with go-micro.
Features:
- SSEBroadcaster manages connected clients and broadcasts events
- Integrates with events.Stream for subscribing to topics
- Supports JSON events and raw HTML (for htmx/datastar)
- Keep-alive mechanism for long-lived connections
- Thread-safe client management
Usage:
broadcaster := web.NewSSEBroadcaster(
web.WithStream(stream),
web.WithTopics("posts", "comments"),
)
broadcaster.Start()
router.GET("/events", broadcaster.Handler())
This enables real-time features requested in #2788, including:
- Live updates without page refresh
- htmx/datastar integration
- Foundation for MCP (Model Context Protocol) support
Closes#2788
Co-authored-by: Shelley <shelley@exe.dev>
* Initial plan
* Enhance cache rate limiting to protect against rolling deployment scenarios
Per @asim's feedback, rate limiting now applies to ALL cache refresh attempts
(not just error cases) to prevent registry overload during rolling deployments.
Changes:
- Rate limit ALL refresh attempts using lastRefreshAttempt tracking
- Always return stale cache if available (even if expired) when rate limiting
- Only return ErrNotFound when no cache exists during rate limit period
- Rate limiting happens inside singleflight to avoid race conditions
- Update test to reflect new behavior (no retry when stale cache + rate limit)
- Enhanced documentation with rolling deployment scenario examples
This addresses the scenario where all upstream services expire their cache
simultaneously during a downstream rolling deployment, which would previously
cause a stampede to the registry under high QPS.
Co-authored-by: asim <17530+asim@users.noreply.github.com>
* Remove unused failedAttempts and consecutiveFailures fields
Per @asim's feedback, these fields are no longer needed since the new
rate limiting strategy uses lastRefreshAttempt to track ALL refresh
attempts, not just failed ones.
Removed:
- failedAttempts map[string]time.Time
- consecutiveFailures int
- All code that sets these fields
The rate limiting logic now only uses lastRefreshAttempt, making these
fields redundant. All tests continue to pass.
Co-authored-by: asim <17530+asim@users.noreply.github.com>
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: asim <17530+asim@users.noreply.github.com>
* Initial plan
* Add adaptive throttling to prevent cache penetration without stale cache
Implement rate limiting mechanism to protect etcd when:
- Cache is empty (no stale data available)
- Registry is failing/overloaded
- Multiple sequential requests arrive
Changes:
- Add MinimumRetryInterval option (default 5s)
- Track last failed attempt time per service
- Throttle requests within retry interval when no cache exists
- Clear throttling on successful lookup
- Add comprehensive tests validating throttling behavior
Co-authored-by: asim <17530+asim@users.noreply.github.com>
* Fix WaitGroup race condition in events stream tests
The WaitGroup.Add() calls were happening after goroutines started,
causing a race where Done() could be called before Add(), resulting
in "negative WaitGroup counter" panics.
Fixes:
- Move wg.Add(1) before goroutine in TestConsumeTopic
- Move wg.Add(2) before first goroutine in TestConsumeGroup
Co-authored-by: asim <17530+asim@users.noreply.github.com>
* Update registry cache documentation with adaptive throttling feature
Document the new adaptive throttling feature that prevents cache
penetration when registry is failing and no stale cache exists.
Includes:
- Feature overview
- Usage examples with configuration options
- Explanation of throttling behavior
- Example scenario demonstrating protection
Co-authored-by: asim <17530+asim@users.noreply.github.com>
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: asim <17530+asim@users.noreply.github.com>
* Initial plan
* Replace KeepAliveOnce with KeepAlive to reduce etcd auth requests
Co-authored-by: asim <17530+asim@users.noreply.github.com>
* Add tests to verify cache penetration protection via singleflight
Co-authored-by: asim <17530+asim@users.noreply.github.com>
* Add etcd integration tests to CI workflow
Co-authored-by: asim <17530+asim@users.noreply.github.com>
* Fix race conditions and improve code quality based on review feedback
Co-authored-by: asim <17530+asim@users.noreply.github.com>
* Add workflow permissions to fix security scan finding
Co-authored-by: asim <17530+asim@users.noreply.github.com>
* Add comprehensive documentation for performance improvements
Co-authored-by: asim <17530+asim@users.noreply.github.com>
* Fix memory store limit/offset bug causing events test failure
Co-authored-by: asim <17530+asim@users.noreply.github.com>
* Fix memory store to filter before limiting in prefix/suffix reads
The previous fix had a logic error where limit/offset were applied before
prefix/suffix filtering. This could cause incorrect results when the first
N items in the unfiltered list don't match the search criteria.
Now filters first to get all matching keys, then applies limit/offset to
the filtered results. This ensures ReadLimit(1) always returns 1 matching
record if available, regardless of map iteration order.
Co-authored-by: asim <17530+asim@users.noreply.github.com>
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: asim <17530+asim@users.noreply.github.com>
* Initial plan
* docs: clarify gRPC server option ordering and service name usage
- Fix all examples to show Server option before Name option
- Add note explaining why option ordering matters
- Add new section on "Option Ordering Issue" in Common Errors
- Add new section on "Service Name vs Package Name" in Common Errors
- Update transport.md to show proper ordering with comment
Co-authored-by: asim <17530+asim@users.noreply.github.com>
* docs: refine comments based on code review feedback
- Clarify that Server ordering before Name is mandatory
- Remove confusing comment about Client ordering being for consistency
Co-authored-by: asim <17530+asim@users.noreply.github.com>
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: asim <17530+asim@users.noreply.github.com>
The `github.com/streadway/amqp` module is no longer actively maintained.
The new module is now maintained by the RabbitMQ core team under a
different package name.
Reference: https://github.com/rabbitmq/amqp091-go
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
* genai interface
* x
* x
* text to speech
* Re-add events package (#2761)
* Re-add events package
* run redis as a dep
* remove redis events
* fix: data race on event subscriber
* fix: data race in tests
* fix: store errors
* fix: lint issues
* feat: default stream
* Update file.go
---------
Co-authored-by: Brian Ketelsen <bketelsen@gmail.com>
* .
* copilot couldn't make it compile so I did
* copilot couldn't make it compile so I did
* x
---------
Co-authored-by: Brian Ketelsen <bketelsen@gmail.com>
* Re-add events package
* run redis as a dep
* remove redis events
* fix: data race on event subscriber
* fix: data race in tests
* fix: store errors
* fix: lint issues
* feat: default stream
* Update file.go
---------
Co-authored-by: Brian Ketelsen <bketelsen@gmail.com>
* [fix] etcd config source prefix issue (#2389)
* http transport data race issue (#2436)
* [fix] #2431 http transport data race issue
* [feature] Ability to close connection while receiving.
Ability to send messages while receiving.
Icreased r channel limit to 100 to more fluently communication.
Do not dropp sent request if r channel is full.
* [feature] always subscribes to all topics and if there is an error in one of them, the unsuccessful topics will be subscribed to again
---------
Co-authored-by: Johnson C <chengqiaosheng@gmail.com>
* feat: more plugins
* chore(ci): split out benchmarks
Attempt to resolve too many open files in ci
* chore(ci): split out benchmarks
* fix(ci): Attempt to resolve too many open files in ci
* fix: set DefaultX for cli flag and service option
* fix: restore http broker
* fix: default http broker
* feat: full nats profile
* chore: still ugly, not ready
* fix: better initialization for profiles
* fix(tests): comment out flaky listen tests
* fix: disable benchmarks on gha
* chore: cleanup, comments
* chore: add nats config source
- Removed existing mDNS test file and replaced it with a new implementation.
- Added a new `mdns_registry.go` file that contains the MDNS registry logic.
- Updated the default registry to use the new MDNS registry.
- Refactored tests to accommodate the new MDNS registry implementation.
- Implemented service registration, deregistration, and service discovery using mDNS.
- Added encoding and decoding functions for mDNS TXT records.
- Implemented a watcher for monitoring service changes in the MDNS registry.
go install github.com/micro/go-micro/cmd/protoc-gen-micro@latest
should be used, instand of
`go install github.com/micro/go-micro/cmd/protoc-gen-micro`
* [fix] etcd config source prefix issue (#2389)
* http transport data race issue (#2436)
* [fix] #2431 http transport data race issue
* [feature] Ability to close connection while receiving.
Ability to send messages while receiving.
Icreased r channel limit to 100 to more fluently communication.
Do not dropp sent request if r channel is full.
* [fix] Use pool connection close timeout
* [fix] replace Close with private function
* [fix] Do not close the transport client twice in stream connection , the transport client is closed in the rpc codec
* [fix] tests
---------
Co-authored-by: Johnson C <chengqiaosheng@gmail.com>
* [fix] etcd config source prefix issue (#2389)
* http transport data race issue (#2436)
* [fix] #2431 http transport data race issue
* [feature] Ability to close connection while receiving.
Ability to send messages while receiving.
Icreased r channel limit to 100 to more fluently communication.
Do not dropp sent request if r channel is full.
* [fix] Do not send error when stream send eos header, just close the connection
* [fix] Do not overwrite the error in http client
---------
Co-authored-by: Johnson C <chengqiaosheng@gmail.com>
* services is shared between routines, when application change services returned by get function may lead to other routine set a changed services to cache
* services is shared between routines, when application change services returned by get function may lead to other routine set a changed services to cache
---------
Co-authored-by: Shuaihu Liu <shuaihu.liu@shopee.com>
* [fix] etcd config source prefix issue (#2389)
* http transport data race issue (#2436)
* [fix] #2431 http transport data race issue
* [feature] Ability to close connection while receiving.
Ability to send messages while receiving.
Icreased r channel limit to 100 to more fluently communication.
Do not dropp sent request if r channel is full.
* [fix] Do not close the transport client twice in stream connection , the transport client is closed in the rpc codec
---------
Co-authored-by: Johnson C <chengqiaosheng@gmail.com>
Co-authored-by: Hunyadvári Péter <peter.hunyadvari@vcc.live>
We should use `(*regexp.Regexp).MatchString` instead of
`(*regexp.Regexp).Match([]byte(...))` when matching string to avoid
unnecessary `[]byte` conversions and reduce allocations.
func BenchmarkMatch(b *testing.B) {
for i := 0; i < b.N; i++ {
if match := versionRe.Match([]byte("v1")); !match {
b.Fail()
}
}
}
func BenchmarkMatchString(b *testing.B) {
for i := 0; i < b.N; i++ {
if match := versionRe.MatchString("v1"); !match {
b.Fail()
}
}
}
goos: linux
goarch: amd64
pkg: go-micro.dev/v4/api/handler/event
cpu: AMD Ryzen 7 PRO 4750U with Radeon Graphics
BenchmarkMatch-16 11430127 127.4 ns/op 2 B/op 1 allocs/op
BenchmarkMatchString-16 12220628 97.54 ns/op 0 B/op 0 allocs/op
PASS
ok go-micro.dev/v4/api/handler/event 3.822s
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
* [fix] etcd config source prefix issue (#2389)
* http transport data race issue (#2436)
* [fix] #2431 http transport data race issue
* [feature] Ability to close connection while receiving.
Ability to send messages while receiving.
Icreased r channel limit to 100 to more fluently communication.
Do not dropp sent request if r channel is full.
* [fix] Read buff before reset it, when the connection is closed
Co-authored-by: Johnson C <chengqiaosheng@gmail.com>
Co-authored-by: Hunyadvári Péter <peter.hunyadvari@vcc.live>
* [fix] etcd config source prefix issue (#2389)
* http transport data race issue (#2436)
* [fix] #2431 http transport data race issue
* [feature] Ability to close connection while receiving.
Ability to send messages while receiving.
Icreased r channel limit to 100 to more fluently communication.
Do not dropp sent request if r channel is full.
Co-authored-by: Johnson C <chengqiaosheng@gmail.com>
Co-authored-by: Hunyadvári Péter <peter.hunyadvari@vcc.live>
* feat: redis implementation of cache
* Revert "feat: redis implementation of cache"
This reverts commit 4b3f25c1fc494d934613992d8a762024fafad7b6.
* feat: update out of date docs
* Support direct generation of grpc method when package and service names of proto files are different.
* fix req.Interface() return nil.
* Get rid of dependence on 'Micro-Topic'
* Revert "Get rid of dependence on 'Micro-Topic'"
This reverts commit 3ff69443364d39f5fda3a32fc2249826e2d207dd.
* Revert "fix req.Interface() return nil."
This reverts commit 90a1b34195e07772fa6f2074e1cf22237ac2a87f.
* Revert "Revert "fix req.Interface() return nil.""
This reverts commit e64737b7da8d1767c4456881f6730f1c196cea60.
* Revert "Revert "Get rid of dependence on 'Micro-Topic'""
This reverts commit 141bb0a557c81cb6d1c651b085b3e65483d5e681.
* fix: consume and publish blocked after reconnecting
Co-authored-by: maxinglun <maxinglun@zhijiaxing.net>
2. try fixing grpc plugin failed to get issue
use v4.0.0-v4.0.0-00010101000000-000000000000 instead of specific version
3. kafka panic on disconnect
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xc0000005 code=0x0 addr=0x18 pc=0x1266c50]
goroutine 31 [running]:
github.com/asim/go-micro/plugins/broker/kafka/v3.(*kBroker).Disconnect(0xc0002400c0)
C:/Workshop/Go/pkg/mod/github.com/asim/go-micro/plugins/broker/kafka/v3@v3.7.0/kafka.go:130 +0xd0
github.com/asim/go-micro/plugins/server/grpc/v3.(*grpcServer).Start.func2()
C:/Workshop/Go/pkg/mod/github.com/asim/go-micro/plugins/server/grpc/v3@v3.0.0-20210712061837-0532fd9de8ae/grpc.go:998 +0xc8d
created by github.com/asim/go-micro/plugins/server/grpc/v3.(*grpcServer).Start
C:/Workshop/Go/pkg/mod/github.com/asim/go-micro/plugins/server/grpc/v3@v3.0.0-20210712061837-0532fd9de8ae/grpc.go:917 +0xcaf
exit status 2
I realized that when writing `require go-micro.dev/v4 v4.1.0` in the
`go.mod` file, `go mod tidy` will install that exact version of
`go-micro.dev/v4`. As of right now, v4.1.0 is an outdated version, and
preferably we shouldn't be updating gomu's Go Modules template everytime
a new release is tagged, but still want gomu users to generate projects
using the latest Go Micro version.
In an attempt to solve this problem, I'm opting to add a new Makefile
rule for new projects generated by gomu, `update` that runs `go get -u`.
This aggressively updates any dependencies your Go Modules project may
have. `go mod tidy` is then able to prune the `go.mod` and `go.sum`
files by removing the unnecessary checksums and transitive dependencies
(e.g. `// indirect`), that were added to by go get -u due to newer
semver available.
Put one and one together and you get two. In addition to adding an
`update` rule to the Makefile generated for new projects by gomu, I'm
also updating the proto and client comments printed when new projects
have been generated to promote the `update` rule.
References:
- https://stackoverflow.com/questions/67201708/go-update-all-modules
go get: installing executables with 'go get' in module mode is deprecated.
To adjust and download dependencies of the current module, use 'go get -d'.
To install using requirements of the current module, use 'go install'.
To install ignoring the current module, use 'go install' with a version,
like 'go install example.com/cmd@latest'.
For more information, see https://golang.org/doc/go-get-install-deprecation
or run 'go help get' or 'go help install'.
* add errors.As
convert target err to *Error, return false if err don't match *Error
* update errors.As to (*Error, bool)
* fixing FromError panic issue when err is nil
Though some of the Zap logger option can be customized through
plugins/logger/zap.Options, this change allows go.uber.org/zap.Option be
be injected directly for deeper customization.
There's really no point in having the `generator` be embedded in a
`file` package so we remove the `file` package and make the `generator`
package a first class citizen instead.
* Move file generation to new package
* Use text/template instead of html/template
* Make config variables more consistent
* Combine generate files and print comments there
* Add gomu generate command
* Refactor project templating to file library
* Determine client earlier
Gomu expects a `map[string]string` type response back, but this isn't
always the case. When Gomu calls a service endpoint that responds with,
let's say, a key where its value is a map or a list, Gomu would be
unable to decode that response. By expecting a `map[string]interface{}`
type response, Gomu is able to decode those responses as well.
* Use internal runtime package for gomu run
This change refactors the `gomu run` command to use Go Micro's internal
runtime package in order to run services. Not only does this clean up
duplicate functionality between Go Micro and Gomu, but also adds the
feature to Gomu to run remote projects. For example, the following
command pulls in a remote project and runs it locally.
```bash
gomu run github.com/auditemarlow/helloworld
```
The `gomu run` command remains backwards compatible. By invoking `gomu
run` in a Go Micro project directory, Gomu will simply run that project.
* Simplify Gomu's command registering
By leveraging Go's `init()` function, we can simplify registering
commands just a tad.
This change refactors the `gomu run` command to use Go Micro's internal
runtime package in order to run services. Not only does this clean up
duplicate functionality between Go Micro and Gomu, but also adds the
feature to Gomu to run remote projects. For example, the following
command pulls in a remote project and runs it locally.
```bash
gomu run github.com/auditemarlow/helloworld
```
The `gomu run` command remains backwards compatible. By invoking `gomu
run` in a Go Micro project directory, Gomu will simply run that project.
The helloworld examples found in the `google.golang.org/grpc/examples`
package were imported multiple times as different versions, resulting in
package conflicts. By running `go mod tidy`, these conflicts are
resolved and the gRPC client plugin can now be imported again.
* Update greeter references to helloworld
* Add new client command
With this change, Gomu users will be able to generate template projects
for clients to services. Additionally vendor support has been built in
so Gomu users can now generate projects using fully qualified package
names, for example:
```bash
gomu new service github.com/auditemarlow/helloworld
```
This will create a new service project `helloworld` with its module name
already set to `github.com/auditemarlow/helloworld`. Likewise, Gomu
users can then generate client projects in the same manner:
```bash
gomu new client github.com/auditemarlow/helloworld
```
This will create a `helloworld-client` project that uses the protobufs
found in the `github.com/auditemarlow/helloworld` service. This removes
at least some strain in configuring these module dependencies yourself;
you can just scaffold them outright from the start.
Although the default client project is highly opinionated, it works
straight out of the box and has Skaffold in mind. Gomu users should be
able to get going in a matter of seconds.
* Update README
* Fix Skaffold pipeline for generated client projects
* Update greeter references to helloworld
* Add new client command
With this change, Gomu users will be able to generate template projects
for clients to services. Additionally vendor support has been built in
so Gomu users can now generate projects using fully qualified package
names, for example:
```bash
gomu new service github.com/auditemarlow/helloworld
```
This will create a new service project `helloworld` with its module name
already set to `github.com/auditemarlow/helloworld`. Likewise, Gomu
users can then generate client projects in the same manner:
```bash
gomu new client github.com/auditemarlow/helloworld
```
This will create a `helloworld-client` project that uses the protobufs
found in the `github.com/auditemarlow/helloworld` service. This removes
at least some strain in configuring these module dependencies yourself;
you can just scaffold them outright from the start.
Although the default client project is highly opinionated, it works
straight out of the box and has Skaffold in mind. Gomu users should be
able to get going in a matter of seconds.
* Update README
* Refact new command implementation
Everytime I want to add or modify files in the new command, I will have
to do so in 2 places. This change will consolidate functionality so
there's only a single place to modify.
* Move Kubernetes resources to its own file
* Add Kubernetes resources
* plugin: update grpc server readme
* plugin: refactor gprc server test
This is a no-op change to enable test logic reuse for different
combinations.
* plugin: grpc server test Init after New
* plugin: allow grpc.Server to be injected
This change fixes grpc config example code which is currently broken.
Several pieces in the change:
- use yaml encoder to read config files
- rename *.yml to *.yaml to fix format (file suffix) for encoder lookup
- replace util/log package with logger as the former one is deprecated
github.com/asim/go-micro/plugins/registry/consul/v3@v3.0.0-20210716165540-546225f1d8db/watcher.go:5:2: imported and not used: "log"
github.com/asim/go-micro/plugins/registry/consul/v3@v3.0.0-20210716165540-546225f1d8db/watcher.go:5:2: imported and not used: "log"
* Update http.go
Exit before deregister is executed
* Create http.go
Exit before deregister is executed
* Solve the problem that the resources have not been fully released due to early exit
* Optimize some code
* Optimize some code
* Optimize some code
* fix service default logger
* Not Recommended Function Correction
* Update http.go
Exit before deregister is executed
* Create http.go
Exit before deregister is executed
* Solve the problem that the resources have not been fully released due to early exit
* Optimize some code
* Optimize some code
* Optimize some code
* fix service default logger
* Repair mq asynchronous send, mq write failure without error output
* Repair mq asynchronous send, mq write failure without error output
* fix logger v3
* Update http.go
Exit before deregister is executed
* Create http.go
Exit before deregister is executed
* Solve the problem that the resources have not been fully released due to early exit
* Optimize some code
* Optimize some code
* Optimize some code
* fix service default logger
* Repair mq asynchronous send, mq write failure without error output
* Repair mq asynchronous send, mq write failure without error output
Remove missing gRPC example from README.md (#2112)
Delete docker.yml
Delete Dockerfile
update plugins version & remove replace (#2118)
* update memory registry plugins version & remove replace
* update plugins version & remove replace
Co-authored-by: 申法宽 <shenfakuan@163.com>
update client/grpc plugins version & remove replace (#2119)
* update memory registry plugins version & remove replace
* update plugins version & remove replace
* update plugins/client/grpc/v3 version
Co-authored-by: 申法宽 <shenfakuan@163.com>
update etcd version (#2120)
update mod version
update
update pulgin registry mod version (#2121)
* update etcd version
* update mod version
* update
fix store delete
support for tls on http plugin (#2126)
improve code quality (#2128)
* Fix inefficient string comparison
* Fix unnecessary calls to Printf
* Canonicalize header key
* Replace `t.Sub(time.Now())` with `time.Until`
* Remove unnecessary blank (_) identifier
* Remove unnecessary use of slice
* Remove unnecessary comparison with bool
Update README.md
Update README.md
remove network package
update quic go mod
remove indirects
update etcd mod version
Update registry plugins mod version (#2130)
* update etcd version
* update mod version
* update
* update etcd mod version
Update README.md
Update README.md
Update README.md
fixing etcd stack in getToken (#2145)
when provide username and password, etcd will try to get auth token from server
if server is unavailble, etcd client will stack in
when dial timeout is set, it will return err instead of stack in
Update README.md
add http demo; http client can call http server; http client can call rpc server (#2149)
Add etcd to default registries when plugin is loaded (#2150)
Co-authored-by: Andrew Jones <andrew@gotoblink.com>
Update README.md
make rpcClient compatible with 32bit arm systems (#2156)
On ARM, 386, and 32-bit MIPS, it is the caller's responsibility to
arrange for 64-bit alignment of 64-bit words accessed
atomically. Only the first word in an allocated struct can
be relied upon to be 64-bit aligned.
optimize the process of switching grpc error to micro error (#2158)
Fix util/log/log.Infof format didn't work (#2160)
Co-authored-by: Cui Gang <cuigang@yunpbx.com>
fixing string field contains invalid UTF-8 issue (#2164)
fix k8s api memory leak (#2166)
fix http No release Broker (#2167)
* Update http.go
Exit before deregister is executed
* Create http.go
Exit before deregister is executed
fix: "Solve the problem that the resources have not been fully released due to early exit" (#2168)
* Update http.go
Exit before deregister is executed
* Create http.go
Exit before deregister is executed
* Solve the problem that the resources have not been fully released due to early exit
* Optimize some code
* Optimize some code
fix service default logger (#2171)
* Update http.go
Exit before deregister is executed
* Create http.go
Exit before deregister is executed
* Solve the problem that the resources have not been fully released due to early exit
* Optimize some code
* Optimize some code
* Optimize some code
* fix service default logger
Update README.md
get k8s pod (#2173)
Update README.md
fix:field (#2176)
* get k8s pod
* fix: filed
* field
Update README.md
add rmq message properties (#2177)
Co-authored-by: dtitov <dtitov@might24.ru>
Update README.md
grpc server add RegisterCheck (#2178)
fix 404 bug (#2179)
fix undefined: err (#2181)
Add registry and config/source plugins based on nacos/v2 (#2182)
* Add registry plugins implement by nacos/v2
* Add config/source plugins implement by nacos/v2
support hystrix fallback (#2183)
Windows event log plugin (#2180)
* add rmq message properties
* eventlog start
* start eventlog
* windows event logger
* readme
* readme
Co-authored-by: dtitov <dtitov@might24.ru>
support etcd auth with env args (#2184)
* support etcd auth with env args
set default registry address with env arg instead of 127.0.0.1
* fixing MICRO_REGISTRY_ADDRESS may empty issue
update mod version
* Update http.go
Exit before deregister is executed
* Create http.go
Exit before deregister is executed
* Solve the problem that the resources have not been fully released due to early exit
* Optimize some code
* Optimize some code
* Optimize some code
* fix service default logger
* Update http.go
Exit before deregister is executed
* Create http.go
Exit before deregister is executed
* Solve the problem that the resources have not been fully released due to early exit
* Optimize some code
* Optimize some code
On ARM, 386, and 32-bit MIPS, it is the caller's responsibility to
arrange for 64-bit alignment of 64-bit words accessed
atomically. Only the first word in an allocated struct can
be relied upon to be 64-bit aligned.
when provide username and password, etcd will try to get auth token from server
if server is unavailble, etcd client will stack in
when dial timeout is set, it will return err instead of stack in
* add dirty overrite test case
* need version to figure out if config need update or not
* using nanosecond as version for two goroutine can run in same second
* config should check snapshot version when update
* set checksum of ChangeSet
Co-authored-by: Asim Aslam <asim@aslam.me>
* Cleanup how status is updated for service. Ignore "no such process" error as it could be that the pid died
* add nice error log to record process error exit
* Add metadata to store record
* Add metadata to cockroach store
* add metadata to store service implementation
* fix breaking cache test
* Test/fix cockroach metadata usage
* fix store memory metadata bug
close#1560
This fixes one of the reported data races and also allows for
having a different name on the micro.Service and web.Service.
This makes it possible to discover the two service variants separately.
Co-authored-by: Vasiliy Tolstov <v.tolstov@unistack.org>
module github.com/mholt/certmagic has been renamed github.com/caddyserver/certmagic,
so upgrade on this module will fail.
fix: micro/micro#835caddyserver/certmagic@v0.10.6 is Maximum upgradeable version with go version 1.13
Higher version use *tls.ClientHelloInfo.SupportsCertificate which only supported in go 1.14
* api/router: avoid unneeded loops and fix path match
* if match found in google api path syntax, not try pcre loop
* if path is not ending via $ sign, append it to pcre to avoid matching other strings like
/api/account/register can be matched to /api/account
* api: add tests and validations
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
* copy qson from https://github.com/joncalhoun/qson
as author not want to maintain repo
* latest code contains our fix to proper decode strings
with escaped & symbol
* replace package in api/handler/rpc
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
* api/handler/rpc: unblock all http methods and set Host meta
* api/router/static: add debug log
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
* Rename Namespace to DB, Rename Prefix to table, Remove Suffix Option
* Rename options
* Rename options
* Add store_table option
* Table per service, not Database per service
* Service => Service Auth
* WithServicePrivileges => ServicePrivileges
* Fixes for CLI login
* ServicePrivileges => ServiceToken
* Fallback to service token
Co-authored-by: Ben Toogood <ben@micro.mu>
* api/handler/rpc: process all methods and merge url params to json body
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
* add merge json test
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
* Refactor auth/service into two protos
* Accounts Proto
* Store Prefixes
* Misc
* Tweak Protos
Co-authored-by: Ben Toogood <ben@micro.mu>
Co-authored-by: Asim Aslam <asim@aslam.me>
* Don't clear auth rules if request fails
* Add jitter to auth service loading rules
* Remove unused error from ContextWithToken result
Co-authored-by: Ben Toogood <ben@micro.mu>
* minimize external deps and binary size
* if user wants json-iterator codec it must be used in server and
client code. so best to use it via go-plugins
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
* WIP store rewrite
* Fix memory store tests
* Store hard expiry times rather than duration!
* Clarify memory test
* Add limit to store interface
* Implement suffix option
* Don't return nils from noop store
* Fix syncmap
* Start fixing store service
* wip service and cache
* Use _ for special characters in cockroachdb namespace
* Improve cockroach namespace comment
* Use service name as default store namespace
* Fixes
* Implement Store Scope
* Start fixing etcd
* implement read and write with expiry and prefix
* Fix etcd tests
* Fix cockroach store
* Fix cloudflare interface
* Fix certmagic / cloudflare store
* comment lint
* cache isn't implemented yet
* Only prepare DB staements once
Co-authored-by: Ben Toogood <ben@micro.mu>
Co-authored-by: ben-toogood <bentoogood@gmail.com>
allow easy testing of other services with memory broker
and also allows to more deeply simulate real brokers
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
* secure the grpc client
* make compile
* Add system cert pool
* Revert manually adding ca certs
* Tweak comment
Co-authored-by: ben-toogood <bentoogood@gmail.com>
* fixes for safe convertation
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
* fix client publish panic
If broker connect returns error we dont check it status and use
it later to publish message, mostly this is unexpected because
broker connection failed and we cant use it.
Also proposed solution have benefit - we flag connection status
only when we have succeseful broker connection
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
* api/handler/broker: fix possible broker publish panic
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
* provide broker disconnect messages in server
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
* broker/eats: another fix
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
* Auth Wrapper
* Tweak cmd flag
* auth_excludes => auth_exclude
* Make Auth.Excludes variadic
* Use metadata.Get (passes through http and http2 it will go through various case formats)
* fix auth wrapper auth.Auth interface initialisation
Co-authored-by: Asim Aslam <asim@aslam.me>
* pass micro errors from grpc server to grpc client
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
* wrap micro errors.Error to grpc status
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
Implement the Auth interface, with JWT and service implementations.
* Update Auth Interface
* Define Auth Service Implementation
* Support Service Auth
* Add Auth Service Proto
* Remove erronious files
* Implement Auth Service Package
* Update Auth Interface
* Update Auth Interface. Add Validate, remove Add/Remove roles
* Make Revoke interface more explicit
* Refactor serializing and deserializing service accounts
* Fix srv name & update interface to be more explicit
* Require jwt public key for auth
* Rename Variables (Resource.ID => Resource.Name & ServiceAccount => Account)
* Implement JWT Auth Package
* Remove parent, add ID
* Update auth imports to v2. Add String() to auth interface
router.Query() allows to query the routes with given router.Strategy.
It uses the same logic as was implemented in flushRoutes but the code
was never updated. This way we are consistent across both router and
network packages.
This commit adds a Sync message which is sent as a reply to Connect
message. This should in theory speed up convergence of a (re)connecting
node.
We respond to Sync message by sending a peer message back to the peer
origin of the Sync message. We consequently update our routing table and
peer graph with the data sent in via Sync message.
We now gossip advertse to up to 3 randomly selected peers instead of
sending a multicast message to the network.
Equally, Solicitation i.e. full table adverts are gossipped to a
randomly selected peer. If that fails we send a multicast message to the
network.
* Replace service prefix with FQDN style prefix
According to the k8s documentation, the label and annotation prefixes should be in the format of a FQDN, with dot separated labels of no more than 63 characters. The current label and annotation paramteres are rejected by the k8s api, most likely because they have two forward slashes in them.
* Use go.micro as service and annotation prefix
* Unlock RPC client while actually receiving a message
As receiving a message might block for a long time, unblocking the client allows to let it send messages in the meanwhile without using 'tricks'
* Unlock RPC server while actually receiving a message
As receiving a message might block for a long time, unblocking the client allows to let it send messages in the meanwhile without using 'tricks'
* Protect Close() against race conditions
* Concurrency and Sequence tests
* Update grpc_pool.go
* Update options.go
* Update grpc.go
* Update grpc_pool_test.go
* streams pool for grpc
* use busy list to speed up allocate while pool is very busy
* fix idle bug
About a month ago Slack introduced the updated structure of RTM messages which resulted in an inability to unmarshal received msg (original issue: https://github.com/nlopes/slack/issues/630). It's not an issue of micro itself, but of the github.com/nlopes/slack lib. The fix was already merged into master (https://github.com/nlopes/slack/pull/618), but the lib has not been released in any new version.
Thus so I propose to update directly to the commit:
go get github.com/nlopes/slack@d06c2a2b3249b44a9c5dee8485f5a87497beb9ea
The MicroBot does now work now with any Slack client newer than around a month old.
Log messages should not end with a new line, this should be entirely
handled by the underlying log library.
Signed-off-by: Thomas Boerger <thomas@webhippie.de>
* the mega cruft proxy PR
* Rename broker id
* add protocol=grpc
* fix compilation breaks
* Add the tunnel broker to the network
* fix broker id
* continue to be backwards compatible in the protocol
* Added service metadata
* Added metadata to runtime service
* Add Annotations metadata to service metadata
* Add micro/micro as default service owners
* Update runtime/kubernetes/client/kubernetes.go
Change comment
Co-Authored-By: Jake Sanders <i@am.so-aweso.me>
* Pass source of service to Deployment API; render templates properly
* Enable Go modules by default. Honor runtime.Service.Exec
* Make sure you remove go.mod and go.sum
* PoC: memory registry using maps instead of slice madness
* Updated proto and handlers. Fixed tests across codebase.
* Implemented ttl pruning for memory registry
* Added extensive memory registry tests
* Squased a bunch of bugs
* Proto indent; memory.Registry.String() returns "memory"
* Write a test to prove memory registry TTLs are busted
Signed-off-by: Erik Hollensbe <github@hollensbe.org>
* Additional memory testing and fixups:
* DefaultTTL removed
* When TTL == 0, it is automatically removed from expiry conditions
* Additional improvements to new tests
Signed-off-by: Erik Hollensbe <github@hollensbe.org>
* Add Get() and GetOptions.
* Removed watcher. Outline of client. YAML templates
* Added default service and deployment templates and types
* Added API tests and cleaned up errors.
* Small refactoring. Template package is no more.
* Ripped out existing code in preparation to small rework
* Reshuffled the source code to make it organized better
* Create service and deployment in kubernetes runtime
* Major cleanup and refactoring of Kubernetes runtime
* Service now handles low level K8s API calls across both K8s deployment
an service API objects
* Runtime has a task queue that serves for queueing runtime action
requests
* General refactoring
* No need for Lock in k8s service
* Added kubernetes runtime env var to default deployment
* Enable running different versions of the same service
* Can't delete services through labels
* Proto cruft. Added runtime.CreateOptions implementation in proto
* Removed proxy service from default env variables
* Make service name mandatory param to Get method
* Get Delete changes from https://github.com/micro/go-micro/pull/945
* Replaced template files with global variables
* Validate service names before sending K8s API request
* Refactored Kubernetes API client. Fixed typos.
* Added client.Resource to make API resources more explicit in code
* We now purge flapping routes before regular tick processes them
* Updated comments
* Record the timestamp as soon as you receive the event
* Set route Address to routing table test
* Fixed a bunch of deadlocks. Added basic Router tests.
Previously, when syncMap iterates a list of records which have the same
content in different order, a deadlock might happen. By enforcing a certain
order, the deadlock can be avoided.
* First commit: outline of K8s runtime package
* Added poller. Added auto-updater into default runtime
* Added build and updated Poller interface
* Added comments and NewRuntime that accepts Options
* DefaultPoller; Runtime options
* First commit to add Kubernetes cruft
* Add comments
* Add micro- prefix to K8s runtime service names
* Get rid of import cycles. Move K8s runtime into main runtime package
* Major refactoring: Poller replaced by Notifier
POller has been replaced by Notifier which returns a channel of events
that can be consumed and acted upon.
* Added runtime configuration options
* K8s runtime is now Kubernetes runtime in dedicated pkg. Naming kung-fu.
* Fix typo in command.
* Fixed typo
* Dont Delete service when runtime stops.
runtime.Stop stops services; no need to double-stop
* Track runtime services
* Parse Unix timestamps properly
* Added deployments into K8s client. Debug logging
Topology calls itsel recursively invoking RLock. This, according to go
documentation is wrong. This commit moves the body of Topology function
to a non-thread safe unexported function to keep locsk at check!
* Actually set the CA
* Fix the certmangic.storage interface to return the correct error type
* Write an e2e test for certmagic against the let's encrypt staging CA
Originally when Accept fails we log the error and let the program flow
continue. This can lead to us spawning handling connection go routines
on nil connections which in turn leads to Go panics.
Running go vet on tunnel package returns:
$ go vet ./...
./default.go:929:2: unreachable code
./link.go:104:2: unreachable code
./listener.go:184:2: unreachable code
./session.go:241:2: unreachable code
This commit introduces neighbourhood announcements which allows to
maintaing neighbour map if each next-hop node.
It also fixes a critical bug when accepting connections for a particular
tunnel channel.
fixing test failed issue
change back error type
change registry.ErrNotFound back to selector.ErrNotFound
change back error type
change registry.ErrNotFound back to selector.ErrNotFound
remove the single node tunnel test
Fix read yaml config from memory
package main
import (
"fmt"
"github.com/micro/go-micro/config"
"github.com/micro/go-micro/config/source/memory"
)
var configData = []byte(`
---
a: 1234
`)
func main() {
memorySource := memory.NewSource(
memory.WithYAML(configData),
)
// Create new config
conf := config.NewConfig()
// Load file source
conf.Load(memorySource)
fmt.Println(string(conf.Bytes()))
}
1. nats subscription draining is removed, since it is asynchronous,
and there is no reliable way to detect when it is finished.
Remove this option to avoid confusion.
2. nats connection draining is kept, and use 2 callbacks to detect
draining timeout (timeout is set via `nats.Options`) or finish.
3. Also honour options passed in `broker.Init()` (previously only
`broker.New()` is honoured).
This commit adds the following changes to router package:
* it refactors Advertise() function which now does only what
it claims to do: advertising
* various router packages functions/methods have been renamed to make
their functionality more obvious and more in line with what they actually do
* function documentation changes related to the above bullet points
Addressing the comments in #591, router.String() now returns "default"
Furthermore, a tonne of other renaming has been included in this commit
as a result of running go vet ./... inside the router package.
This commit adds the following changes:
* advert now stores a list of route events as opposed to just last one
* attempt to dedup route events before appending them to advert
* have max suppress threshold for long time suppressed adverts
* decaying events on every advert tick
Originally we werent decaying penalties on every advert tick.
That was incorrect behaviour. Furthermore some events would end up being
accumulated potentially causing memory leaks.
We were also overriding the last received router event which was causing
incorrect sequence of events to be applied when received by a receiver:
Create, Delete would be "squashed" into Delete only which would be
nonsensical since the Create event would never be delivered hence we
would be deleting nonexistent routes.
Not Decaying the events on every tick or not having the max suppression
threshold could lead to DoS by growing the router memory infinitely.
* fix race with rand.Intn for non default source
* increase random interval to avoid issues when many services
running on the host
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
mutex locking have errors, so when two service (one pub, other sub)
try to use this broker it waits for mutex release and nothing works
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
We now manage routing table actions using dedicated functions run on
either registry or services in the registry.
Routing table now uses Route.Hash() instead of maintaining its own hash
struct filed which previously performed these operations.
Various names of variables have been changed to make them more concise.
In order to differentiate between intialized and other states we
introduced a new state: Init. The router is in this state only when it's
created.
We have cleaned up router status management which is now handled by
manageStatus function only.
* Changed router interface to return Advertisement channel
* Added default gateway route to the routing table if supplied
* Watch table for updates and advertise to the network
* We hash the routes on 3-tuple (Destination, Gateway, Network)
gw has not been initialized; it was basically an empty string and only
got populated by Sprintf-ing the addr:port IF the port has been set.
This commit sets the gw to node.Address to it's never an empty string.
`config.NewConfig()` with consul source will both read from consul
and watch consul for changes. Hence, the `prefix` is used in these
2 cases:
- read case: it is used to strip path based on the `KVPair` returned
from consul `kv.List()` method
- watch case: it is used as the `key` of watch query (`keyprefix` type)
So for *watch case*, the `key` is leagal to be `/` for watching change
on root. While for *read case*, because `KVPair.Key` is always stripped
off the leading slash, so if user specified some `prefix` with leading
slash, we should strip it also.
An extream case would be: user want's to read & watch node in root dir.
One would specify `prefix` as `/`, and it should work then.
Check whetehr the 1st level encoded json is array or not, to
support 1st level array in consul config.
During debug, i suspected the incapability of arrray is caused by
json reader, so i added test for array. I think it makes no harm
to also check that in.
Debug logs that were helpful when squashing bugs have been removed.
advertiseToNetwork replaced the watchTable which originally watched the
routing table entries. We now take a different approach to propagating
the local registry services into the network registry.
Remove has been renamed to Delete to be more in line with the framework.
A bunch of comments have been added/updated for the future generations
We have increased the Network Registry TTL to 2 minutes.
Added ID function to router interface.
Network registry addresses are deregistered when the router is stopped.
Query has been updated to search for particular GW in lookups.
Router interface has been redefined which fits better with what we are
looking for.
Routing table now offers a comprehensive set of information about its
entries which will make up for rich queries in the future
Query interface has been defined to enable current basic and more
advanced queries in the future.
When `consul.StripPrefix(true)` is set, current impl. will pass the
specified prefix (or default prefix) when calling consul api.
However, `prefix` in consul api starts with no leading slash, so
the default prefix (`/micro/config`) doesn't actually work.
I avoid code changes (esp. the one in `util.go`) to eliminate
impact on users who already notice it.
The original code returns "result chan closed" errors.Error which does
not carry higher semantics signal to downstream despite go-micro having
a clearly defined Error for this behaviour. This commit fixes that and
lets the downstream i.e. consumer of this code to act based on different
errors.
The original signature accept a boolean, and it feel like a little
verbose, since when people pass in this option, he/she always want to
pass a `true`.
Now if input `wg` is nil, it has same effect as passing `true` in
original code. Furthermore, if user want's finer grained control during
shutdown, one can pass in a predefined `wg`, so that server will wait
against it during shutdown.
One disadvantage of using TTL based health check is the high network
traffic between Consul agent (either between servers, or between server
and client).
In order for the services considered alive by Consul, microservices must
send an update TTL to Consul every n seconds (currently 30 seconds).
Here is the explanation about TTL check from Consul documentation [1]
Time to Live (TTL) - These checks retain their last known state for a
given TTL. The state of the check must be updated periodically over
the HTTP interface. If an external system fails to update the status
within a given TTL, the check is set to the failed state. This
mechanism, conceptually similar to a dead man's switch, relies on the
application to directly report its health. For example, a healthy app
can periodically PUT a status update to the HTTP endpoint; if the app
fails, the TTL will expire and the health check enters a critical
state. The endpoints used to update health information for a given
check are the pass endpoint and the fail endpoint. TTL checks also
persist their last known status to disk. This allows the Consul agent
to restore the last known status of the check across restarts.
Persisted check status is valid through the end of the TTL from the
time of the last check.
Hint:
TTL checks also persist their last known status to disk. This allows
the Consul agent to restore the last known status of the check
across restarts.
When microservices update the TTL, Consul will write to disk. Writing to
disk means all other slaves need to replicate it, which means master need
to inform other standby Consul to pull the new catalog. Hence, the
increased traffic.
More information about this issue can be viewed at Consul mailing list [2].
[1] https://www.consul.io/docs/agent/checks.html
[2] https://groups.google.com/forum/#!topic/consul-tool/84h7qmCCpjg
When developing go-micro services, it is frequently possible to set invalid results in the response pointer. When this happens (as I and @trushton personally experienced), `sendResponse()` returns an error correctly explaining what happened (e.g. protobuf refused to encode a bad struct) but the `call()` function one above it in the stack ignores the returned error object.
Thus, invalid structs go un-encoded and the _client side times out_. @trushton and I first caught this in our CI builds when we left a protobuf.Empty field uninitialized (nil) instead of setting it to `&ptypes.Empty{}`. This resulted in an `proto: oneof field has nil value` error, but it was dropped and became a terribly confusing client timeout instead.
This patch is two independent changes:
* In rpc_codec, when a serialization failure occurs serialize an error message, which will correctly become a 500 for HTTP services, about the encoding failure. This means rpc_codec only returns an `error` when a socket failure occurs, which I believe is the behavior that rpc_service is expecting anyway.
* In rpc_service, log any errors returned by sendResponse instead of dropping the error object. This will make debugging client timeouts less of a hassle.
By making the error helper functions variadic functions, you can pass either a string (like the existing behaviour) or a format and verbs that will then be formatted for you.
This doesn’t break any existing API’s, but it prevents people using this package to have to call `fmt.Sprintf` whenever they would like to format the error detail.
Consul sees a healthcheck that is in the warning state as a "failed"
node. This means that when we ask Consul for services that are passing,
it would not return nodes that have warning healthchecks.
In the cache, we only check on critical to skip for nodes. This makes
the cache out of sync with the non-cache implementation.
This patch reworks the non-cache implementation to ask for all nodes
(even unhealthy ones) and does the same check as within the cache, skip
nodes that have critical healthchecks.
We've noticed this issue when we deployed custom healthchecks where the
cache was acting properly, but after 1 minute we saw "None Available"
errors. This is due to the TTL expiry on the cache, which is then
followed by doing a non cached request.
Before this patch, when an error occurs in trying to accept a connection
from the listener, the error would be returned. This also happened on
temporary issues like `too many open files`.
Temporary issues are "self-healing" and will resolve over time. This
means that we can put the requests in a queue to wait until the issue is
resolved and start processing the connections once it is resolved.
This patch implements such mechanism, as copied from the standard
library http package. It will retry temporary errors but will return
permanent errors (or errors that are not from the net.Error type).
By using a DefaultHealthChecker - as with a DefaultName, DefaultServer,
... - it is possible to overwrite the default implementation. This means
we can now do extra actions in our health check that is necessary for
the applications specific needs.
**Off-limits to the loop** (the architect proposes these as notes, never as queue
items the loop can auto-merge): brand/positioning copy, breaking public-API
changes, architectural rewrites. Those go to the human.
## Work queue (ranked)
### Capability — the headline (roadmap: Now / Next)
1.**A2A external-client conformance** ([#4815](https://github.com/micro/go-micro/issues/4815)) — make the gateway easier for non-go-micro agents to discover and stream from by serving the well-known agent card path and spec SSE events.
2.**AP2 mandate foundation for agent payments** ([#4841](https://github.com/micro/go-micro/issues/4841)) — add opt-in checkout/payment mandate signing and verification so A2A-carried payment authority can settle over x402 without changing defaults.
3.**Kubernetes CRD reconciler foundation** ([#4842](https://github.com/micro/go-micro/issues/4842)) — turn the shipped alpha `Agent`, `Service`, and `Flow` CRDs into a minimally runnable native deployment path with workload reconciliation and status conditions.
MCP result conformance, and the alpha Kubernetes CRD surface. Further churn in those
areas should be marked `needs-human` unless it unlocks a clear user-visible capability._
1.**Stabilize AtlasCloud guarded delegate conformance** ([#3917](https://github.com/micro/go-micro/issues/3917)) — #3948 strengthened AtlasCloud delegate prompting and tagged fallback coverage, but the issue remains open and this failure has recurred. Keep it first until master's live provider harness proves the guarded delegate reaches the approval-refusal path deterministically, then drop it immediately rather than re-queueing completed conformance work.
2.**Execute AtlasCloud plan-delegate task tool calls** ([#3935](https://github.com/micro/go-micro/issues/3935)) — #3942 appears to have moved the live plan-delegate path past the tagged task-call failure, and #3953 fixed the follow-on completion-state bug tracked by now-closed #3946. Keep this as the second Now-phase conformance item until maintainers confirm the task-call side is fixed by live harness evidence.
3.**CI-verify the first-agent on-ramp** ([#3955](https://github.com/micro/go-micro/issues/3955)) — the North Star, README, website, and roadmap now all make developer adoption the current goal: install → scaffold → run → chat → inspect must be a maintained contract. Add a no-secret, CI-verifiable first-agent harness that walks the documented examples and fails when docs drift from runnable commands, so the queue does not collapse entirely into provider hardening.
4.**Broaden provider streaming and keep chat/A2A streaming end to end** ([#3903](https://github.com/micro/go-micro/issues/3903)) — once the live Now-phase conformance gates are green, streaming is the highest developer-visible Next-phase seam. Real chat and long-running A2A tasks need token streaming to stay coherent from provider → `ai.Stream` → `micro chat` → A2A `message/stream`, with mock/default CI coverage plus key-gated live provider checks and safe fallback for non-streaming providers.
5.**Trace agent runs as OpenTelemetry spans** ([#3908](https://github.com/micro/go-micro/issues/3908)) — the blog/README/roadmap story promises an operable harness, and the developer on-ramp now includes chat, inspect, and run-history checkpoints. The next observability gap is production-grade trace correlation for `RunInfo`: steps, tool calls, delegation, status, durations, and failures should be visible as spans while defaulting to no-op when tracing is not configured.
_Seeded by Claude Code from the roadmap + open issues; thereafter maintained by the
@@ -7,14 +7,10 @@ Act as the architect — the founder lens — for go-micro, running continuously
(1) TRACK STATE — scan recently merged PRs and open `codex` PRs/issues to see what shipped and what is being built right now, so the queue reflects reality (drop done items, don't re-queue in-flight work).
(2) ASSESS against the North Star in `.github/loop/NORTH_STAR.md` — lead with its Mission (*make building an agent as easy as building a service, on one runtime*) and re-derive alignment from the CANON: the blog under `internal/website/blog`, the `README`, and the website (read these, don't rely on the North Star alone), then `ROADMAP.md` (Now → Next → Later). Judge every priority against the mission: does it make the services → agents → workflows lifecycle simpler, more cohesive, and more operable? Weight real user-facing capability and the developer on-ramp; do not let the queue fill with internal depth work. Look at coherence and seams across the core packages (agent, ai, flow, gateway/mcp, gateway/a2a, model, server, store, registry) and the dev inner loop (scaffold → run → chat → inspect → deploy).
(2) ASSESS against the North Star in `.github/loop/NORTH_STAR.md` — lead with its Mission (*make building an agent as easy as building a service, on one runtime*) and re-derive alignment from the CANON: the blog under `internal/website/blog`, the `README`, and the website (read these, don't rely on the North Star alone), then `ROADMAP.md` (Now → Next → Later). Judge every priority against the mission: does it make the services → agents → workflows lifecycle simpler, more cohesive, and more operable? CURRENT GOAL — developer adoption: weight the on-ramp (walkable first-agent tutorial, discoverable examples, docs wayfinding, install friction, debugging, 0→1 and 0→hero) at least as highly as internal hardening; do not let the queue fill entirely with internal depth work. Look at coherence and seams across the core packages (agent, ai, flow, gateway/mcp, gateway/a2a, model, server, store, registry) and the dev inner loop (scaffold → run → chat → inspect → deploy). Flag drift in either direction: work drifting from the mission, or the North Star/website drifting from the lived story in the blog.
AVOID DIMINISHING-RETURNS CHURN — this is the most important judgment you make. Before ranking anything, ask: *would a real user notice this, or is it the loop grooming itself?* Do NOT queue: another regression-guard/breadcrumb/"verify the docs stay linked" test around docs the loop already wrote; the Nth robustness workaround for a weak provider's malformed output (e.g. AtlasCloud text-tool-call repair) once the agent already tolerates that class; another variation of a subsystem that has been hardened several times recently (e.g. plan/delegate notify/side-effect edge cases). If an area has had several increments with no user-visible gain, it is DONE for now — mark further work there `needs-human` and rank something with real headroom instead (new capability in gateway/flow/model/store, interop depth, observability). A full queue is not the goal; a queue of things that matter is.
(3) MAINTAIN THE QUEUE in `.github/loop/PRIORITIES.md` — a SINGLE ordered list, highest-value first, each item linking a scoped, CI-verifiable issue (#N); roadmap phase is the primary ordering, internal findings (cohesion gaps, DX friction, missing pieces) interleaved by value. For any prioritized gap with no issue, file one: `gh issue create --label codex --label enhancement --title "<scoped task>" --body "<goal, scope, acceptance criteria>"`.
(3) MAINTAIN THE QUEUE in `.github/loop/PRIORITIES.md` — a SINGLE ordered list, highest-value first, each item linking a scoped, CI-verifiable issue (#N). For any prioritized gap with no issue, file one:`gh issue create --label codex --label enhancement --title "<scoped task>" --body "<goal, scope, acceptance criteria>"`.
OUTPUT: post a concise assessment as a comment on this issue (#__ISSUE__) — what shipped, what's in flight, the top risks/gaps, and the reasoning behind the ranking. If the ranking actually changed, open ONE PR for `.github/loop/PRIORITIES.md`: `git switch -c codex/planner-__ISSUE__`, `git push -u origin codex/planner-__ISSUE__`,`gh pr create --base master --label codex --title "<title>" --body "<summary, Closes #__ISSUE__>"`, then `gh pr merge --squash --auto --delete-branch`. If the queue is already accurate, just close this issue (`gh issue close __ISSUE__`).
OUTPUT — default to NOT committing. Post a concise assessment as a comment on this issue (#__ISSUE__): what shipped, what's in flight, the top real gaps, and — honestly — whether the recent increments have been high-value or busy-work. Then, in almost all cases, just close this issue (`gh issue close __ISSUE__`) with NO PR.
Open a PR for `.github/loop/PRIORITIES.md` ONLY when the change is MATERIAL — meaning it changes what the builder builds next: (a) the top open item changes, (b) an item is added or removed, or (c) a top item's issue closed and must be dropped. Do NOT open a PR to reorder items below the top, reword descriptions, refresh notes, or "keep it current" — a re-rank that doesn't change the next build is not worth a commit, and this churn is the loop's single biggest waste. When a PR IS warranted: `git switch -c codex/planner-__ISSUE__`, `git push -u origin codex/planner-__ISSUE__`, `gh pr create --base master --label codex --title "<title>" --body "<summary, Closes #__ISSUE__>"`, then `gh pr merge --squash --auto --delete-branch`.
Do NOT make breaking public-API or architectural changes yourself — surface those in the assessment as notes for the human. Open the PR yourself from the shell with `gh`; do not use the make_pr tool (it is a no-op stub).
Do NOT make breaking public-API or architectural changes yourself — surface those in the assessment as notes for the human, never as auto-merged changes. Open the PR yourself from the shell with `gh`; do not use the make_pr tool (it is a no-op stub).
@@ -3,17 +3,12 @@ The TRIAGE prompt — go-micro's CI-failure feedback path. Editable policy; the
workflow prepends the agent @mention and substitutes __ISSUE__ (this tracking
issue) and __RUNURL__ (the failed run) before posting. Keep both literal.
-->
Triage the failed CI run at __RUNURL__. It may be the linter (Lint), the unit/integration tests (Run Tests), the vulnerability gate (govulncheck), or the provider-conformance harness (Harness (E2E)).
Triage the failed CI run at __RUNURL__. It may be the linter (Lint), the unit/integration tests (Run Tests), or the provider-conformance harness (Harness (E2E)).
Read the logs and root-cause each distinct failure. DEDUPE hard against open AND recently-closed issues — if a failure matches an existing or recurring one, comment "recurred" on that issue rather than filing a new one.
Read the logs and root-cause each distinct failure. DEDUPE against open issues — if a failure matches an existing issue, comment "recurred" there instead of filing a duplicate.
WHAT TO FILE:
- **Lint, Run Tests, or govulncheck failing on master** — a real regression. File a scoped issue (`gh issue create --label codex --label enhancement --title "<scoped fix>" --body "<root cause, where, acceptance>"`) so it is fixed promptly.
- **A genuinely NEW, distinct provider-conformance defect** — file it.
For each genuine, self-contained defect, file a scoped issue (`gh issue create --label codex --label enhancement --title "<scoped fix>" --body "<root cause, where, acceptance criteria>"`) so the increment loop builds it and the next CI/harness run verifies it. A lint or test failure on master is a real regression — file it so it is fixed promptly; do NOT ignore it.
WHAT NOT TO FILE (this cap matters):
- **Another instance of a class the agent already tolerates** — a weak provider (e.g. AtlasCloud) emitting malformed / text-rendered / partial tool calls, or another plan/delegate notify/side-effect edge case. These have been hardened repeatedly with diminishing returns. Do NOT auto-file yet another routine robustness patch. Comment "recurred — repeated class, capped" on the nearest existing issue and, if it seems genuinely worth more investment, label it `needs-human` for a human to decide. The loop should not keep chasing one weak provider's output shape.
- **Transient flakes** — live-model latency, provider outages, rate limits, network timeouts with no code cause. Ignore.
- **Anything needing a breaking or architectural change** — label `needs-human` and describe it.
IGNORE only genuine transient flakes — live-model latency, provider outages, rate limits, network timeouts with no code cause (mostly relevant to the harness). Anything needing a breaking or architectural change: file it as `needs-human` and describe it, rather than auto-queuing it as a routine fix.
Close this issue (`gh issue close __ISSUE__`) when triage is done. Open any PR yourself from the shell with `gh`; do not use the make_pr tool.
Releases are cut automatically as the loop merges improvements — a **minor**
bump when new features land (`### Added`/`### Changed`), a **patch** when it's
fixes/docs only; major bumps stay a human decision. The `[Unreleased]` section
below is kept current between tags and rolled into the next version when it ships.
Patch releases are cut automatically as the loop merges improvements; the
`[Unreleased]` section below is kept current between tags and rolled into the
next version when it ships.
> Earlier `2026.0x` headings are historical calendar-style markers from before
> v6 tagging; they are kept for continuity and not reused.
@@ -17,233 +16,6 @@ below is kept current between tags and rolled into the next version when it ship
## [Unreleased]
### Added
- **Gemini streaming support** — the Gemini provider now supports streaming model responses. (`ai/gemini/`)
- **Model retry jitter controls** — model retry behavior can now use jitter controls to reduce synchronized retry bursts. (`ai/`, `agent/`)
- **Compacted memory summaries** — agent memory now exposes compacted run summaries for easier inspection and recovery. (`agent/`)
- **CLI input resume for agent runs** — the CLI can resume agent runs that require additional user input. (`cmd/micro/`, `agent/`)
### Changed
- **Remote agent chat streaming** — `micro chat` now streams replies from remote agents instead of waiting for the full response. (`cmd/micro/`, `agent/`)
- **A2A external-client conformance** — the A2A gateway now serves the Agent Card at the spec 0.3.0 `/.well-known/agent-card.json` (keeping `/.well-known/agent.json` as a legacy alias), and `message/stream` emits spec-shaped `status-update`/`artifact-update` events ending in a `final:true` status-update instead of repeated full `Task` snapshots — and never sends `result` and `error` together. Standard A2A clients (ADK, LangGraph, a2a-SDK) can now discover and stream from go-micro agents. (`gateway/a2a/`)
### Fixed
- **Provider failure inspection metadata** — provider failures recorded during agent runs now retain classification metadata for inspection. (`agent/`, `ai/`)
### Security
- **x402 spend-cap hardening** — the paying `Client` now refuses a 402 whose `maxAmountRequired` is not a positive integer (a swallowed parse error or negative amount previously bypassed the budget cap), and a new `Config.RequireSettlement` fails closed when a paid request is served by a verify-only facilitator that never captures funds. (`wrapper/x402/`)
---
## [6.7.0] - July 2026
### Added
- **A2A streaming conformance harness** — A2A streaming behavior is now covered by focused conformance checks. (`gateway/a2a/`, `internal/harness/`)
- **Agent x402 spend budget guardrail** — agents now have spend budget guardrails for x402-paid tool calls. (`agent/`, `gateway/`)
- **First-agent chat/inspect fixture** — the maintained first-agent CLI fixture now covers chat and inspect boundaries together. (`internal/harness/`, `cmd/micro/`)
- **Zero-to-hero inspect transcript check** — the 0→hero harness now verifies the inspect transcript path stays visible in the lifecycle walkthrough. (`internal/harness/zero-to-hero-ci/`, `internal/website/docs/`)
### Changed
- **Agent stream run context propagation** — agent streams now preserve run context through streaming paths for more complete tracing and inspection. (`agent/`)
- **Postgres store pgx v5 migration** — the Postgres store now uses pgx v5. (`store/postgres/`, `go.mod`)
- **Plan-delegate plan persistence** — plan/delegate runs now persist plan state more defensively across harness scenarios. (`agent/`, `internal/harness/`)
- **Retry cancellation during backoff** — retry backoff now respects cancellation more reliably. (`agent/`, `ai/`)
- **Plan-delegate mock recovery regression gate** — the harness now catches plan/delegate mock recovery regressions before they ship. (`internal/harness/`, `agent/`)
- **First-agent fixture registration wait** — first-agent fixture registration is less race-prone during harness runs. (`internal/harness/`)
- **Memory stream Nack ordering** — memory stream Nack handling now preserves ordering more reliably. (`broker/memory/`)
- **Zero-to-hero fixture output race** — 0→hero fixture output is less race-prone during harness runs. (`internal/harness/zero-to-hero-ci/`)
### Documentation
- **First-agent quickcheck wayfinding** — public docs now keep the quickcheck path discoverable from the first-agent route. (`README.md`, `internal/website/docs/`)
- **Ordered 0→hero transcript** — docs and harness checks now keep the 0→hero transcript order explicit. (`internal/website/docs/`, `internal/harness/`)
- **First-agent debug breadcrumbs** — docs now surface the first-agent debug smoke path more clearly. (`internal/website/docs/`)
- **README badge cleanup** — the README no longer shows the Go Report Card badge. (`README.md`)
---
## [6.6.0] - July 2026
### Added
- **First-agent guide chain contract** — the harness now verifies the install → demo → examples → 0→hero guide chain stays connected for new agent builders. (`internal/harness/`, `internal/website/docs/`)
- **First-agent docs wayfinding guard** — the local harness now includes a focused no-network check for first-agent and 0→hero docs links. (`Makefile`, `internal/harness/`)
- **First-agent quickcheck breadcrumbs** — first-agent docs now surface quickcheck wayfinding for install, scaffold, chat, inspect, and recovery paths. (`internal/website/docs/`, `README.md`)
- **First-agent chat wayfinding verification** — the harness now verifies first-agent chat wayfinding remains discoverable from the public docs route. (`internal/harness/`, `internal/website/docs/`)
### Changed
- **Universe A2A reachability probe** — the universe harness now exercises A2A reachability more defensively. (`internal/harness/`)
- **AtlasCloud workspace repair fallback** — AtlasCloud fallback handling now recovers workspace-repair tool calls more reliably. (`ai/atlascloud/`, `agent/`)
- **AtlasCloud empty-argument tool repair** — AtlasCloud text tool-call repair now handles empty-argument calls more consistently. (`ai/atlascloud/`, `agent/`)
### Removed
- **`go-micro.dev/v6/ai/flow`** — the alias-only backward-compatibility shim is removed; import the canonical [`go-micro.dev/v6/flow`](flow) instead (same types and functions). It had no internal callers. (`ai/flow/`)
### Fixed
- **A2A fallback artifact text** — A2A fallback responses now avoid leaking provider artifact text into agent-visible output. (`gateway/a2a/`, `agent/`)
- **Launch readiness notification replays** — launch-readiness notification replay paths now deduplicate repeated side effects. (`agent/`, `internal/harness/`)
- **Plan-delegate harness cleanup** — plan/delegate harness cleanup is more reliable after conformance runs. (`internal/harness/`)
- **AtlasCloud spoken notify replays** — AtlasCloud fallback handling now collapses spoken notification replays more consistently. (`ai/atlascloud/`, `agent/`)
- **Agent-flow onboarding side effects** — onboarding side-effect checks are more stable across the agent-flow harness. (`agent/`, `internal/harness/`)
- **Plan-delegate plan-only side effects** — plan/delegate recovery now preserves plan-only side effects more reliably. (`agent/`, `internal/harness/`)
- **Checkpointed tool result recording** — checkpoint resume paths now guard tool-result recording against duplicate or stale writes. (`agent/`)
- **Agent timeout notification completion** — universe runs now finalize observed notifications more reliably after agent timeouts. (`agent/`, `internal/harness/`)
- **Completed plan-delegate side effects** — completed plan/delegate side effects are accepted more consistently in recovery paths. (`agent/`, `internal/harness/`)
- **Agent-flow onboarding notifications** — agent-flow onboarding notification recovery is more reliable across replay scenarios. (`agent/`, `internal/harness/`)
### Documentation
- **Agent-agnostic mention model** — loop docs now describe the mention-driven agent model without binding it to one coding agent. (`internal/docs/`, `.github/loop/`)
- **First-agent quickcheck docs** — public docs now surface the first-agent quickcheck path for faster troubleshooting. (`internal/website/docs/`)
- **Agent resume breadcrumbs** — docs now add clearer resume breadcrumbs for checkpointed agent runs. (`internal/website/docs/`)
### Security
- **Govulncheck vulnerability gate** — CI now includes a govulncheck gate and wires vulnerability failures into loop triage. (`.github/workflows/`, `cmd/micro/loop/`)
- **Dependency vulnerability patches** — toolchain and dependency updates patch reachable CVEs across the project. (`go.mod`, `go.sum`)
---
## [6.5.0] - July 2026
### Added
- **Agent stream provider conformance** — provider conformance now covers agent streaming behavior so streaming-capable providers stay aligned with the harness contract. (`agent/`, `internal/harness/`)
- **First-agent docs CLI parity check** — the harness now verifies first-agent docs commands match the CLI wayfinding surface. (`internal/harness/`, `internal/website/docs/`)
- **Focused CLI inner-loop contract** — the local harness now covers scaffold, run/chat/inspect, and deploy dry-run boundaries in one first-run contract. (`internal/harness/`)
- **First-agent wayfinding breadcrumbs** — first-agent docs and examples now have locked breadcrumb coverage from the README through the runnable examples. (`README.md`, `internal/website/docs/`, `examples/`)
- **Offline `micro new` contract** — project scaffolding now has an offline contract so the first service path stays runnable without network access. (`cmd/micro/`, `internal/harness/`)
### Changed
- **Provider model call timeouts** — model call timeout enforcement now wraps provider calls more defensively, reducing hangs in agent and harness paths. (`agent/`, `ai/`)
- **First-agent harness diagnostics** — getting-started harness logs now make first-run and 0→hero failures easier to locate. (`internal/harness/`)
- **AtlasCloud streaming tool capability** — AtlasCloud tool-streaming capability detection is now aligned with provider fallback behavior. (`ai/atlascloud/`, `agent/`)
### Fixed
- **Partial text tool calls** — text tool-call recovery now repairs partial function-style calls more reliably before fallback parsing continues. (`agent/`)
- **Retry timeout test stability** — retry timeout coverage is less race-prone. (`agent/`)
- **Checkpointed tool-call resume** — resumed agent runs now preserve checkpointed tool calls across startup resume paths. (`agent/`)
- **Model retry backoff contracts** — retry backoff behavior now has focused contract coverage for model-call failures. (`agent/`, `ai/`)
- **AtlasCloud conformance markers** — AtlasCloud fallback paths now preserve conformance markers through tool-call recovery. (`ai/atlascloud/`, `agent/`)
- **AtlasCloud delegate text fallback** — delegate text fallback recovery is more reliable for AtlasCloud responses. (`ai/atlascloud/`, `agent/`)
- **AtlasCloud incomplete plan repairs** — incomplete plan repair paths now recover more consistently in AtlasCloud fallback handling. (`ai/atlascloud/`, `agent/`)
- **AtlasCloud partial text tool calls** — AtlasCloud fallback handling now repairs partial text-rendered tool calls more reliably. (`ai/atlascloud/`, `agent/`)
### Documentation
- **Roadmap agent status** — public roadmap docs now reflect the current agent lifecycle status more consistently. (`internal/website/docs/`)
- **Agent resume limits** — docs now describe checkpoint resume boundaries for agent runs. (`internal/website/docs/`)
- **Zero-to-hero harness boundaries** — docs now clarify which 0→hero lifecycle checks are maintained by the local harness. (`internal/website/docs/`, `internal/harness/`)
- **First-agent wayfinding guard** — first-agent docs wayfinding now has tighter guard coverage around the README, docs, and examples chain. (`README.md`, `internal/website/docs/`)
---
## [6.4.0] - July 2026
### Added
- **Provider HTTP retry signals** — provider failures now preserve HTTP status and `Retry-After` details so retry classification and backoff can respond to rate limits and unavailable providers. (`ai/`)
- **Zero-to-hero deploy dry-run verification** — the maintained 0→hero harness now covers deploy dry-run boundaries for the services → agents → workflows lifecycle. (`internal/harness/`)
- **First-agent CLI wayfinding verification** — the harness now checks that first-agent CLI wayfinding stays discoverable. (`internal/harness/`)
- **Agent startup resume verification** — agent startup resume now has focused checkpoint coverage. (`agent/`, `internal/harness/`)
- **Direct first-agent chat prompts** — first-agent flows can accept direct chat prompts, reducing friction in the first useful conversation. (`cmd/micro/`, `agent/`)
- **Workflow run info on tool spans** — agent tool spans now include workflow run details for easier trace correlation. (`agent/`, `flow/`)
### Fixed
- **Stream fallback memory** — unsupported streaming attempts no longer leave stale duplicate user turns before fallback paths continue with non-streaming agent calls. (`agent/`)
- **Function-style text tool calls** — agent fallback parsing now recognizes provider replies that render tools as function-style calls, including nested JSON arguments. (`agent/`)
- **Plan/delegate notify recovery** — plan-delegate recovery now waits for recovered notify side effects and routes retries through the communications agent that owns the notification. (`internal/harness/`)
- **Onboarding side-effect enforcement** — the agent-flow harness now fails when required onboarding side effects are missing, making lifecycle regressions visible. (`internal/harness/`)
- **Plan/delegate notify stability** — notify recovery is more deterministic across retry and replay paths. (`agent/`, `internal/harness/`)
- **AtlasCloud MiniMax tool fallback** — AtlasCloud MiniMax service-tool fallback now handles 400 responses and follow-up retries more reliably. (`ai/atlascloud/`, `agent/`)
### Documentation
- **First-agent docs wayfinding guard** — the local harness now includes a focused no-network check for first-agent and 0→hero docs links. (`Makefile`, `internal/harness/`)
---
## [6.3.18] - July 2026
### Added
- **StreamAsk close cancellation** — agent streaming calls now cancel promptly when their runner closes, avoiding orphaned stream work. (`agent/`)
- **Agent resume pending helper** — agent durability now has a focused helper for resuming pending checkpointed runs. (`agent/`)
- **Agent tool retry tracing** — agent traces now include tool retry attempts for easier debugging of retry/fallback behavior. (`agent/`)
- **Shared-broker universe harness** — the universe harness now runs against the shared broker path, improving coverage of the same runtime wiring used by services, agents, and workflows. (`internal/harness/`)
### Fixed
- **Plan/delegate retry idempotency** — agent retries now preserve side-effect and notification dedupe across conformance retry paths, including completion and owner-notification edge cases. (`agent/`, `internal/harness/`)
- **AtlasCloud text tool calls** — AtlasCloud fallback handling now recovers more text-rendered tool calls from OpenAI-compatible responses. (`ai/atlascloud/`, `agent/`)
- **OpenAI-compatible text tool calls** — OpenAI-compatible providers now recover text-rendered tool calls more reliably. (`agent/`)
- **AtlasCloud multi-step follow-ups** — AtlasCloud tool fallback handling now continues multi-step tool follow-up paths more reliably. (`ai/atlascloud/`, `agent/`)
### Documentation
- **Agent debugging quickcheck** — docs now include a focused quickcheck path for first-agent debugging. (`internal/website/docs/`)
- **Website first-agent examples map** — website docs now link the maintained examples wayfinding map for the first-agent route. (`internal/website/docs/`)
- **Examples wayfinding index** — examples docs now provide a central map for first-agent, support, and interop examples. (`examples/`, `internal/website/docs/`)
---
## [6.3.17] - July 2026
### Added
- **First-agent examples CLI wayfinding** — `micro examples` now prints the maintained provider-free first-agent examples in copy/paste order. (`cmd/micro/`)
- **0→hero CLI entrypoint** — `micro zero-to-hero` now points developers at the maintained no-secret services → agents → workflows harness and runnable examples. (`cmd/micro/`)
- **First-agent tutorial smoke harness** — the first-agent tutorial path now has smoke coverage to keep the no-secret on-ramp runnable. (`internal/harness/`)
- **No-secret agent debugging smoke** — the no-secret agent debugging path now has smoke coverage for the first-agent troubleshooting flow. (`internal/harness/`)
- **Durable checkpoint resume smoke coverage** — durable agent resume after checkpointing now has focused smoke coverage. (`agent/`, `internal/harness/`)
### Fixed
- **Plan/delegate notify replays** — duplicate and replayed plan-delegate notifications are now idempotent, so resumed runs do not duplicate completed notifications. (`agent/`, `internal/harness/`)
- **Provider conformance scheduling** — provider conformance workflow dispatches now guard their scheduling path more reliably. (`.github/workflows/`)
- **Plan/delegate notification completion** — delegated notifications now preserve plan completion state more reliably, including duplicate, paraphrased, and delegated-owner notification paths. (`agent/`, `internal/harness/`)
- **AtlasCloud tool fallback** — AtlasCloud built-in tool schemas and follow-up tool fallback handling now recover conformance delegate retries more reliably. (`ai/atlascloud/`, `agent/`)
- **Agent conformance retry completion** — conformance retry prompts and completion handling are more deterministic for delegated agent runs. (`agent/`, `internal/harness/`)
### Documentation
- **First-agent quickstart numbering** — the first-agent on-ramp numbering is consistent across the README and website docs. (`README.md`, `internal/website/docs/`)
- **First-agent inspect command** — docs now use the maintained `micro inspect agent <name>` form. (`README.md`, `internal/website/docs/`)
- **`micro loop` quickstart wayfinding** — docs now surface the loop quickstart from the public docs index and README wayfinding. (`README.md`, `internal/website/docs/`)
---
## [6.3.16] - July 2026
### Added
- **No-secret agent demo CLI** — the CLI now surfaces `micro agent demo`, making the provider-free first-agent path discoverable from the installed binary. (`cmd/micro/`)
- **First-agent recovery doctor** — first-agent recovery checks now help diagnose install, scaffold, and provider setup issues before the live agent run. (`cmd/micro/`, `internal/website/docs/guides/`)
### Changed
- **Architecture lifecycle docs** — the architecture guide now leads with the services → agents → workflows lifecycle and the first-agent on-ramp. (`internal/website/docs/architecture.md`)
- **First-agent on-ramp** — README and website docs now lead new users through install troubleshooting, no-secret demos, the smallest first-agent example, debugging, and the 0→hero reference path in the same order. (`README.md`, `internal/website/docs/`)
### Fixed
- **Config close idempotency** — config close paths now tolerate repeated closes safely. (`config/`)
- **OpenTelemetry child span events** — agent traces now preserve child span events more reliably. (`agent/`)
### Documentation
- **Security reporting** — security docs now route vulnerability reports through GitHub Security Advisories. (`SECURITY.md`, `internal/website/docs/`)
- **Install troubleshooting** — the first-agent on-ramp now includes clearer install and PATH recovery guidance. (`internal/website/docs/guides/install-troubleshooting.md`)
---
## [6.3.15] - July 2026
### Added
- **Anthropic streaming** — the Anthropic provider now supports Messages SSE streaming and is registered as a streaming-capable provider, with capability docs and parser coverage. (`ai/anthropic/`, `internal/website/docs/guides/`)
- **AP2 mandate foundation for A2A** — the A2A gateway now has the shared payment-mandate foundation needed for AP2-style agent payment flows. (`gateway/a2a/`)
- **Smallest first-agent example** — a no-secret, mock-model first-agent example gives the on-ramp a minimal runnable starting point. (`examples/first-agent/`)
### Changed
- **First-agent CLI next steps** — CLI output now points new users toward the maintained first-agent path after scaffold/run milestones. (`cmd/micro/`)
### Fixed
- **Plan/delegate completion** — plan-delegate runs now preserve completed steps, guard ordering, require notify-before-completion, and stabilize checkpoint continuation paths. (`agent/`, `internal/harness/`)
- **Provider text tool calls** — AtlasCloud and weaker-model fallback paths now recover tagged, `Create`-suffixed, mixed text/tool-call, and follow-up tool calls more reliably. (`agent/`, `ai/atlascloud/`)
- **First-agent broker isolation** — the first-agent harness now isolates broker state more reliably across runs. (`internal/harness/`)
### Documentation
- **First-agent example path** — docs and website wayfinding now surface the smallest example, no-secret transcript, and 0→hero path together. (`README.md`, `internal/website/docs/`)
- **Agent operations guidance** — agent debugging docs now include operational failure guidance, inspect hints, and durable resume pointers. (`internal/website/docs/guides/`)
# deploy dry-run. This is the focused CI contract for the full lifecycle path.
zero-to-hero-transcript:
./internal/harness/zero-to-hero-ci/run.sh
# Focused provider-free CLI inner-loop contract: scaffold a service, keep the
# run/chat/inspect commands discoverable, and prove deploy dry-run reaches the
# documented boundary without remote side effects. Use this when README/docs/CLI
# drift is the concern and the full runtime harness is more than you need.
inner-loop:
go test ./cmd/micro/cli/new -run TestZeroToOne -count=1
go test ./cmd/micro -run 'TestFirstAgentWalkthroughCLIBoundaries|TestZeroToHeroCLIBoundaries|TestZeroToHeroCommandPrintsMaintainedNoSecretPath' -count=1
go test ./cmd/micro/cli/deploy -run TestDeployDryRun -count=1
go test ./internal/harness/zero-to-hero-ci -run 'TestZeroToHeroDeployDryRunCommandSmoke|TestNoSecretFirstAgentDebuggingSmoke|TestYourFirstAgentTutorialSmoke' -count=1
# Verify the installed CLI keeps the first-agent on-ramp commands discoverable.
# This guards the no-secret commands README/docs recommend (`micro agent demo`,
# `micro examples`, and `micro zero-to-hero`) as a CI contract.
cli-wayfinding:
go test ./cmd/micro -run 'TestFirstAgentWalkthroughCLIBoundaries|TestExamplesWayfindingIndexStaysLinked|TestExamplesCommandPointsAtWayfindingIndex|TestZeroToHeroCommandPrintsMaintainedNoSecretPath' -count=1
$(MAKE) docs-wayfinding
$(MAKE) install-smoke
# Verify the README and website first-agent/0→hero wayfinding links resolve to
# maintained local docs and examples. This is a focused no-network guard for the
# developer-adoption on-ramp.
docs-wayfinding:
go test ./internal/harness/zero-to-hero-ci -run 'TestFirstAgentWayfinding' -count=1
go test ./cmd/micro -run 'TestFirstAgentDocsMatchCLIOutput|TestFirstAgentWalkthroughCLIBoundaries' -count=1
# Verify the documented install script and first-run CLI command boundaries without
# Go Micro [](https://pkg.go.dev/go-micro.dev/v6?tab=doc) [](https://discord.gg/G8Gk5j3uXr)
Go Micro is an **agent harness** and service framework for Go.
**Community:** questions, ideas, or just want to build alongside us? [Join the Discord](https://discord.gg/G8Gk5j3uXr).
A harness is the runtime around an agent: the tools it can call, the memory it keeps, the guardrails that bound it, the workflows that trigger it, the services it depends on, and the protocols other agents use to reach it.
Go Micro gives you the harness as Go code. Build an agent and it gets a model, memory, tools, planning, delegation, guardrails, and service discovery; it is reachable over [MCP](https://modelcontextprotocol.io/) and [A2A](https://a2a-protocol.org). Write services and every endpoint becomes an AI-callable tool. Orchestrate the deterministic parts with durable flows. Agents, services, and flows share one runtime because an agent is a distributed system, and building one is building a service.
**Want to support Go Micro and see your logo here?** [Become a sponsor](https://discord.gg/G8Gk5j3uXr) — reach out on Discord.
## Commercial Support
Running Go Micro in production, or building on it and want help? Paid **support, consulting, training, and retainers** are available directly from the maintainer — and they're what keep the project maintained. See [**Support**](SUPPORT.md) for the tiers, or [open a request](https://github.com/micro/go-micro/issues/new?template=commercial_support.md).
If install or `PATH` checks fail, use the [install troubleshooting guide](internal/website/docs/guides/install-troubleshooting.md) before scaffolding your first service.
### Fastest start — no API key
Scaffold a service, run it, call it:
```bash
micro new helloworld
cd helloworld
micro run
```
Then in another terminal:
```bash
curl -X POST http://localhost:8080/api/helloworld/Helloworld.Call \
This install → scaffold → run → call path is covered by no-secret CI harnesses. To
verify just the local installer and first-run CLI boundaries without network
access or provider keys, use:
```bash
make install-smoke
```
To verify the focused CLI inner-loop contract — scaffold → run/chat/inspect → deploy dry-run — use:
```bash
make inner-loop
```
To run only the ordered [0→hero services → agents → workflows transcript](internal/website/docs/guides/zero-to-hero.md) that CI guards, use:
```bash
make zero-to-hero-transcript
```
To run the broader local contract (including that transcript, chat/inspect CLI boundaries, and deploy dry-run), use:
```bash
make harness
```
### First agent on-ramp
After install and the first `micro new`/`micro run` smoke check, take the
walkable agent path in this order:
1. [Install troubleshooting](internal/website/docs/guides/install-troubleshooting.md) — verify the binary installer or `go install`, `PATH`, `micro --version`, and the no-secret smoke path before agent work.
Run `make docs-wayfinding` to verify the focused no-secret docs/CLI contract that keeps these README and website commands aligned with the installed CLI.
2.`micro agent demo` — print the provider-free first-agent demo command and next docs steps from the installed CLI.
3.`micro agent quickcheck` (or `micro agent debug`) — when scaffold → run → chat → inspect stalls, print the short recovery map before you dive into the full debugging guide.
4.`micro examples` — print the maintained provider-free runnable examples in copy/paste order.
5.`micro zero-to-hero` — print the maintained one-command no-secret lifecycle harness and runnable examples.
6. [Examples wayfinding index](examples/INDEX.md) — choose the smallest no-secret first-agent, maintained [0→hero support reference](examples/support/), and next interop examples from one map.
7. [Smallest first-agent example](examples/first-agent/) — run one service-backed agent with a mock model and no provider key.
8. [No-secret first-agent transcript](internal/website/docs/guides/no-secret-first-agent.md) — run the
maintained support agent with a mock model and see services → agents → workflows succeed without a key.
9. [Your First Agent](internal/website/docs/guides/your-first-agent.md) — build a
service-backed agent and talk to it with `micro chat`.
10. [Debugging your agent](internal/website/docs/guides/debugging-agents.md) — use
`micro agent preflight` before `micro run`, `micro agent doctor` after `micro run`,
then `micro chat` and `micro inspect agent <name>` to recover run history, memory,
and provider checks when the first conversation does something unexpected.
11. [0→hero Reference](internal/website/docs/guides/zero-to-hero.md) — complete the
Edit the generated code by hand at any time — re-running preserves your changes. [Read more](https://go-micro.dev/blog/13).
## Why an Agent Harness
The first wave of agent frameworks helped developers put a model in a loop. The next problem is operating that loop: connecting it to real tools, scoping what it can touch, preserving state, routing work to specialists, recovering from failures, observing what happened, and letting other agents call it. That is harness work.
Go Micro's answer is to make the harness the same thing you already deploy:
- **Tools are services** — endpoint metadata becomes tool schema; RPC executes the call.
- **Agents are services** — they register, discover, load-balance, and expose `Agent.Chat`.
- **Workflows are durable code paths** — use flows when the path is known; dispatch to agents when it is not.
- **Safety lives at execution** — `MaxSteps`, `LoopLimit`, `ApproveTool`, and tool wrappers run where actions happen.
- **Interop is built in** — MCP for tools, A2A for agents, x402 for paid tools.
Use Go Micro when the agent has to operate a system, not just answer a prompt.
## Writing Services
Under the hood, a service is a struct with methods. Doc comments and `@example` tags become tool descriptions for AI agents automatically.
An Agent is a service with an LLM inside it. It has a proto-defined `Agent.Chat` RPC endpoint, registers in the registry, and is callable like any service:
```go
agent:=micro.NewAgent("task-mgr",
micro.AgentServices("task","project"),
micro.AgentPrompt("You manage tasks and projects. You understand deadlines and priorities."),
micro.AgentProvider("anthropic"),
)
agent.Run()
```
The agent discovers its services from the registry, scopes its tools to their endpoints, and maintains conversation memory in the store. It registers itself so `micro chat` and other agents can find it.
```go
// Programmatic interaction
resp,_:=agent.Ask(ctx,"What tasks are overdue?")
fmt.Println(resp.Reply)
```
Multiple agents coordinate via RPC — each is a service with an `Agent.Chat` endpoint. `micro chat` routes to the right one.
```bash
micro agent list # list registered agents
micro call task-mgr Agent.Chat '{"message": "What tasks are overdue?"}'
```
### Plan & Delegate
Every agent gets two built-in harness capabilities, exposed as tools — no extra setup or separate graph runtime:
- **`plan`** — for multi-step work, the agent records an ordered plan in its store-backed memory and stays oriented across turns.
- **`delegate`** — the agent hands a self-contained subtask to another agent. If a registered agent already owns the relevant services, the hand-off goes over RPC to that agent; otherwise a focused, short-lived sub-agent is created for the subtask with its own isolated context.
This keeps intelligence distributed: an agent doesn't need to know *how* to do everything, only *who* does. See [examples/agent-plan-delegate](examples/agent-plan-delegate/).
```go
// A sub-agent is just an agent — created with New, talked to with Ask.
// delegate-first: reuse a registered agent, or spin up a focused one.
resp,_:=agent.Ask(ctx,"Plan the launch, create the tasks, and have comms notify the owner.")
```
### Batteries included, pluggable
Just as a service composes pluggable abstractions (registry, broker, store), an agent composes a **model**, **memory**, and **tools** — sane defaults out of the box, each swappable.
```go
agent:=micro.NewAgent("assistant",
micro.AgentProvider("anthropic"),// model — swap the provider
returngetWeather(in["city"].(string))// tools beyond your services — any function
}),
micro.AgentMaxSteps(8),// guardrails
)
```
**Memory** is durable and store-backed by default (Postgres, NATS KV, or file), so an agent picks up where it left off after a restart — or supply your own with `AgentMemory`. Long-running agents can opt into `AgentCompactMemory(maxMessages, keepRecent)`: older turns are collapsed into a deterministic summary, recent turns stay verbatim, and relevant archived turns are recalled on future asks without replaying the whole conversation. **Tools** are your services automatically, plus any function you register with `AgentTool`.
### Paid tools (x402)
Every endpoint is an AI-callable tool — and it can be a *paid* tool. Go Micro supports [x402](https://x402.org), the HTTP 402 payment standard for agents, so a tool can require a stablecoin payment and an agent can settle it autonomously. It's opt-in and carries no crypto in the framework: verification is delegated to a pluggable facilitator (Coinbase, Alchemy, self-hosted), so Base and Solana are just different facilitators.
```bash
# Charge for tool calls at the MCP gateway (off unless you set a pay-to address)
See the [Payments (x402) guide](internal/website/docs/guides/x402-payments.md).
### Reachable by other agents (A2A)
Within a Go Micro system, agents reach each other over RPC. To make them reachable by agents on *other* frameworks, Go Micro speaks the [Agent2Agent (A2A) protocol](https://a2a-protocol.org). The A2A gateway discovers your agents from the registry, generates an Agent Card for each from its metadata — the same way the MCP gateway derives tools from service endpoints — and translates incoming A2A tasks to the agent's `Agent.Chat` RPC. No per-agent code: register an agent and it's reachable over A2A.
```bash
micro a2a serve --address :4000 # gateway: expose every registered agent over A2A
micro a2a list # agents and their Agent Card URLs
```
Or skip the gateway entirely — an agent can serve its own A2A endpoint directly, handling tasks in-process:
It works both ways. To call an agent on another framework, an `a2a.Client` is wired into the two places that hand off work: `flow.A2A(url)` as a workflow step (the cross-framework `Dispatch`), and `delegate` to an `http(s)` URL from inside an agent.
MCP exposes your services as tools; A2A exposes your agents as agents. See the [A2A guide](internal/website/docs/guides/a2a-protocol.md).
New to agents? Follow the [first-agent on-ramp](#first-agent-on-ramp), then use the [examples index](examples/README.md) for the full services → agents → workflows map.
- [hello-world](examples/hello-world/) — Basic RPC service
- [multi-service](examples/multi-service/) — Multiple services in one binary
- [mcp](examples/mcp/) — MCP integration with AI agents
A harness is the runtime around an agent: the tools it can call, the memory it keeps, the guardrails that bound it, the workflows that trigger it, the services it depends on, and the protocols other agents use to reach it.
Go Micro gives you the harness as Go code. Build an agent and it gets a model, memory, tools, planning, delegation, guardrails, and service discovery; it is reachable over [MCP](https://modelcontextprotocol.io/) and [A2A](https://a2a-protocol.org). Write services and every endpoint becomes an AI-callable tool. Orchestrate the deterministic parts with durable flows. Agents, services, and flows share one runtime because an agent is a distributed system, and building one is building a service.
Go Micro 以 Go 代码的形式提供该 harness。构建一个智能体即可获得模型、记忆、工具、规划、委派、护栏与服务发现;可通过 [MCP](https://modelcontextprotocol.io/) 和 [A2A](https://a2a-protocol.org). 被访问。编写服务后,每个端点都会成为 AI 可调用的工具。用持久化 flow 编排确定性部分。智能体、服务与 flow 共享同一运行时,因为智能体本质上是一个分布式系统,构建智能体就是在构建服务。
**想支持 Go Micro 并在此展示你的 logo?** [成为赞助商](https://discord.gg/G8Gk5j3uXr) — 可通过 Discord 联系。
**Want to support Go Micro and see your logo here?** [Become a sponsor](https://discord.gg/G8Gk5j3uXr) — reach out on Discord.
## 商业支持
## Commercial Support
要在生产环境运行 Go Micro,或基于它进行开发并需要帮助?可直接向维护者购买 **支持、咨询、培训与 retainer(长期服务)** — 这些也是项目得以持续维护的支撑。详见 [**Support**](SUPPORT.md) 中的层级说明,或 [提交请求](https://github.com/micro/go-micro/issues/new?template=commercial_support.md).
Running Go Micro in production, or building on it and want help? Paid **support, consulting, training, and retainers** are available directly from the maintainer — and they're what keep the project maintained. See [**Support**](SUPPORT.md) for the tiers, or [open a request](https://github.com/micro/go-micro/issues/new?template=commercial_support.md).
The first wave of agent frameworks helped developers put a model in a loop. The next problem is operating that loop: connecting it to real tools, scoping what it can touch, preserving state, routing work to specialists, recovering from failures, observing what happened, and letting other agents call it. That is harness work.
Go Micro 的答案是:让 harness 与你已部署的东西合二为一:
Go Micro's answer is to make the harness the same thing you already deploy:
- **Tools are services** — endpoint metadata becomes tool schema; RPC executes the call.
- **Agents are services** — they register, discover, load-balance, and expose`Agent.Chat`.
- **Workflows are durable code paths** — use flows when the path is known; dispatch to agents when it is not.
- **Safety lives at execution** — `MaxSteps`, `LoopLimit`, `ApproveTool`, and tool wrappers run where actions happen.
- **Interop is built in** — MCP for tools, A2A for agents, x402 for paid tools.
当代理需要操作系统而不仅是回答提示时,使用 Go Micro。
Use Go Micro when the agent has to operate a system, not just answer a prompt.
## 编写服务
## Writing Services
底层而言,服务是带方法的 struct。文档注释和 `@example` 标签会自动成为 AI 代理的工具描述。
Under the hood, a service is a struct with methods. Doc comments and `@example` tags become tool descriptions for AI agents automatically.
```go
packagemain
@@ -244,7 +205,7 @@ func main() {
}
```
运行后一切皆可访问——REST、gRPC、MCP、agent playground:
Run it and everything is accessible — REST, gRPC, MCP, agent playground:
```bash
micro run
@@ -254,16 +215,16 @@ micro run
# MCP Tools: http://localhost:8080/mcp/tools
```
你也可以从模板脚手架生成服务:
You can also scaffold a service from a template:
```bash
micro new helloworld
micro new contacts --template crud
```
## 构建代理
## Building Agents
代理是内置 LLM 的服务。它拥有 proto 定义的 `Agent.Chat` RPC 端点,在 registry 中注册,并可像任何服务一样被调用:
An Agent is a service with an LLM inside it. It has a proto-defined `Agent.Chat` RPC endpoint, registers in the registry, and is callable like any service:
代理从 registry 发现其服务,将工具限定到对应端点,并在 store 中维护对话记忆。它会自我注册,以便 `micro chat` 及其他代理能找到它。
The agent discovers its services from the registry, scopes its tools to their endpoints, and maintains conversation memory in the store. It registers itself so `micro chat` and other agents can find it.
- **`plan`** — for multi-step work, the agent records an ordered plan in its store-backed memory and stays oriented across turns.
- **`delegate`** — the agent hands a self-contained subtask to another agent. If a registered agent already owns the relevant services, the hand-off goes over RPC to that agent; otherwise a focused, short-lived sub-agent is created for the subtask with its own isolated context.
This keeps intelligence distributed: an agent doesn't need to know *how* to do everything, only *who* does. See [examples/agent-plan-delegate](examples/agent-plan-delegate/).
```go
// A sub-agent is just an agent — created with New, talked to with Ask.
Just as a service composes pluggable abstractions (registry, broker, store), an agent composes a**model**, **memory**, and**tools** — sane defaults out of the box, each swappable.
**Memory**is durable and store-backed by default (Postgres, NATS KV, or file), so an agent picks up where it left off after a restart — or supply your own with `AgentMemory`. Long-running agents can opt into `AgentCompactMemory(maxMessages, keepRecent)`: older turns are collapsed into a deterministic summary, recent turns stay verbatim, and relevant archived turns are recalled on future asks without replaying the whole conversation. **Tools** are your services automatically, plus any function you register with`AgentTool`.
### 付费工具(x402)
### Paid tools (x402)
每个端点都是 AI 可调用的工具——而且可以是*付费*工具。Go Micro 支持 [x402](https://x402.org), 面向代理的 HTTP 402 支付标准,因此工具可要求稳定币支付,代理可自主结算。这是可选功能,框架本身不携带加密货币逻辑:验证委托给可插拔的 facilitator(Coinbase、Alchemy、自托管),因此 Base 和 Solana 只是不同的 facilitator。
Every endpoint is an AI-callable tool — and it can be a *paid* tool. Go Micro supports [x402](https://x402.org), the HTTP 402 payment standard for agents, so a tool can require a stablecoin payment and an agent can settle it autonomously. It's opt-in and carries no crypto in the framework: verification is delegated to a pluggable facilitator (Coinbase, Alchemy, self-hosted), so Base and Solana are just different facilitators.
```bash
# Charge for tool calls at the MCP gateway (off unless you set a pay-to address)
Within a Go Micro system, agents reach each other over RPC. To make them reachable by agents on *other* frameworks, Go Micro speaks the [Agent2Agent (A2A) protocol](https://a2a-protocol.org). The A2A gateway discovers your agents from the registry, generates an Agent Card for each from its metadata — the same way the MCP gateway derives tools from service endpoints — and translates incoming A2A tasks to the agent's `Agent.Chat` RPC. No per-agent code: register an agent and it's reachable over A2A.
```bash
micro a2a serve --address :4000 # gateway: expose every registered agent over A2A
micro a2a list # agents and their Agent Card URLs
```
或者完全跳过网关——代理可直接提供自己的 A2A 端点,在进程内处理任务:
Or skip the gateway entirely — an agent can serve its own A2A endpoint directly, handling tasks in-process:
It works both ways. To call an agent on another framework, an `a2a.Client` is wired into the two places that hand off work: `flow.A2A(url)` as a workflow step (the cross-framework `Dispatch`), and `delegate` to an `http(s)` URL from inside an agent.
@@ -467,21 +362,12 @@ func (a *agentImpl) askLocked(ctx context.Context, runID, message, parentRunID s
ifresp.Answer!=""{
a.mem.Add("assistant",resp.Answer)
}
message=fmt.Sprintf("Continue the same run by calling the required tool(s) for the unfinished plan steps below. Do not repeat completed work, do not provide a final answer yet, and complete at least one unfinished step this turn if a matching tool is available. Unfinished plan steps: %s",strings.Join(unfinished,", "))
message="Continue the run. These plan steps are still unfinished and must be completed before a final answer: "+strings.Join(unfinished,", ")
message=fmt.Sprintf("Your previous response started a %q tool call but did not finish valid tool-call markup or JSON arguments, so no tool was executed. Retry the same step now by emitting one complete valid tool call for %q. Do not describe the action in prose, and do not claim completion until the tool call succeeds.",toolName,toolName)
a.mem.Add("user",message)
messages=a.mem.Messages()
continue
}
break
}
@@ -500,13 +386,9 @@ func (a *agentImpl) askLocked(ctx context.Context, runID, message, parentRunID s
returnrefused(call.ID,ai.RefusedApproval,"malformed tool call: nested text tool-call markup found inside arguments; call the intended tool directly with clean JSON arguments")
prompt:="You are a conformance test agent. Create a short plan, use conformance_echo exactly once with input "+conformanceEchoInputJSON+", then attempt to delegate a summary to blocked-reviewer with input "+conformanceDelegateInputJSON+". You must complete both tool calls before any final answer; a final answer that only mentions the steps without calling both tools is invalid. If the delegate is refused, explain the refusal and answer with the echo result."
prompt:="You are a conformance test agent. Create a short plan, use conformance_echo exactly once with input {\"value\":\"agent-conformance\"}, then attempt to delegate a summary to blocked-reviewer with input {\"task\":\"summarize the conformance marker\",\"to\":\"blocked-reviewer\"}. If the delegate is refused, explain the refusal and answer with the echo result."
ifprovider=="atlascloud"{
prompt+=" AtlasCloud/minimax conformance note: the delegate attempt is mandatory after conformance_echo. If native tool_calls are unavailable, emit the delegate as "+conformanceDelegateTaggedCall+" rather than answering in prose."
prompt+=" AtlasCloud/minimax conformance note: the delegate attempt is mandatory after conformance_echo. If native tool_calls are unavailable, emit the delegate as <tool_call name=\"delegate\">{\"task\":\"summarize the conformance marker\",\"to\":\"blocked-reviewer\"}</tool_call> rather than answering in prose."
return"Final conformance retry: emit exactly this tagged tool call so the harness can execute the guarded delegate refusal, then include agent-conformance-ok and the refusal in the final answer: "+conformanceDelegateTaggedCall
return"The previous response did not call the required conformance_echo tool. Retry the same conformance check now: first call conformance_echo exactly once with input "+conformanceEchoInputJSON+", then call delegate exactly once with input "+conformanceDelegateInputJSON+"; do not provide a final answer until both tool calls have been attempted. If native delegate tool_calls are unavailable after conformance_echo, emit exactly "+conformanceDelegateTaggedCall+". The delegate is expected to be refused by policy; include that refusal and the agent-conformance marker in the final answer."
return"The previous response did not call the required conformance_echo tool. Retry the same conformance check now: you must call conformance_echo exactly once with input {\"value\":\"agent-conformance\"} before any final answer, then include the tool result marker in the final answer."
case!sawBlockedDelegate:
return"The previous response called conformance_echo but did not attempt the required guarded delegation. Continue the same conformance check now: call delegate exactly once with input "+conformanceDelegateInputJSON+"; do not answer in prose until that delegate call has been attempted. If native tool_calls are unavailable, emit exactly "+conformanceDelegateTaggedCall+". The delegate is expected to be refused by policy; include that refusal and the agent-conformance marker in the final answer."
case!hasMarker:
return"The previous response completed the required tool calls but omitted the conformance marker. Continue the same conformance check now: do not call more tools, do not summarize, and do not use synonyms. Reply with exactly this sentence: agent-conformance-ok after guarded delegate refusal."
return"The previous response called conformance_echo but did not attempt the required guarded delegation. Continue the same conformance check now: call delegate exactly once with input {\"task\":\"summarize the conformance marker\",\"to\":\"blocked-reviewer\"}; do not answer in prose until that delegate call has been attempted. If native tool_calls are unavailable, emit exactly <tool_call name=\"delegate\">{\"task\":\"summarize the conformance marker\",\"to\":\"blocked-reviewer\"}</tool_call>. The delegate is expected to be refused by policy; include that refusal and the agent-conformance marker in the final answer."
default:
return"Retry the provider conformance check and include the agent-conformance marker in the final answer."
reply:=`<tool_call>{"id":"call-2","type":"function","function":{"name":"delegate","arguments":"{\"task\":\"summarize the conformance marker\",\"to\":\"blocked-reviewer\"}"}}</tool_call>`
calls:=parseTextToolCalls(reply,tools)
iflen(calls)!=1{
t.Fatalf("parseTextToolCalls returned %d calls, want 1: %+v",len(calls),calls)
}
ifcalls[0].Name!="delegate"{
t.Fatalf("call name = %q, want delegate",calls[0].Name)
}
ifgot:=calls[0].Input["task"];got!="summarize the conformance marker"{
t.Fatalf("task = %v, want summarize the conformance marker",got)
map[string]any{"role":"user","content":fmt.Sprintf("Your previous response started a %q tool call but did not finish valid tool-call markup or JSON arguments, so no tool was executed. Retry the same step now by emitting one complete valid tool call for %q. Do not describe the action in prose, and do not claim completion until the tool call succeeds.",toolName,toolName)},
prompt:="AtlasCloud/minimax compatibility: use native tool_calls for the listed service tools. "+
"For built-in agent tools that are not listed natively ("+strings.Join(builtins,", ")+
"), emit exactly <tool_call name=\"tool_name\">{...}</tool_call> so the agent runtime can execute them. Do not describe those built-in tool calls in prose instead of emitting the tag."
_,_=w.Write([]byte(`{"choices":[{"message":{"content":"","tool_calls":[{"id":"call-2","function":{"name":"delegate","arguments":"{\"task\":\"summarize the conformance marker\",\"to\":\"blocked-reviewer\"}"}}]}}]}`))
case3:
_,_=w.Write([]byte(`{"choices":[{"message":{"content":"blocked by policy"}}]}`))
_,_=w.Write([]byte(`{"choices":[{"message":{"content":"<tool_call name=\"delegate\">{\"task\":\"summarize the conformance marker\",\"to\":\"blocked-reviewer\"}</tool_call>"}}]}`))
casestrings.Contains(msg,"unauthorized")||strings.Contains(msg,"forbidden")||strings.Contains(msg,"invalid api key")||strings.Contains(msg,"api key")||strings.Contains(msg,"credential"):
returnErrorKindAuth
casestrings.Contains(msg,"missing")||strings.Contains(msg,"not configured")||strings.Contains(msg,"configuration")||strings.Contains(msg,"unsupported model")||strings.Contains(msg,"model not found"):
Once the scaffold → run → call path works, ask the installed CLI for the
provider-free agent path. The focused no-secret docs/CLI contract is
`make docs-wayfinding`:
```
micro agent demo
micro agent quickcheck
micro examples
micro zero-to-hero
```
`micro agent quickcheck` (alias: `micro agent debug`) prints the short recovery map when scaffold → run → chat → inspect stalls. Those commands point at the smallest mock-model first-agent example, the no-secret transcript, and the 0→hero support app before you add provider-backed chat.
### Output
```
@@ -685,7 +663,7 @@ micro loop init \
```
-`--roles`: which roles to scaffold (`planner,builder,triage`, or `all`)
-`--agent`: how the workflows summon the agent — any`@mention`-driven coding agent (e.g. `@codex`, `@claude`)
-`--agent`: how the workflows summon the agent (an `@mention`)
-`--token-secret`: repo secret holding the driving user PAT
-`--branch`: base branch for the loop's PRs
-`--ci-workflow`: `name:` of the CI workflow triage watches
returnpreflightCheck{Name:"gateway /agent",Detail:err.Error(),Fix:"Start the local gateway with `micro run`, or pass the matching URL with `micro agent doctor --gateway http://localhost:<port>`.",Next:"Then open "+gateway+"/agent or retry `micro chat`."}
}
deferresp.Body.Close()
ifresp.StatusCode>=400{
returnpreflightCheck{Name:"gateway /agent",Detail:fmt.Sprintf("%s returned %s",gateway+"/agent",resp.Status),Fix:"Confirm `micro run` is serving the web gateway and that auth/proxy settings are not blocking /agent.",Next:"See docs/guides/debugging-agents.html#chat-and-gateway-failures."}
}
returnpreflightCheck{Name:"gateway /agent",OK:true,Detail:gateway+"/agent is reachable"}
returnpreflightCheck{Name:"chat settings endpoint",Detail:err.Error(),Fix:"Keep `micro run` running and retry; the playground uses /api/agent/settings before chat prompts.",Next:"See docs/guides/debugging-agents.html#chat-and-gateway-failures."}
}
deferresp.Body.Close()
ifresp.StatusCode>=400{
returnpreflightCheck{Name:"chat settings endpoint",Detail:fmt.Sprintf("returned %s",resp.Status),Fix:"Check gateway auth/proxy configuration or use the Agent settings page to confirm chat settings load.",Next:"See docs/guides/debugging-agents.html#provider-failures."}
returnnil,preflightCheck{Name:"agent registration",Detail:err.Error(),Fix:"Keep the scaffolded agent process running under `micro run` and retry `micro agent list`.",Next:"See docs/guides/your-first-agent.html#run-your-agent."}
}
varagents[]string
for_,svc:=rangeservices{
records,err:=deps.getService(svc.Name)
iferr!=nil||len(records)==0{
continue
}
ifserviceIsAgent(records[0]){
agents=append(agents,svc.Name)
}
}
iflen(agents)==0{
returnnil,preflightCheck{Name:"agent registration",Detail:"no registered agent services found",Fix:"Start an agent project with `micro run` and confirm `micro agent list` shows it.",Next:"Use docs/guides/no-secret-first-agent.html for a deterministic no-provider agent."}
returnpreflightCheck{Name:"inspect run history",Detail:"skipped because no agent is registered",Fix:"Fix agent registration first, then chat once and run `micro inspect agent <name>`.",Next:"See docs/guides/debugging-agents.html#inspect-run-history."}
}
for_,name:=rangeagents{
runs,err:=deps.listRuns(name)
iferr!=nil{
returnpreflightCheck{Name:"inspect run history",Detail:err.Error(),Fix:"Ensure the local store is writable and retry `micro inspect agent "+name+"`.",Next:"See docs/guides/debugging-agents.html#inspect-run-history."}
}
iflen(runs)>0{
returnpreflightCheck{Name:"inspect run history",OK:true,Detail:"recent runs available for "+name}
}
}
returnpreflightCheck{Name:"inspect run history",Detail:"no recorded agent runs yet",Fix:"Send one prompt with `micro chat` or the /agent playground, then run `micro inspect agent "+agents[0]+"`.",Next:"See docs/guides/your-first-agent.html#inspect-what-happened."}
t.Fatalf("%s documents %q, but none of the first-agent CLI outputs mention it; keep README/website breadcrumbs aligned with micro agent demo/examples/zero-to-hero",contract.name,marker)
@@ -43,7 +43,7 @@ It reads durable local run history, so it works after the agent or flow has stop
funcinspectAgentFlags()[]cli.Flag{
return[]cli.Flag{
&cli.BoolFlag{Name:"json",Usage:"Print run summaries as JSON for automation"},
&cli.StringFlag{Name:"status",Usage:"Only show runs with this status (running, done, canceled, timeout, rate_limited, auth, configuration, unavailable, provider_error, error, refused)"},
&cli.StringFlag{Name:"status",Usage:"Only show runs with this status (running, done, error, refused)"},
&cli.StringFlag{Name:"trace",Usage:"Only show runs whose trace id matches this full id or prefix"},
&cli.IntFlag{Name:"limit",Usage:"Show the most recently updated N runs"},
}
@@ -91,12 +91,6 @@ func writeAgentInspection(w io.Writer, name string, runs []goagent.RunSummary, a
ifrun.Stage!=""{
fmt.Fprintf(w," stage=%s",run.Stage)
}
ifrun.LastErrorKind!=""{
fmt.Fprintf(w," error_kind=%s",run.LastErrorKind)
}
ifrun.Spent>0{
fmt.Fprintf(w," spent=%d",run.Spent)
}
ifrun.LastError!=""{
fmt.Fprintf(w," error=%q",run.LastError)
}
@@ -104,25 +98,16 @@ func writeAgentInspection(w io.Writer, name string, runs []goagent.RunSummary, a
fmt.Fprintf(w," trace=%s",shortID(run.TraceID))
}
fmt.Fprintln(w)
writeAgentRunBreadcrumbs(w,name,run)
ifisResumableAgentRun(run){
fmt.Fprintf(w," resume: call micro.AgentResume(ctx, agent, %q) after recreating the agent with the same checkpoint store\n",run.RunID)
}
ifrun.Stage=="input-required"{
fmt.Fprintf(w," input: call micro.AgentResumeInput(ctx, agent, %q, input) to continue the paused run\n",run.RunID)
runs:=[]goagent.RunSummary{{RunID:"run-1",Status:"auth",Events:4,LastKind:"model",LastError:"invalid API key",LastErrorKind:"auth",TraceID:"1234567890abcdef",Checkpoint:"failed",Stage:"ask",Spent:7}}
for_,want:=range[]string{"Agent \"support\" runs","run-1","status=auth","events=4","last=model","checkpoint=failed","stage=ask","error_kind=auth",`error="invalid API key"`,"trace=1234567890ab","spent=7"}{
for_,want:=range[]string{"checkpoint=paused","stage=input-required",`micro agent history support run-input`,`micro agent resume-input support run-input --input <text>`}{
Use this index when you want the shortest path from a first runnable agent to the
next services, agents, workflows, and interop examples. Every command below is
provider-free unless the example README says otherwise.
## Pick by goal
| Goal | Start here | Run or verify | Then try |
|------|------------|---------------|----------|
| Run the smallest no-secret agent | [`first-agent`](./first-agent/) | `go run ./examples/first-agent` | [`agent-demo`](./agent-demo/) for a larger service-backed agent |
| Prove the maintained 0→hero path | [`support`](./support/) | `go run ./examples/support` and `go test ./examples/support` | [`zero-to-hero` guide](../internal/website/docs/guides/zero-to-hero.md) |
| See planning and delegation | [`agent-plan-delegate`](./agent-plan-delegate/) | `go run ./examples/agent-plan-delegate` | [`plan-delegate` guide](../internal/website/docs/guides/plan-delegate.md) |
| Expose services through MCP | [`mcp/hello`](./mcp/hello/) | follow [`mcp`](./mcp/) setup | [`mcp/crud`](./mcp/crud/) and [`mcp/workflow`](./mcp/workflow/) |
| Try a paid tool with x402 | [`agent-x402-buyer`](./agent-x402-buyer/) | `go run ./examples/agent-x402-buyer` | [`Payments (x402)` guide](../internal/website/docs/guides/x402-payments.md) |
| Try A2A or gRPC interop next | [`agent-demo`](./agent-demo/) plus gateway docs | run the example, then use the gateway docs | [`grpc-interop`](./grpc-interop/) |
Each example can be run with `go run .` from its directory unless its README says
otherwise. If you are new to the repo, start with the [examples wayfinding index](./INDEX.md)
or follow the first-agent path below instead of reading the directories alphabetically.
otherwise. If you are new to the repo, follow the first-agent path below instead
of reading the directories alphabetically.
## Recommended first-agent path
This path is the canonical services → agents → workflows route through the examples map. Debugging and observability wayfinding stays nearby once the first run works.
| Step | Start here | What you learn | Next step |
| 1. First service | [`hello-world`](./hello-world/) | Build the 0→1 service path: create and register a basic RPC service, add a handler, call it with a client, and expose health checks. | Move to [`agent-demo`](./agent-demo/) to see services used by an agent. |
| 1. First service | [`hello-world`](./hello-world/) | Create and register a basic RPC service, add a handler, call it with a client, and expose health checks. | Move to [`agent-demo`](./agent-demo/) to see services used by an agent. |
| 2. First agent | [`first-agent`](./first-agent/) | Run the smallest service-backed agent with a deterministic mock model and no provider key. | Compare with [`agent-demo`](./agent-demo/) or the maintained 0-to-hero path in [`support`](./support/). |
| 3. First workflow | [`support`](./support/) | Follow typed services into an agent chat loop, an event-driven `intake` flow, and an approval gate in one runnable reference. | Deepen the workflow model with [`flow-durable`](./flow-durable/). |
@@ -34,22 +34,5 @@ CI keeps this path runnable with:
go test ./examples/first-agent
```
## Next chat, inspect, and debug breadcrumbs
This example exits after one in-process `assistant.Ask` call so it stays tiny and
provider-free. When you move from this transcript to a long-running agent, keep
these commands nearby:
```bash
micro run
micro chat assistant --prompt "Summarize my next steps"
micro inspect agent assistant
micro agent doctor assistant
```
Use the [no-secret first-agent guide](../../internal/website/docs/guides/no-secret-first-agent.md)
to compare this transcript with the CLI demo, then keep the
[debugging guide](../../internal/website/docs/guides/debugging-agents.md) open for
preflight, doctor, inspect, and history checks. After that, continue to
[`examples/support`](../support/) for the full services → agents → workflows
lifecycle with a flow trigger and an approval gate.
After this, continue to [`examples/support`](../support/) for the full services →
agents → workflows lifecycle with a flow trigger and an approval gate.
Some files were not shown because too many files have changed in this diff
Show More
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.