Skip to main content
Hand the design of a compensation to Qobra’s compensation agent, the agent the web app calls the Architect. Each call runs one turn of a conversation in which the agent builds, changes or explains a compensation’s calculation: scopes, fields, formulas, tiers, accelerators and payout. Use it when the user wants a compensation built or changed from a description in their own words (“pay 5% of every closed deal”), or wants to understand why a compensation computes what it does.

Start and continue a conversation

Start a conversation with an instruction and the compensation_id to work on. get_plan lists a plan’s compensations, and create_compensation opens an empty one. Every later call of the same work passes back the conversation_id the first call returned, a retry included. Without it, Qobra starts a new conversation and the agent loses what was said. Qobra refuses an instruction sent while a turn is still running in the conversation.

Read the result

status says where the turn stands:
  • answered: the turn is over. Relay answer to the user.
  • awaiting_user: the agent paused on a question (pending_question) or on a plan of changes to validate (pending_plan). The client shows it to the user as it is, waits for their reply, and sends that reply as the next instruction with the same conversation_id. Approving a plan is the user’s decision, not the model’s.
  • running: the turn is still going. Each call waits up to 45 seconds, and a turn can take several minutes. Call get_compensation_agent_turn with the conversation_id to keep waiting.
A turn that ends on an error is raised as a tool error that names the conversation, so the client can send the instruction again in it.

Draft only, never published

The agent saves what it changes as the compensation’s draft. Nothing reaches a statement until the draft is published, with update_compensation (status: 'live' or a go_live_date) or from the Qobra web app. Each turn starts from the latest draft, including one edited in the app meanwhile. The result’s compensation is the live compensation, in the same shape get_plan lists it. Its id is the compensation_id to pass to update_compensation and to every later call. Its other fields and its resource_url, the link that opens the draft to review, are read off the draft. saved is true when the turn’s changes were saved as the draft. It is false when nothing was saved, and save_note says why.

Availability

The tool is open to every company with the MCP enabled. Qobra hides it at discovery unless:
  • AI is switched on for the company and the Architect is switched on in the AI settings.
  • The caller’s role has write access on plan compensations, as in the web app.
  • The connection was granted the mcp:write scope. See Scopes.
Each user can start at most 10 agent turns per minute, across ask_compensation_agent and ask_report_agent. Past that, the call starts nothing and says how many seconds to wait before calling again in the same conversation. When the company’s AI budget is spent, or Qobra’s AI agents are at capacity, the call is refused and starts nothing. The error says which, so the client can tell the user to wait for Qobra to restore access or to try again shortly.

Parameters

Body

string
required
What to ask or tell the agent, in the user’s words, or the user’s answer to the question or plan it is waiting on.
string
Id of the compensation to work on, as get_plan lists it or create_compensation returns it. Needed to start a conversation; when passed with a conversation_id it must be that conversation’s compensation.
string
Id of a conversation of yours to continue, as an earlier ask_compensation_agent call returned it. Omit it only to start a new conversation on compensation_id.

Response

Body

string
‘answered’: the turn is over, its reply is in answer. ‘awaiting_user’: it paused on a question (pending_question) or a plan to validate (pending_plan): show it to the user and send their reply with ask_compensation_agent, in this conversation. ‘running’: the turn goes on; call get_compensation_agent_turn with this conversation_id. One of: answered, awaiting_user, running.
string
The conversation of this turn. Pass it back on every follow-up call.
string
The agent’s reply when status is ‘answered’, to relay to the user. Null otherwise.
object
The question the agent is waiting on, with the options it offers (multi_select: several may be picked; the user may also answer in their own words). Set only when status is ‘awaiting_user’.
object
The changes the agent proposes, waiting for the user to approve or amend them; it applies nothing before. Set only when status is ‘awaiting_user’.
object
The compensation the turn worked on, as get_plan lists it: its id is the compensation_id of every later call, and update_compensation with that id and status ‘live’ publishes the turn’s draft. Its other fields and its resource_url, which opens the draft to review, are read off that draft when one is stacked on it.
boolean
True: the turn’s changes were saved as the compensation’s draft, which no statement reads until it is published. False: nothing was saved, save_note says why. Null while a turn runs, and for a turn asked from the web app, which saves from its own page.
string
Why nothing was saved, to tell the user. Null when the turn was saved or is still running.