Skip to Content
DocsPluginsComparisonChangelog
0
DocsChangelog

More

Discussionsllms.txtllms-full.txt
Getting startedWhat is concivComparisonRequirementsPlaygroundExamplesAPI reference

Engine and widgetSessionsHarnessesTools and code modeAgents and permissionsSkills

Use conciv
Bundlers
Agents
PluginsBuild your first plugin
Add a toolAsk for permissionAdd a skillShare an RPC methodCall from a terminalAdd a panelSlot or pillAdd settingsTest your plugin
Plugin API reference
PluginsGuides

Ask for permission

Make the user approve a tool call before it does something they would want to check.

Ask first when a tool changes something the user cares about: it deploys, deletes, pays or sends. The user gets a card in the chat. Your tool waits for the answer.

Ask before the tool acts

Call ctx.permission.assert at the start of the tool, before it acts:

conciv/plugins/release/server.ts
import {} from 'zod'
import {Plugin} from '@conciv/backend-plugin-api'

export default Plugin.({
  : 'release',
  async () {
    await ..(() => {
      .({
        : 'release_ship',
        : 'Ship a branch to production, once the user allows it.',
        : .({: .()}),
        : .({: .()}),
        : {: false},
        : async ({}, ) => {
          await ..({
            : 'release_ship', // <- a rule names this action
            : [], // <- what the action touches; rules match on it
            : [], // <- what "Allow always" remembers
            : 'ask', // <- ask even when only a catch-all rule allows it
            : {}, // <- shown on the card as the call's details
            : .,
            : .,
            : {: 'tool', : ., : .},
          })
          return {: {: true}}
        },
      })
    })
  },
})
conciv/plugins/release/server.ts
import {} from 'effect'
import {} from 'zod'
import {Plugin} from '@conciv/backend-plugin-api/effect'

export default Plugin.({
  : 'release',
  : () =>
    ..(() => {
      .
        : 'release_ship',
        : 'Ship a branch to production, once the user allows it.',
        : .
        : .
        : {: false},
        : ({}, 
          .
            .({
              : 'release_ship', // <- a rule names this action
              : [], // <- what the action touches; rules match on it
              : [], // <- what "Allow always" remembers
              : 'ask', // <- ask even when only a catch-all rule allows it
              : {}, // <- shown on the card as the call's details
              : .,
              : .,
              : {: 'tool', : 
            })
            .


A few things to notice:

  • The last three fields come from the tool context, the second argument of execute. They tie the card to this call in this chat.
  • agent is the engine's agent profile running the call. Its permission rules decide whether to ask. Learn more in the Agents and permissions documentation.
  • metadata is optional. The card shows it under its title, so pass what helps the user decide.
  • Without fallback: 'ask', an agent whose rules allow everything would never ask.

What the user sees

The chat shows a card titled with the action and its resources, here "release_ship main". It has three buttons:

  • Allow once. This call runs.
  • Allow always. This call runs, and the project remembers the save values for this action.
  • Deny. The call fails, and conciv tells the agent.

Your tool asks for permission

A scripted session in the real panel. It plays in your browser, with no server.

conciv / transcript

Your tool asks for permission

  1. You: Ship the release.

    The agent calls release_ship

    A permission card asks first: Allow once.

    Shipped 1.2.0. The tool asked first, and ran only after you allowed it.

Add an instruction…

A permission card, answered Allow once

When the user picks Deny, the call fails. In the Promise tab assert rejects. In the Effect tab a plain Deny interrupts your effect as a defect, so a typed handler never sees it. A deny rule, or a Deny with feedback, fails with a Tool.Error. Either way the agent reads that the user refused.

Ask on every call

Leave out save for a call that must ask every time. The card then has no Allow always button, so no saved answer can skip it later:

conciv/plugins/release/server.ts
import {} from 'zod'
import {Plugin} from '@conciv/backend-plugin-api'

export default Plugin.






















Next steps

  • Add a tool: the tool this page guards.
  • Test your plugin: check in a test that the call asks.
  • Approvals: what the user does with the card.

Add a tool

Give the agent a tool that runs your code, choose how the agent calls it, and draw its calls as your own card.

Add a skill

Ship instructions with your plugin, so the agent knows when and how to use its tools.

On this page

Ask before the tool actsWhat the user seesAsk on every callNext steps
Edit on GitHubView .mdOpen in ClaudeOpen in ChatGPT
})
}),
})
({
: 'release',
async () {
await ..(() => {
.({
: 'release_rollback',
: 'Roll production back to the last release, once the user allows it.',
: .
: {: false},
: async (,
await ..
: 'release_rollback',
: ['production'],
: 'ask',
: .,
: .,
: {: 'tool', :
})
return {: 'Production is back on the last release.'}
},
})
})
},
})
conciv/plugins/release/server.ts
import {} from 'effect'
import {} from 'zod'
import {Plugin























({
({
:
.
()}),
({
:
.
()}),
)
=>
.
,
:
.
},
(
.
({
: {
:
true
}})),
({}),
)
=>
{
({
.
,
:
.
},
}
from
'@conciv/backend-plugin-api/effect'
export default Plugin.({
: 'release',
: () =>
..(() => {
.({
: 'release_rollback',
: 'Roll production back to the last release, once the user allows it.',
: .
: {: false},
: (,
.
.({
: 'release_rollback',
: ['production'],
: 'ask',
: .,
: .,
: {: 'tool', :
})
.
})
}),
})
({}),
)
=>
.
,
:
.
},
(
.
({
:
'Production is back on the last release.'
})),