Open source · Python kernel

Marmo Core

A resource kernel for AI agents.

Route the right Memory, Skill, Tool, and Agent — safely. Marmo Core is a lightweight Python kernel for discovering, selecting, and safely executing the resources an AI agent needs for the task in front of it.

pip install marmo-core

Python 3.10+ Apache License 2.0 Memory / Skill / Tool / Agent

A marimo resting on the lake bed The name Marmo comes from marimo, the spherical green algae that grows on the floor of cold lakes.

The problem

Agents have more capabilities than ever.

Modern AI agents can access tools, memories, reusable skills, external services, and even other agents. The challenge is no longer just connecting them.

The challenge is deciding:

  • What should be used?
  • Which resources should be selected together?
  • Is the operation allowed?
  • Does it require human approval?
  • What happened during execution?

Marmo Core provides a common layer for handling these decisions.

  1. TaskA natural language goal arrives.
  2. SearchFind candidate resources in the registry.
  3. SelectNarrow them down to a working set.
  4. Policy & SafetyCheck permissions, side effects, and approval.
  5. ActivateHand the selected set to the agent.
  6. ExecuteRun under the runtime’s controls.
  7. AuditRecord what was decided and what ran.

01 / Resource model

One resource model

Marmo Core represents the capabilities available to an AI agent as four types of resources.

R-01

Memory

Persistent or task-specific context that helps an agent make better decisions.

  • User preferences
  • Previous interactions
  • Domain knowledge
  • Task context
R-02

Skill

Reusable instructions and workflows that describe how a task should be performed.

  • Research workflows
  • Coding procedures
  • Document analysis
  • Customer support
R-03

Tool

Executable capabilities that allow an agent to interact with software and external systems.

  • APIs
  • Databases
  • File systems
  • Shell commands
  • MCP tools
R-04

Agent

Specialized agents that can receive and execute delegated tasks.

  • Research agents
  • Coding agents
  • Review agents
  • Domain-specific agents

02 / Shared metadata

One interface for heterogeneous resources.

Memory, Skill, Tool, and Agent resources share a common metadata model. Every resource can describe itself with the same set of fields:

  • Capabilities
  • Inputs and outputs
  • Required permissions
  • Estimated cost
  • Expected latency
  • Side effects
  • Trust level
  • Dependencies
  • Conflicts
  • Operational statistics

This allows different kinds of resources to be searched, compared, selected, and governed through the same infrastructure.

Registry → retrieval → selection → execution
Memory ─┐
Skill  ─┤
Tool   ─┼──► Resource Registry
Agent  ─┘          │
                   ▼
               Retrieval
                   │
                   ▼
                Selection
                   │
                   ▼
                Execution

03 / Dynamic routing

Find the right resources for every task.

Instead of exposing every available capability to an agent at once, Marmo Core retrieves and selects resources based on the current task.

Routing pipeline
User Task
   │
   ▼
Resource Registry
   │
   ▼
Retriever
   │
   ▼
Candidate Resources
   │
   ▼
Selector
   │
   ▼
Selected Resource Set

Marmo Core includes multiple retrieval and selection strategies, allowing applications to balance factors such as relevance, cost, latency, permissions, trust, dependencies, and resource compatibility.

Example
"Summarize this document and send the result."

                    │
                    ▼

               Marmo Core

       ┌────────────┼────────────┐
       ▼            ▼            ▼

Document Skill    Memory      Email Tool

The agent receives the resources needed for the task instead of the entire capability space.

04 / Guarded execution

LLM outputs are proposals — not permissions.

Giving AI agents access to external systems introduces risks that ordinary function calling does not solve. Marmo Core places execution behind explicit policy and runtime controls.

From proposal to execution
LLM
 │
 ▼
Resource Selection
 │
 ▼
Policy Gateway
 │
 ▼
Permission Check
 │
 ▼
Human Approval
 │
 ▼
Runtime
 │
 ▼
Audit Log
Permissionspermissions
Resources declare the permissions they require before execution.
Side effectsside effects
Operations can be classified according to their effects, including read, write, external, and irreversible actions.
Human-in-the-loopapproval
Sensitive operations can require explicit human approval before execution.
Secret handlingsecrets
Credentials can be resolved outside the model context and injected only when needed.
Prompt injection boundariesuntrusted input
External content and tool results can be treated as untrusted data rather than trusted instructions.
Isolationisolation
Connectors can declare execution isolation requirements.
Auditaudit log
Execution decisions and runtime activity can be recorded for inspection and verification.

05 / Quick start

Quick start

Marmo Core requires Python 3.10 or later.

Install

pip install marmo-core

Create a resource

pythonregister a tool
from marmo_core import ResourceDefinition, ResourceRegistry

registry = ResourceRegistry()

resource = ResourceDefinition.from_mapping({
    "id": "tool.math.add",
    "kind": "tool",
    "name": "Add Numbers",
    "version": "1.0.0",
    "description": "Add two numbers.",
    "capabilities": ["arithmetic", "addition"],
    "input_summary": "Two numbers.",
    "output_summary": "The calculated sum.",
    "required_permissions": ["math.add"],
    "cost_estimate": 0.0,
    "latency_class": "fast",
    "side_effect": "none",
    "trust_level": "core",
    "ref": "tool://math/add",
    "tags": ["math"],
    "input_schema": {
        "type": "object",
        "required": ["a", "b"],
        "properties": {
            "a": {"type": "number"},
            "b": {"type": "number"}
        }
    }
})

registry.add(resource)

Run a task

pythonrun a goal
from marmo_core import (
    Kernel,
    MockLLMProvider,
    PolicyContext,
)

def add_numbers(a: float, b: float):
    return {"sum": a + b}

kernel = Kernel(
    registry,
    MockLLMProvider(
        tool_arguments={
            "tool.math.add": {
                "a": 2,
                "b": 3
            }
        }
    ),
    policy_context=PolicyContext(
        granted_permissions=("math.add",)
    ),
    tool_implementations={
        "tool.math.add": add_numbers
    },
)

result = kernel.run_goal(
    "Add 2 and 3 using the calculator."
)

print(result.output)

06 / Command line

CLI

Marmo Core also provides a command-line interface for validating, searching, and executing resources.

bashvalidate resources
marmo validate resources/
bashsearch resources
marmo search resources/ \
  --task "read a local text file safely"
bashrun a resource
marmo run resources/tools/validate-json.json \
  --task "validate JSON input"

07 / Strategies

Retrieval and selection

Marmo Core provides multiple strategies for resource discovery and routing.

Retrieval

  • Lexical retrieval
  • Hybrid retrieval
  • Graph-based capability retrieval
  • Hierarchical retrieval
  • LLM reranking
  • Cross-encoder reranking

Selection

  • Rule-based selection
  • Greedy constrained selection
  • Beam search
  • Branch-and-bound selection
  • LLM-based selection

Different strategies can be combined depending on the size of the resource registry and the requirements of the application.

08 / Integrations

Connect your existing ecosystem

Marmo Core is designed to sit between AI agents and the resources they use. It does not require replacing your existing tools or services.

  • OpenAI-compatible models
  • Anthropic models
  • MCP servers
  • Python functions
  • HTTP services
  • File systems
  • Shell commands
  • SQLite databases
Where Marmo Core sits
                   AI Agent
                      │
                      ▼
                 Marmo Core
                      │
         ┌────────────┼────────────┐
         ▼            ▼            ▼
        MCP          APIs        Python
         │            │            │
         ▼            ▼            ▼
       Tools       Services      Systems

09 / MCP

MCP + Marmo Core

MCP connects tools. Marmo decides when and whether to use them.

Marmo Core is not an alternative to the Model Context Protocol. MCP provides a standard way to expose tools and capabilities to AI applications. Marmo Core treats those capabilities as resources and adds:

  • Retrieval
  • Selection
  • Permissions
  • Trust
  • Cost awareness
  • Human approval
  • Execution policies
  • Auditability
MCP tools as Marmo resources
MCP Server
    │
    ▼
MCP Tools
    │
    ▼
Marmo Resource Registry
    │
    ▼
Routing + Policy
    │
    ▼
AI Agent

10 / Reliability

Reliable agent execution

Agent systems need more than successful tool calls. Marmo Core includes infrastructure for handling failures and long-running execution.

Recoveryrecovery
Support retry, fallback, circuit breakers, and recovery strategies.
Statestate store
Persist execution state using in-memory, JSON, or SQLite-backed state stores.
Auditevent trail
Record execution activity using an auditable event trail.
Evaluationstatistics
Collect execution outcomes and operational statistics that can inform future routing decisions.

11 / In practice

Designed for real agent systems

Personal AI

Select relevant memories, skills, and tools based on the user’s current task.

User Request
     │
     ▼
Relevant Memory
     +
Required Skill
     +
Available Tool

Enterprise agents

Control access to internal systems through explicit permissions, trust policies, and audit logs.

Agent
  │
  ▼
Marmo Policy
  │
  ├── CRM
  ├── Database
  ├── Internal API
  └── External Service

Multi-agent systems

Discover specialized agents and dynamically delegate tasks according to their capabilities.

Main Agent
    │
    ▼
Marmo Router
    │
    ├── Research Agent
    ├── Coding Agent
    └── Review Agent

12 / Position

Why Marmo Core?

Most agent frameworks focus on defining workflows or orchestrating model calls. Marmo Core focuses on a different problem:

How should an agent discover, select, govern, and execute the capabilities available to it?

Its core principles are:

Unified resources

Treat Memory, Skill, Tool, and Agent as resources that can be managed through a common interface.

Dynamic routing

Select resources according to the task instead of exposing every capability to every agent.

Guarded execution

Separate model decisions from execution permissions.

Observable runtime

Keep execution state, decisions, failures, and audit information inspectable.

Framework agnostic

Use Marmo Core as infrastructure underneath existing agents, models, tools, and protocols.

13 / Architecture

Architecture

Task → search → selection → policy → execution → audit
                       User Task
                           │
                           ▼
                    ┌─────────────┐
                    │ Marmo Core  │
                    └──────┬──────┘
                           │
                    Resource Search
                           │
                           ▼
                  ┌─────────────────┐
                  │ Resource Router │
                  └────────┬────────┘
                           │
                  Resource Selection
                           │
                           ▼
                  ┌─────────────────┐
                  │ Policy Gateway  │
                  └────────┬────────┘
                           │
                       Activation
                           │
              ┌────────────┼────────────┐
              ▼            ▼            ▼
           Memory         Skill        Tool
                                         │
                                         ▼
                                      Agent
                           │
                           ▼
                       Execution
                           │
                           ▼
                    State + Audit

Build agents that know what to use.

Give your agents access to many capabilities without giving every capability to every task.

  • Search them
  • Select them
  • Guard them
  • Execute them
pip install marmo-core

Open source · Apache License 2.0 · Contributions, experiments, integrations, and feedback are welcome. → View the source on GitHub