mloda
Give an AI agent declarative, deterministic data access via mloda (https://github.com/mloda-ai/mloda) - a Python plugin framework where the caller describes WHAT features or data it needs and mloda resolves HOW to compute or fetch them across a plugin graph, with built-in lineage back to source. Use when an agent needs to check whether an existing mloda plugin already covers a requested feature (see the `mloda-plugins` skill for writing a new one), before requesting structured data or feature aggregations as a tool call instead of writing ad hoc fetch/transform code (the "LLM Tool Function" pattern), assembling a multi-source context window declaratively, or chaining retrieval/validation/redaction steps for a RAG pipeline by feature name.
- License 许可
- MIT
- 最近更新
- 2026-11-15
- Stars
- ★ 6
- Forks
- 0
01 前言 Front Matter
- name
- mloda
- license
- MIT
- description
- Give an AI agent declarative, deterministic data access via mloda (https://github.com/mloda-ai/mloda) - a Python plugin framework where the caller describes WHAT features or data it needs and mloda resolves HOW to compute or fetch them across a plugin graph, with built-in lineage back to source. Use when an agent needs to check whether an existing mloda plugin already covers a requested feature (see the `mloda-plugins` skill for writing a new one), before requesting structured data or feature aggregations as a tool call instead of writing ad hoc fetch/transform code (the "LLM Tool Function" pattern), assembling a multi-source context window declaratively, or chaining retrieval/validation/redaction steps for a RAG pipeline by feature name.
02 资源文件 1
- 参考文档skill-report.json32.6 KB
03 SKILL.md 正文
mloda: Declarative Data Access for AI Agents
Check the registry index first
Always do this before hand-writing a chain step. mloda-registry's community set covers common {col}__{op}
transforms: aggregation, window/scalar/frame aggregate, scalar/point arithmetic, rank, offset, percentile,
binning, datetime, string ops, time bucketization, ffill, ema, sessionization, resample. None of it ships with
plain pip install mloda; install what you need, e.g. pip install mloda-community (all) or
pip install "mloda-community-rank[pandas]" (one). See its
plugins table for the full list and feature-name
patterns.
The table drifts, so once installed, confirm what's actually loaded rather than trusting a static list:
from mloda.user import PluginLoader
from mloda.steward import get_feature_group_docs
PluginLoader.all()
for fg in get_feature_group_docs():
print(fg.name, fg.description)
This only reflects installed packages: an empty or unrelated result means the plugin isn't installed yet, not that it doesn't exist.
Nothing covering it? See the mloda-plugins skill for how to write a FeatureGroup, ComputeFramework, or
Extender.
Mental model
mloda separates WHAT a caller needs from HOW it gets computed. A caller (human or LLM) requests
features by name; mloda resolves dependencies across a plugin graph and executes them on a compute framework
(PandasDataFrame, PyArrowTable, PythonDictFramework, ...), returning the result with lineage back to
source.
Three plugin types, most work happens in the first:
| Type | Role |
|---|---|
| FeatureGroup | Defines a data transformation - the unit you'll write most often |
| ComputeFramework | Execution backend the transformation runs on |
| Extender | Hooks for logging, validation, monitoring |
Roles map to modules: mloda.provider (define plugins), mloda.user (request data), mloda.steward
(govern execution).
When to reach for mloda
- The agent should declare a data/feature request as a tool call instead of writing ad hoc fetch/transform code (see "LLM Tool Function" below).
- Multiple context sources (system prompt, user profile, retrieved docs, history) need declarative assembly before being handed to a model.
- A RAG pipeline needs chained steps (retrieve -> validate -> redact) expressed as a feature name or config instead of hand-wired code.
- You need to check whether a requested feature is already covered by a plugin before writing new code (see
"Check the registry index first" above); to write one instead, see the
mloda-pluginsskill.
LLM Tool Function pattern
The agent emits a feature request as JSON, no Python required from the agent itself:
from mloda.user import PluginLoader, load_features_from_config, mloda
PluginLoader.all() # every mloda example calls this once before the first run_all()
llm_output = '''
[
"customer_id",
{"name": "income__sum_aggr"},
{"name": "total_spend", "options": {"aggregation_type": "sum", "in_features": "income"}}
]
'''
features = load_features_from_config(llm_output, format="json")
result = mloda.run_all(
features=features,
compute_frameworks=["PandasDataFrame"],
api_data={"SampleData": {"customer_id": ["C001", "C002"], "income": [50000, 75000]}},
)
api_data inlines data under a label (e.g. "SampleData"); features are matched to columns by name. For
data on disk, pass a DataAccessCollection instead (see mloda's
API Request docs).
Feature-name chaining
A chain like documents__retrieved__pii_redacted expresses a pipeline without wiring it by hand - if you ask
for pii_redacted, mloda traces that it depends on retrieved, which depends on documents, and resolves
the whole chain from the single requested name:
Feature(name="user_query__injection_checked__retrieved__pii_redacted")
This only works when a FeatureGroup plugin exists for every step in the chain - the chaining syntax alone does not fetch data mloda has no plugin for.
Latency-sensitive / repeated requests
mloda.run_all() rebuilds the full execution plan every call, fine for batch jobs but wasteful when the same
features are recomputed per request (model serving, streaming, dashboards). Use the two-phase API to plan
once and execute cheaply per request:
session = mloda.prepare(features, compute_frameworks=["PyArrowTable"], data_access_collection=data_access_collection)
result = session.run(api_data={"MyKey": {"col": [1, 2]}})
Reference
- Docs: https://mloda-ai.github.io/mloda/
- Install:
pip install mloda - Source: https://github.com/mloda-ai/mloda
04 同仓库更多 Skills
serpmaven
Scrape Google search results (SERP) to JSON with SERP Maven (serpmaven) - a real Chrome browser on a residential proxy with sticky sessions. Run it as a CLI, a Python library, a local HTTP search API (`serve`), an MCP server or a Docker image; set the proxy login, workers, pages and cost tracking. Use when the user wants Google results, rank tracking, a self-hosted SERP API, or live Google search for an AI agent.
revnu-landing-page-audit
Find out why a landing page isn't turning visitors into signups, demos or sales. Audits one page against what the ad, post or search that sends people there promised, then checks the first screen, proof, call to action, friction and mobile. Returns at most 7 prioritized fixes, plus what is fine and what could not be checked; rewrites specific lines and fixes the page in the repo when asked. Never promises a conversion lift. Works without a Revnu account. Use when the user says or asks: "audit my landing page", "why isn't this page converting", "review my homepage", "my ads get clicks but no signups", "people bounce from the pricing page", "CRO review", "improve conversion rate", "is my hero section clear", "roast my landing page", "rewrite my headline", "what's wrong with this page", "landing page feedback", "make the signup page convert better". Not for SEO or AI-search audits, page speed engineering on its own, or building a new page from scratch.
revnu-growth-context
Write down once who buys, what they're stuck on, what it costs, what proof you have and what you've already tried, so every growth task starts from facts instead of a questionnaire. Creates or updates .agents/revnu-growth.md from the repo, the live site and the user, and imports an existing product-marketing.md. Use when the user says "set up our marketing context", "who is our ideal customer", "write our ICP", "describe the product for marketing", "positioning doc", "what's our brand voice", "remember this about our customers", "log what we tried", "what have we learned from marketing", "we changed pricing, update the context", "update our growth notes", "summarize the business for the agent", "import my product-marketing.md", "start a growth doc", or before a first marketing, SEO, outreach or launch task when no context file exists. Works without a Revnu account.
revnu-get-listed
Get onto the third-party pages AI answers and search cite when buyers ask for the best tool in your category: "best X" roundups, directories, review sites, GitHub awesome lists, community threads and comparison pages. Finds which ones are cited, ranks them by fit and effort, and drafts each submission, PR or pitch by the target's own rules. Use when the user says "get us listed", "which directories should we submit to", "how do we get into best-of lists", "why does ChatGPT recommend competitors and not us", "get mentioned in AI answers", "submit to awesome lists", "get on G2", "where are our competitors listed", "pitch listicle authors", "find backlink opportunities", "launch directories", "get into roundups", "Product Hunt alternatives", "where should we be listed", "get cited by Perplexity". Never submits, pays or posts without a yes. Works without a Revnu account.
revnu-ai-readiness-audit
Audit whether your website gives ChatGPT, Perplexity, Claude, Gemini and Google's AI Overviews something worth quoting, and fix the pages that don't. Use when the user says or asks "is my site ready for AI search", "audit my site for AI answers", "AEO audit", "GEO audit", "why doesn't ChatGPT quote our pricing", "make our pages citable by AI", "do I need llms.txt", "does schema help with ChatGPT", "check our structured data", "is our content visible without JavaScript", "AI SEO audit", "optimize our homepage for AI answers", "LLM SEO check", "why does AI get our product wrong", "fix our site for AI Overviews". Checks fetchability and indexability, answers in the raw HTML, entity facts, schema (including JS-injected markup), headings, dates and llms.txt, then gives at most 10 prioritised fixes and edits the repo when asked. Works without a Revnu account.
proxy-troubleshooting
Diagnose residential proxy failures, with NodeMaven's gateway as the reference - 407 with correct credentials, 406, 410, 500, a connection that hangs, ERR_TUNNEL_CONNECTION_FAILED in a browser, Playwright or Puppeteer ignoring proxy credentials, a sticky session that changes IP, geo-targeting that is silently ignored, passwords with special characters, and unexpected traffic from headless Chrome. Use when a proxy connection fails, returns the wrong location, or costs more traffic than expected.