magus v0.3.0 is out. See what's new
¶ View markdown source · ✎ Suggest an edit
1 min read

Daemon API

The daemon serves its API over Connect, which speaks three protocols on one endpoint: Connect's own browser-native HTTP, gRPC, and gRPC-Web. Anything that can send an HTTP request can call it, so a generated client is optional.

This reference is generated from the .proto contract, so it cannot drift from what the daemon serves. The console is one consumer of this API and has no privileged access to it - a front end you write yourself can do everything the console does.

Before you call anything

Start the daemon with magus server start. See the console reference for the endpoint and port, and the auth diagnostics for what a rejected token means. Requests carry a hashed, expiring mgs_ bearer token.

Services

Service Methods Package
ActivityService 2 magus.activity.v1
InsightService 1 magus.insight.v1
JobService 5 magus.job.v1
MemoryService 5 magus.memory.v1
MetricsService 2 magus.metrics.v1
StatusService 2 magus.status.v1
TokenService 2 magus.token.v1
ViewerService 3 magus.viewer.v1

Calling a method without a generated client

A unary Connect method is a plain POST with a JSON body, so curl is a complete client:

curl -X POST \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $MAGUS_TOKEN" \
  -d '{}' \
  http://127.0.0.1:7391/magus.activity.v1.ActivityService/ListActivity

The path is always /<package>.<Service>/<Method>, which every page below states per method.

apiprotoprotobufconnectgrpcdaemonreference
Last updated (e4f13c3d)
Earlier changes on this page (1)

Full history ↗ · Blame source ↗

Glossary

Service

A long-running or shared process magus manages across runs, distinct from a one-shot target. See services.

Daemon

The background magus host that owns shared state such as services and the warm knowledge graph. See daemon.

Insight

The reports magus derives over the graph and history (hotspots, affinity, ownership, trend). See insight.

Conventions

Placeholders

Angle brackets mark a value you replace with your own - never type the brackets:

magus run <target>
magus completion <shell>    # e.g. bash, zsh, fish

<target>, <path>, <shell>, <name> and the like are stand-ins, not literal text.