Package Exports
- @femtomc/mu-agent
Readme
@femtomc/mu-agent
Shared agent runtime package for mu.
This package provides reusable runtime pieces for chat, orchestration, and serve-mode tooling, including:
- Messaging operator runtime + backend
- Command context resolution for operator command proposals
- Role prompt loading/defaults for orchestrator + worker agents
- pi CLI/SDK orchestration backends and resource loader helpers
- Prompt/template helpers used by orchestration roles
Bundled default prompts
Bundled defaults now live as markdown files under packages/agent/prompts/:
operator.mdorchestrator.mdworker.mdsoul.md(shared tail appended to all role prompts)
These are loaded by runtime code and are the single source of truth for default system prompts.
Install
npm install @femtomc/mu-agent
# or: bun add @femtomc/mu-agentDevelopment
From repo root (mu/):
bun run build
bun test packages/orchestrator packages/control-planeServe-mode extensions (mu serve)
When mu serve starts the interactive assistant, it loads
serveExtensionPaths from src/extensions/index.ts (path-based extensions,
not anonymous inline factories).
Current stack:
brandingExtension— mu header/footer/widgetsserverToolsExtension— status + issues/forum/events/control-plane toolseventLogExtension— event tail + watch widgetmessagingSetupExtension— adapter diagnostics and setup guidance
mu serve sets MU_SERVER_URL automatically for these extensions.
Slash commands (operator-facing)
/mu status— concise server status/mu control— active control-plane adapters and webhook routes/mu setup— adapter preflight/mu setup plan <adapter>— actionable wiring plan/mu setup apply <adapter>— guided config apply + control-plane reload/mu setup verify [adapter]— runtime verification for mounted routes/mu setup <adapter>— sends adapter setup brief to mu agent (--no-agentprints local guide)/mu events [n]//mu events tail [n]— event log tail/mu events watch on|off— toggle event watch widget/mu brand on|off|toggle— enable/disable UI branding
Tools (agent/operator-facing)
mu_status()- High-level server status.
mu_control_plane({ action })action:status | adapters | routes
mu_issues({ action, ... })action:list | get | ready
mu_forum({ action, ... })action:read | post | topics
mu_events({ action, ... })action:tail | query
mu_messaging_setup({ action, adapter?, public_base_url? })action:check | preflight | guide | plan | apply | verifyadapter:slack | discord | telegram | gmail
Messaging setup notes
- Runtime setup state comes from
GET /api/configand.mu/config.json. slack,discord,telegramare currently modeled as available adapters.gmailis modeled as planned guidance (not mounted by runtime yet).mu_messaging_setup(action=preflight)is the quickest health check during onboarding.