Package Exports
- memoryblock
- memoryblock/commands
Readme
Run AI agents that remember, think, and work - without burning through your budget.
Website • Documentation • Report Bug
memoryblock web client dashboard preview
memoryblock is a lightweight framework for orchestrating isolated AI background workers. Instead of building monolithic chatbots, we provision local workspaces called blocks. Each block acts as a dedicated environment equipped with its own continuous memory, toolset, and execution loop.
Spawn a devops block to watch your infrastructure, a research block to scrape web data, and your primary home block to coordinate tasks. No state pollution, no crossed context boundaries.
- Absolute Isolation: Every agent lives inside a dedicated filesystem directory (
config.json,memory.md,logs/). To move an agent to a new server, you just copy its folder. No centralized databases to manage. - Token Pruning: Running background agents is historically expensive.
memoryblockmitigates this by lazy-loading tool schemas only when invoked, and proactively truncating long tool outputs once analyzed. This typically halves the cost of sustained sessions. - Native & Lean: Zero dependency on heavy Node.js runtimes or Electron ecosystems. The core engine, HTTP server, and WebSocket router rely purely on Bun's native primitives for maximal I/O speed and minimal RAM overhead.
- Model Agnostic: Provision blocks dynamically utilizing native definitions for OpenAI, Anthropic, AWS Bedrock, or Google Gemini.
Quick Start
memoryblock leverages Bun under the hood for native execution speed. If you use npm, we automatically manage the local Bun environment for you.
Install the framework globally:
bun install -g memoryblock # Option A: Fastest
npm install -g memoryblock # Option B: Managed internallyInitialize your environment:
mblk initThis interactive wizard verifies your local environment and configures your initial LLM provider credentials.
Start your default block:
mblk start [block-name]Your autonomous assistant is now running in the background.
Working with Channels
Your blocks are decoupled from the UI. Communicate with them via the terminal, secure web dashboard, or standard chat clients.
Launch the Web Dashboard:
mblk webAccess real-time stream logs, cost tracking, and memory management at localhost:8420.
Route a block to social channels:
mblk start home --channel telegramSecurely interact with your existing agent state from anywhere without losing active history.
Command Reference
| Command | Description |
|---|---|
mblk init |
Interactive setup - configure credentials and create your first block |
mblk create <name> |
Create a new block (isolated AI workspace) |
mblk start [block] |
Start a block's monitor loop (or all blocks) |
mblk stop [block] |
Stop a running block monitor (or all blocks) |
mblk status |
Show all blocks and their state |
mblk delete <block> |
Archive a block safely (use --hard to permanently delete) |
mblk restore <name> |
Restore an archived block |
mblk reset <block> |
Reset memory, costs, and session (use --hard to wipe identity) |
mblk permissions <block> |
View or update block permissions |
mblk settings [plugin] |
View or edit plugin settings |
mblk add [plugin] |
Install a plugin (no args lists available) |
mblk remove <plugin> |
Remove an installed plugin |
mblk server start |
Start the web UI and API server |
mblk server stop |
Stop the running server |
mblk server status |
Show server status |
mblk server token |
View or regenerate the API auth token |
mblk service install |
Register memoryblock to start on boot/login |
mblk shutdown |
Stop all blocks and the server |
mblk restart |
Full restart — shutdown then start everything as daemons |
Full reference: command docs
Plugins
Blocks come with a core set of tools. Need more? Add them:
mblk add web-search # Enables high-fidelity SERP querying
mblk add fetch-webpage # Extracts and chunks text from structured URLs
mblk add agents # Allows blocks to spawn ephemeral sub-agentsAdapters for OpenAI, Anthropic, Google Gemini, and AWS Bedrock are natively supported out-of-the-box. Adding a custom provider adapter requires implementing a single unified payload interface.
Monorepo Architecture
memoryblock is built as a highly modular TypeScript monorepo utilizing a strict one-way Directed Acyclic Graph (DAG) for dependency management. All sub-packages are independently publishable.
| Package | Responsibility |
|---|---|
memoryblock |
Global executable wrapper, setup tooling, and CLI orchestration. |
@memoryblock/core |
Extracted engine runtime (Gatekeeper, Memory Manager, Monitor loops). |
@memoryblock/types |
Centralized Zod validation schemas and TypeScript interfaces. |
@memoryblock/daemon |
Low-level OS process spawner and background lifecycle manager. |
@memoryblock/adapters |
Unified REST/SDK implementations for LLM providers. |
@memoryblock/channels |
Transport layer for CLI, WebSockets, and messaging platforms. |
@memoryblock/tools |
Core functional schemas (File I/O, OS interactions). |
@memoryblock/api |
Fast, dependency-injected HTTP web server integration. |
@memoryblock/locale |
Formatting tools and centralized translation strings. |
@memoryblock/web |
Standalone UI distribution package. |
Community & Support
- Contributing: We welcome PRs! See CONTRIBUTING.md.
- Support: If you find
memoryblockuseful, please consider sponsoring the project or giving it a star ⭐.
The memoryblock Ecosystem
memoryblock is a highly modular system. Here are the official packages:
The Core
- memoryblock - CLI orchestrator and command routing.
- @memoryblock/core - Engine runtime, memory manager, gatekeeper.
- @memoryblock/types - Shared TypeScript definitions and schemas.
- @memoryblock/locale - Localization strings and utilities.
Integrations & Tooling
- @memoryblock/adapters - LLM provider adapters (OpenAI, Anthropic, Bedrock, etc).
- @memoryblock/channels - Communication channels (CLI, Telegram, Web).
- @memoryblock/tools - Tool registry and built-in definitions.
- @memoryblock/daemon - Background process spawner and manager.
- @memoryblock/api - HTTP/WebSocket API server.
- @memoryblock/web - Front-end dashboard static files.
Plugins
- @memoryblock/plugin-installer - Plugin installer and registry manager.
- @memoryblock/plugin-agents - Secondary AI agents orchestrator.
- @memoryblock/plugin-aws - AWS integrations.
- @memoryblock/plugin-fetch-webpage - Web content fetching and parsing.
- @memoryblock/plugin-web-search - Web search capabilities.
License
Distributed under the MIT License. See LICENSE for more information.