Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

mosaico-base-agent

Latest version: v0.4.3

Overview

Last scanned
1 Dec 2026
Published
1 Dec 2026
PyPI package Publisher: agarcdomi, org:mosaico
2 Versions
133 Downloads

Scan summary

mosaico-base-agent was last scanned on 1 Dec 2026 at version 0.4.3. Risk score 5 of 100 (low). No malicious behavior was detected.

  • Releases: 2 versions, all published within 7 days (25 Nov – 1 Dec 2026).
  • Findings: 1 rule fired in version 0.4.3 (1 low). The score describes this version only.
  • Downloads: 133 downloads.

Versions

2 versions published
Versions and the rules that fired in each
VersionPublishedStatus
0.4.3 LATEST 1 Dec 2026 1 rule fired
0.4.2 25 Nov 2026 No rules fired

Rules fired in 0.4.3: 1

Findings

1 Low

Findings for v0.4.3. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.

Maintainer or owner changed

The package's maintainer or owner differs from the previous version. This is usually benign, such as a transfer or reorganization, but account takeovers look the same at first. Shown for awareness.

LOW
Checking access…

🔒 Create a free account to see all 1 finding with descriptions and instance counts

The score describes 0.4.3; other versions have their own rules, not their own score.

README

The publisher’s own README, as collected from the registry.

MOSAICO Base Agents: Technical Guide

This mosaico-base-agents library provides:

  • base executor classes
  • testing support
  • observability
  • client-side tool use
  • support for defining Mosaico agents

Adding the library to your Python project

You must add the library as a dependency in your project's pyproject.toml as follows:

dependencies = [
    "mosaico-base-agent"
]

The library provides optional features through dependency extras. Include the extras required by your application when declaring the dependency. For example, to use LLM-enabled agents, add the llm extra:

dependencies = [
    "mosaico-base-agent[llm]"
]

mosaico-base-agent is published to PyPI from version 0.4.2 onwards, so it can be added from the root of the project that imports this library (the directory containing its pyproject.toml) without any extra configuration:

uv add "mosaico-base-agent[llm]"

Releases are also published to the Eclipse GitLab package registry. To install from that registry instead (e.g. for versions before 0.4.2), instruct uv to use it as an additional index:

uv add mosaico-base-agent --index https://gitlab.eclipse.org/api/v4/projects/12942/packages/pypi/simple

Base executor classes

A base executor class defines the core behaviour of an agent. Currently, there are several classes of base agent executors: MosaicoAgentExecutor, BDIAgentExecutor, LLMAgentExecutor, BaseLGReactAgentExecutor, LGReactAgentExecutor, and LGClientToolUseAgentExecutor. There are also three supervision agent executors: PassFailReactSupervisionAgentExecutor, ScoringReactSupervisionAgentExecutor, and CategoryReactSupervisionAgentExecutor.

All base agent executor classes inherit, either directly or indirectly, from AgentExecutor, and consequently conform to the a2a.server.agent_execution.agent_executor.AgentExecutor type. This abstract base class defines the execute method for executing the agent's logic for a given request context and the cancel method for requesting the cancellation of an ongoing task.

The base agent executor classes are related by the following inheritance hierarchy:

  • AgentExecutor (A2A SDK)
    • MosaicoAgentExecutor
      • BDIAgentExecutor
      • LLMAgentExecutor
      • LGClientToolUseAgentExecutor
      • BaseLGReactAgentExecutor
        • LGReactAgentExecutor
        • PassFailReactSupervisionAgentExecutor
        • ScoringReactSupervisionAgentExecutor
        • CategoryReactSupervisionAgentExecutor
MosaicoAgentExecutor

MosaicoAgentExecutor represents the most bare-bones, rudimentary form of an agent, enabling support for observability by default. The relevant defined methods are the following:

  • execute - It handles the execution of an incoming request, extracts observability metadata from the request, and configures a Langfuse trace hierarchy for the agent execution.
  • send_message - It sends a message from the agent to the A2A event queue
  • send_text_message - It sends a text message from the agent to the A2A event queue

Subclasses of MosaicoAgentExecutor are expected to implement the following methods:

  • execute_agent - It defines the agent's behaviour. This method is invoked by execute after observability and tracing have been configured. ArithmeticExecutor is an example of a subclass of MosaicoAgentExecutor, demonstrating how the execute_agent method can be overridden.
@override
async def execute_agent(
        self,
        context: RequestContext,
        event_queue: EventQueue,
        observability_metadata: Optional[MosaicoObservabilityMetadata]) -> None:
# execute agent's business logic
  • health - It performs a health check of the agent. The following example shows a health implementation returning "OK" when the agent is functioning correctly.
@override
async def health(self) -> str:
    return HEALTH_OK
BDIAgentExecutor

BDIAgentExecutor represents an agent that handles performatives in its incoming and outgoing messages. It extends MosaicoAgentExecutor, and therefore inherits observability by default. PingableAgentExecutor is an example of a subclass of BDIAgentExecutor. Note that if your project uses BDIAgentExecutor, in the dependencies of your pyproject.toml, you must use the acl extra, as follows:

dependencies = [
    "mosaico-base-agent[acl]"
]

The relevant defined methods are the following:

  • execute_bdi - Same use as execute but with an extra parameter that specifies the performative in the incoming message.
  • send_bdi_message - Same as send_message, but with an extra parameter to specify a performative in the outgoing message.
  • send_text_bdi_message - Same as send_text_message, but with an extra parameter to specify a performative in the outgoing message.

(Unstable) Those methods take also an additional parameter, codec, to specify how to decode the content of the message (to be documented later).

LLMAgentExecutor

LLMAgentExecutor represents the most rudimentary form of LLM-enabled agent, and supports LLM calls by default. It extends MosaicoAgentExecutor, therefore inherits observability by default. BasicLLMAgentExecutor is an example of a subclass of LLMAgentExecutor. Note that if your project uses LLMAgentExecutor, in the dependencies of your pyproject.toml, you must use the llm extra.

The relevant defined methods are the following:

  • llm_completion - It sends a request to an LLM via LiteLLM.
  • llm_first_choice_text - It is a convenience wrapper around llm_completion that returns only the text content of the first response choice.
  • health - It performs a health check of the agent by checking the configured LLM and its availability (see Health checks).
BaseLGReactAgentExecutor

BaseLGReactAgentExecutor represents a base executor for developing agents based on LangGraph with the ReAct architecture. It combines observability facilities with LangGraph's ReAct agent architecture, allowing agents to dynamically reason about their next actions and invoke tools accordingly. This class is not meant to be instantiated on its own: subclasses must override _handle_result to turn a completed graph run into the agent's output artifacts.

The relevant defined methods are the following:

  • invoke_graph - It initialises the corresponding A2A task, when necessary, and asynchronously executes the LangGraph agent graph, including its ReAct reasoning and tool-calling process.
  • execute_agent - It defines the agent's behaviour. Specifically, it validates the incoming message through validate_message_parts, transforms it through transform_message_parts, executes the LangGraph agent graph through invoke_graph, and delegates to _handle_result to add the resulting artifacts to the A2A task.
  • validate_message_parts - It checks that the incoming message has the expected parts. By default, it requires some text content. Override it if your agent needs different validation, e.g. requiring files or limiting the number of parts.
  • transform_message_parts - It turns the incoming message into the graph's input. By default, it joins the text parts into a single message for the LLM. Override it if your agent needs a different transformation.
  • _handle_result (abstract) - It is intended to turn a completed graph run's result into the agent's output artifacts. Subclasses must override this method.
  • health - It performs a health check of the agent by checking the configured LLM and its availability (see Health checks).

The MosaicoReactMiddleware middleware is used to stream intermediate execution updates produced by the ReAct agent through the A2A infrastructure. In particular, it propagates tool calls and their results as task status updates while the agent is executing.

LGReactAgentExecutor is a concrete subclass of BaseLGReactAgentExecutor. It implements _handle_result by taking the graph's final message as the agent's answer and reporting this answer as a solution artifact. Additionally, if that message also includes a separate thinking segment from the model, it is reported as an explanation artifact.

Note that if your project uses LGReactAgentExecutor, you must use the langchain extra in the dependencies of your pyproject.toml, as follows:

dependencies = [
    "mosaico-base-agent[langchain]"
]
Supervision Agent Executors

langgraph_react_executor.py defines three supervision agent executors, all subclassing BaseLGReactAgentExecutor: PassFailReactSupervisionAgentExecutor, ScoringReactSupervisionAgentExecutor, and CategoryReactSupervisionAgentExecutor. Each implements _handle_result to report an evaluation artifact - a data part holding, respectively, an accept/reject verdict, a numeric score, or a selected category - together with an explanation artifact describing the rationale of the evaluation.

These executors obtain the evaluation from the LLM as a structured response through the supervision abstractions (PassFailEvaluation, ScoreEvaluation, and CategoryEvaluation, respectively), which are Pydantic models passed to the agent as its response format.

For testing workflows that involve a supervisor without calling an LLM, the mock supervision agent subclasses MosaicoAgentExecutor directly and replies with the same evaluation and explanation artifacts, using a predefined pass/fail verdict, score, or category configured through environment variables.

LGClientToolUseAgentExecutor

LGClientToolUseAgentExecutor represents a base executor for LangGraph ReAct agents whose tools are executed by the client rather than by the agent itself. Unlike LGReactAgentExecutor, its tools are not known at construction time: the client declares them on the initial request of each task, so the tool set is built dynamically per session. It extends MosaicoAgentExecutor, therefore inherits observability by default. Note that if your project uses LGClientToolUseAgentExecutor, in the dependencies of your pyproject.toml, you must use the langchain extra, as follows:

dependencies = [
    "mosaico-base-agent[langchain]"
]

A subclass only needs to supply a system_prompt; the other parameters are optional:

  • system_prompt - The instructions given to the model at the start of every run, defining the agent's persona and how it should use the tools it is offered.
  • tool_call_limit - The maximum number of tool calls the agent may request over a single run, enforced by LangGraph's ToolCallLimitMiddleware. It defaults to None, meaning no limit.
  • session_ttl_seconds - How long a paused session is kept while the agent waits for the client to return its tool results. Sessions idle for longer than this are evicted by a background sweep, so a client that abandons a task part-way through an exchange cannot leave its graph in memory indefinitely. It defaults to 3600, i.e. one hour.
  • agent_tools - Agent-side tools (LangChain tools or plain callables), run locally by the agent alongside the client's tools. It defaults to None.

The relevant defined methods are the following:

  • execute_agent - It defines the agent's behaviour. It initialises the corresponding A2A task, when necessary, and routes the request either to the resumption of a paused session, when it carries tool-call results, or, failing that, to a new session built from the tool definitions it carries.
  • build_tools - It turns the client-provided tool definitions into LangGraph tools. It is the hook to override in order to filter or re-describe them. Every tool it returns is requested from the client rather than executed locally, so tools of the agent's own are passed through the agent_tools parameter instead.
  • health - It performs a health check of the agent by checking the configured LLM and its availability (see Health checks).

The exchange with the client is governed by the client-side tool use A2A extension, which an agent built on this executor must declare in its agent card. The executor can also run tools of its own alongside the client's, as described in Agent-side tools.

Health checks

Every agent exposes a /health endpoint, which calls the executor's health method. It returns HTTP 200 when health returns "OK", and HTTP 503 with the returned message otherwise.

/health is a readiness check: it answers "can this agent do its task right now?". For LLM-enabled executors (LLMAgentExecutor, BaseLGReactAgentExecutor and LGClientToolUseAgentExecutor), this means that the configured model name can be mapped to a LiteLLM provider, and that the model answers a short user message ("Say ping", limited to 10 tokens). The probe uses the same provider-specific options as the agent's own calls (see completion_kwargs).

Do not use /health as a liveness check: restarting an agent cannot fix an LLM outage, and would only make it take longer to recover. To check that the agent process is responding, use the agent card URL (/.well-known/agent-card.json) instead. For example, in Kubernetes:

readinessProbe:
  httpGet:
    path: /health
    port: 9000
livenessProbe:
  httpGet:
    path: /.well-known/agent-card.json
    port: 9000

Since every probe of an LLM-enabled agent is a model call, the result of health is reused for HEALTH_CACHE_SECONDS seconds (10 by default, 0 disables this). Concurrent probes share a single model call, and failures are cached as well, so frequent probes from several agents do not overload a shared LLM server.

Testing

Currently, there are two classes that should be subclassed when carrying out unit testing:

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.

Where it’s listed

The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).

  • pypi-releases mosaico-base-agent

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Powered by Read the latest findings

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

PolinRider Returns
Research

PolinRider Returns: Hijacked npm Packages Use Ethereum Blockchain to Conceal Malware Infrastructure

Ethersphere Hijacked With Crypto Stealing Malware (1)
npm

Ethersphere Hijacked With Crypto Stealing Malware Via Github & npm

Critical Apache HTTP Server Flaw Exposes Web Servers to RCE (1)
CVE

CVE-2026-119618: Critical Apache HTTP Server Flaw Exposes Web Servers to Remote Code Execution

Frame 2085668439 (1)
Group 1261154229