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
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>
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>
* 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>
* 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>
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>