Memory
Persistent or task-specific context that helps an agent make better decisions.
- User preferences
- Previous interactions
- Domain knowledge
- Task context
Open source · Python kernel
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
The problem
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:
Marmo Core provides a common layer for handling these decisions.
01 / Resource model
Marmo Core represents the capabilities available to an AI agent as four types of resources.
Persistent or task-specific context that helps an agent make better decisions.
Reusable instructions and workflows that describe how a task should be performed.
Executable capabilities that allow an agent to interact with software and external systems.
Specialized agents that can receive and execute delegated tasks.
02 / Shared metadata
Memory, Skill, Tool, and Agent resources share a common metadata model. Every resource can describe itself with the same set of fields:
This allows different kinds of resources to be searched, compared, selected, and governed through the same infrastructure.
Memory ─┐
Skill ─┤
Tool ─┼──► Resource Registry
Agent ─┘ │
▼
Retrieval
│
▼
Selection
│
▼
Execution
03 / Dynamic routing
Instead of exposing every available capability to an agent at once, Marmo Core retrieves and selects resources based on the current task.
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.
"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
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.
LLM
│
▼
Resource Selection
│
▼
Policy Gateway
│
▼
Permission Check
│
▼
Human Approval
│
▼
Runtime
│
▼
Audit Log
05 / Quick start
Marmo Core requires Python 3.10 or later.
pip install marmo-core
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)
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
Marmo Core also provides a command-line interface for validating, searching, and executing resources.
marmo validate resources/
marmo search resources/ \
--task "read a local text file safely"
marmo run resources/tools/validate-json.json \
--task "validate JSON input"
07 / Strategies
Marmo Core provides multiple strategies for resource discovery and routing.
Different strategies can be combined depending on the size of the resource registry and the requirements of the application.
08 / Integrations
Marmo Core is designed to sit between AI agents and the resources they use. It does not require replacing your existing tools or services.
AI Agent
│
▼
Marmo Core
│
┌────────────┼────────────┐
▼ ▼ ▼
MCP APIs Python
│ │ │
▼ ▼ ▼
Tools Services Systems
09 / MCP
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:
MCP Server
│
▼
MCP Tools
│
▼
Marmo Resource Registry
│
▼
Routing + Policy
│
▼
AI Agent
10 / Reliability
Agent systems need more than successful tool calls. Marmo Core includes infrastructure for handling failures and long-running execution.
11 / In practice
Select relevant memories, skills, and tools based on the user’s current task.
User Request
│
▼
Relevant Memory
+
Required Skill
+
Available Tool
Control access to internal systems through explicit permissions, trust policies, and audit logs.
Agent │ ▼ Marmo Policy │ ├── CRM ├── Database ├── Internal API └── External Service
Discover specialized agents and dynamically delegate tasks according to their capabilities.
Main Agent
│
▼
Marmo Router
│
├── Research Agent
├── Coding Agent
└── Review Agent
12 / Position
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:
Treat Memory, Skill, Tool, and Agent as resources that can be managed through a common interface.
Select resources according to the task instead of exposing every capability to every agent.
Separate model decisions from execution permissions.
Keep execution state, decisions, failures, and audit information inspectable.
Use Marmo Core as infrastructure underneath existing agents, models, tools, and protocols.
13 / Architecture
User Task
│
▼
┌─────────────┐
│ Marmo Core │
└──────┬──────┘
│
Resource Search
│
▼
┌─────────────────┐
│ Resource Router │
└────────┬────────┘
│
Resource Selection
│
▼
┌─────────────────┐
│ Policy Gateway │
└────────┬────────┘
│
Activation
│
┌────────────┼────────────┐
▼ ▼ ▼
Memory Skill Tool
│
▼
Agent
│
▼
Execution
│
▼
State + Audit
Give your agents access to many capabilities without giving every capability to every task.
pip install marmo-core
Open source · Apache License 2.0 · Contributions, experiments, integrations, and feedback are welcome. → View the source on GitHub