Problem action in frameset

I am developping an aplication, consisting of two databases. One of the db’s (DB1) contains a frameset with three frames. The left frame is used as a navigator. It contains a page with an outline from which view can be opened. One of right frames is used for displaying the views and is called “NotesView”. This is the targetframe for the outline-entries. The third frame is a small one above the NotesView-frame and is used as a button-bar. There are some actions placed which call agents with @Command([ToolsRunMacro];). The agents are in DB1. So far so good.When I open a view which is localized in the other database (DB2) and then click the action in the actionbar-frame, it says that the specified agent can not be found. When I open a view which is localized in DB1, in which also the agents are placed, the agent runs.

I have to place the agents to both databases, but this seems not the best solution for me.