diff --git a/internal/server/developers.go b/internal/server/developers.go index 97d2b025..5dbb7fbf 100644 --- a/internal/server/developers.go +++ b/internal/server/developers.go @@ -10,54 +10,46 @@ import ( func DevelopersHandler(w http.ResponseWriter, r *http.Request) { base := html.EscapeString(strings.TrimRight(origin.URL(r), "/")) - body := `
Ask an agent, assign work and retrieve the result through HTTP or the Mu CLI.
-Micro runs the agents and tools for you. Use your account and credits; no model key or server setup is needed. If your own agent only needs tools, start with MCP tools or the services HTTP API.
-Create a token: choose Agents / Account, enable Agents and Background jobs, and Allow actions. Enable Inbox too if you want to read conversations. Keep the token in your environment or CLI configuration, outside browser code and source control.
-Build the current CLI from Mu, then sign in:
git clone https://github.com/micro/mu.git -cd mu -go build -o mu . -./mu login ` + base + ` -./mu ask "Compare SQLite and PostgreSQL for a small personal server"-
Micro returns an answer and saves the conversation. Use ./mu ask --raw "…" for JSON containing text and thread; continue with ./mu ask --thread THREAD_ID "…".
For a task that should keep running after your request returns:
./mu work submit --prompt "Compare SQLite and PostgreSQL for a small personal server. Cite sources and recommend one." -./mu work get --id WORK_ID-
Submission returns an id. Reading it returns a work object with its status, result, steps and attempts. Check periodically: todo is queued, doing is running, done is complete; failed, blocked or canceled need review. The same work appears in Work.
Give an agent reusable instructions and an explicit set of services it may use:
./mu agent create researcher \ - --prompt "Research questions using sources. Cite URLs and distinguish facts from uncertainty." \ - --tools web,news -./mu agent list -./mu work submit --agent researcher --prompt "Compare SQLite and PostgreSQL for a small personal server"-
Creation returns its agent name. Use that returned name when assigning work or with ./mu ask --agent NAME. The tools flag takes service names from the services directory. Creating an agent does not issue another token; your plan's agent limit applies.
The CLI uses these same resources. Set your token as MU_TOKEN, then ask Micro:
curl '` + base + `/agent' \ + body := `Ask the agent, assign work or call services from your own applications.
+ +CLI
Install Mu and connect to your account:
curl -fsSL https://raw.githubusercontent.com/micro/mu/main/install.sh | sh +mu login ` + base + ` +mu ask "What needs my attention?"+No model key is needed to use the hosted assistant. To continue a conversation, use
+mu ask --thread THREAD_ID "…". Add--rawfor JSON.mu work submit --prompt "Research the options and recommend one" +mu work get --id WORK_ID +mu inbox list +mu tools +mu help+Work runs in the background; use its returned ID to read progress and the result. Use
+mu help SERVICE METHODto see how to call a service.HTTP
Create a token and set it as
+MU_TOKEN. Choose Agents / Account for the agent, work and inbox; enable the permissions you need, including Allow actions to submit work.curl '` + base + `/agent' \ -H "Authorization: Bearer $MU_TOKEN" \ - -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ - -d '{"prompt":"Compare SQLite and PostgreSQL for a small personal server"}'-To create an agent:
curl '` + base + `/agents' \ - -H "Authorization: Bearer $MU_TOKEN" \ -H 'Content-Type: application/json' \ - -H 'Accept: application/json' \ - -d '{"name":"researcher","prompt":"Research using sources and cite URLs.","services":["web","news"]}'-To assign work, use the returned agent name:
curl '` + base + `/work' \ + -d '{"prompt":"What needs my attention?"}'+The response includes
+textandthread. Sendthreadwith your next prompt to continue.curl '` + base + `/work' \ -H "Authorization: Bearer $MU_TOKEN" \ - -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ - -d '{"agent":"researcher","prompt":"Compare SQLite and PostgreSQL for a small personal server"}' + -H 'Content-Type: application/json' \ + -d '{"prompt":"Research the options and recommend one"}' curl '` + base + `/work/WORK_ID' \ -H "Authorization: Bearer $MU_TOKEN" \ -H 'Accept: application/json'-
- Request Purpose - GET /agents List your agents. - POST /agents Create with name, prompt and a nonempty services array. - POST /agent or /agent/NAME Ask with prompt; pass thread to continue a conversation. - POST /work Submit prompt, optional agent and optional thread for context and delivery. - GET /work List work; optionally filter with ?status=failed. - GET /work/WORK_ID Read progress and result in the work field. + GET /inbox/THREAD_ID Read the conversation, including delivered results. Submission returns an
+id. Reading it returnswork.statusandwork.result. Agent replies and work use your account's credits.-
+ Resource Use + POST /agentAsk Micro with a prompt and optional thread. + POST /agent/NAMEAsk a specific agent. + GET /agentsList your agents. + POST /workAssign a prompt, with an optional agent and thread. + GET /workList your work. + GET /work/WORK_IDRead progress and results. GET /inbox/THREAD_IDRead a conversation. Existing ?id= links remain supported. Path, query and body IDs must agree when supplied together. JSON and URL-encoded form bodies are accepted for actions; Accept selects the response format. Single-work reads retain the work field; conversation reads retain thread and messages, whichever URL is used.
All calls require your token and Accept: application/json; JSON POST requests also require Content-Type: application/json. Usage draws from the same account allowance and balance. After a lost creation or submission response, inspect your agents or work before retrying. To retry reviewed work explicitly, use
-./mu work retry --id WORK_IDor POST /work with{"action":"retry","id":"WORK_ID"}; previous actions may be repeated.Hosted or self-hosted
The CLI defaults to Micro. Run
-./mu login https://your-server.exampleto use your own Mu server, or setMU_URLandMU_TOKEN. The HTTP resources stay the same; a self-hosted server needs its own model and service configuration. See self-hosting.Tools and x402
Bring your own agent to /mcp or the services API to call individual tools with a Services token. For wallet-paid public service calls, use x402: m3o.com is the machine-readable endpoint. Hosted agent execution uses your Micro account and credits.
` +Services and tools
Call services directly with a Services token. The API reference lists HTTP endpoints, parameters and examples. The Tools page lists MCP tools and connection instructions for your own agent. In the CLI, use
+mu toolsto discover them andmu SERVICE METHOD --argument valueto call one.Pay per call
x402 lets your applications pay for public service calls with USDC. See the payment and connection details there.
+Self-hosting
The same CLI works with your own server:
` app.Respond(w, r, app.Response{Title: "Developers", HTML: body}) }mu login https://your-server.example. See the installation guide and source code.