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

Add a panel

Add a tab to the session's pane, next to the chat, and draw your plugin's own screen in it.

A panel adds a tab next to the chat, for something your plugin shows all the time: a list, a log, a live run. You write the browser part in Solid, React, Preact or plain DOM. Pick a tab: the site keeps your pick on every page.

In React and Preact the panel lives in your app. Give it to <ConcivWidget> as in Build your first plugin. The widget's ctx.ui parts, such as Icon, are Solid components. The other tabs draw plain elements instead.

Copy this prompt into your agent. It builds this in your project from this page.

Prompt
Build this in my project with conciv. conciv is a dev-only AI agent widget, and it already runs in my app.

1. Read https://conciv.dev/docs/plugins/guides/panel.md and follow it. It is the source of truth for the API.
2. If the project has the conciv-develop skill (conciv init installs it with the @conciv/skills docs pack), load it too.
3. Add a tab to the conciv panel from my plugin.
4. If I did not say what it should do, ask me before you write code.
5. Write the browser part in the UI framework my app uses. For React or Preact, put it in my app with @conciv/react or @conciv/preact and give it to <ConcivWidget>, as the page shows. For anything else, use Solid in the plugin folder and build it as the page shows.
6. Install only the packages the page lists, with the package manager this project uses.
7. Tell me to open the conciv panel and look for the tab.
8. When you are done, tell me what you changed and how to see it.

Add a tab

Add the panel in your plugin's browser part:

conciv/plugins/plant-shelf/plugin-experimental.tsx
import {, Plugin, type PanelTab} from '@conciv/frontend-plugin-api'

export default Plugin.({
  () {
    const : PanelTab = {
      : 'shelf',
      : 'Shelf', // <- the tab's name, wherever the widget needs text
      : true, // <- always in the strip
      : () => (
        <>
          <.. ="box" ="small" />
          Shelf
        </>
      ), // <- what the strip draws; without it, the title
    }

    .(, {
      : 'shelf',
      : 'pane', // <- required, and the only region today
      : () => [],
      : () => <>Plants in {..}</>,
    })
  },
})
src/conciv/plant-shelf.tsx
import {, type PanelProps, type PanelTab, type Plugin} from '@conciv/frontend-plugin-api'
import {} from '@conciv/react'

const : PanelTab = {
  : 'shelf',
  : 'Shelf', // <- the tab's name, wherever the widget needs text
  : true, // <- always in the strip
}

function (: PanelProps) {
  return <>Plants in {..}</>
}

export const : Plugin. = () => {
  .(, {
    : 'shelf',
    : 'pane', // <- required, and the only region today
    : () => [],
    : (),
  })
}
src/conciv/plant-shelf.tsx
import {, type PanelProps, type PanelTab, type Plugin} from '@conciv/frontend-plugin-api'
import {} from '@conciv/preact'

const : PanelTab = {
  : 'shelf',
  : 'Shelf', // <- the tab's name, wherever the widget needs text
  : true, // <- always in the strip
}

function (: PanelProps) {
  return <>Plants in {..}</>
}

export const : Plugin. = () => {
  .(, {
    : 'shelf',
    : 'pane', // <- required, and the only region today
    : () => [],
    : (),
  })
}
conciv/plugins/plant-shelf/plugin-experimental.ts
import {, , Plugin, type PanelProps, type PanelTab} from '@conciv/frontend-plugin-api'

const : PanelTab = {
  : 'shelf',
  : 'Shelf', // <- the tab's name, wherever the widget needs text
  : true, // <- always in the strip
}

export default Plugin.({
  () {
    .(, {
      : 'shelf',
      : 'pane', // <- required, and the only region today
      : () => [],
      : <PanelProps>((, ) => {
        const  = .(.('p'))
        const  = .(() => {
          . = `Plants in ${.()..}` // <- runs now, and on every change
        })
        return () => {
          ()
          .()
        }
      }),
    })
  },
})

Your plugin adds a tab

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

conciv / transcript

Your plugin adds a tab

  1. You: Where do I find the shelf?

    Your plugin added a Shelf tab to the pane. Here it is.

    The reader clicks “Shelf”.

Add an instruction…

A plugin's tab next to the chat

A few things to notice:

  • title is the tab's name. The strip draws label when you give one, and the title when you do not.
  • list returns the tabs to show. It runs again when what it reads changes. Return a pinned tab every time.
  • render draws a tab's content once. Your component updates itself from then on.
  • props.session is the session on screen. Read it where you use it. It changes without a remount.

Build or wire it as in Build or wire the browser part, then reload.

Show a tab only some of the time

Return the tab from list only when it applies:

conciv/plugins/plant-shelf/plugin-experimental.tsx
import {, Plugin, type PanelTab} from '@conciv/frontend-plugin-api'

export default Plugin.










src/conciv/plant-shelf.tsx
import















src/conciv/plant-shelf.tsx
import















conciv/plugins/plant-shelf/plugin-experimental.ts
import {
















A tab that is not pinned shows only while the user has it open. When they close it, it leaves input.open. Build or wire it as in Build or wire the browser part, then reload.

Load data into the tab

Read from your engine part inside render. In Solid, use the widget's query hooks from @conciv/client, so the data shares the widget's cache. The tutorial did not install it. The widget provides it at run time, and the install gives your editor its types:

npm install -D @conciv/client
pnpm add -D @conciv/client
yarn add --dev @conciv/client
bun add --dev @conciv/client

Those hooks are Solid hooks. The other tabs call the method themselves:

conciv/plugins/plant-shelf/plugin-experimental.tsx
import {




















src/conciv/plant-shelf.tsx
import



























src/conciv/plant-shelf.tsx
import




























conciv/plugins/plant-shelf/plugin-experimental.ts
import {
























ctx.client.rpc(Shelf) calls your engine part through its contract. See Share an RPC method. Build or wire it as in Build or wire the browser part, then reload.

Next steps

  • Add a slot or composer pill: smaller places for your plugin in the widget.
  • Share an RPC method: the methods your panel reads.

Call from a terminal

Run one of your plugin's RPC methods on the running engine with npx @conciv/cli plugin call, and read its JSON answer.

Slot or pill

Put a small piece of your plugin at a fixed place in the widget, or a pill above the composer.

On this page

Add a tabShow a tab only some of the timeLoad data into the tabNext steps
Edit on GitHubView .mdOpen in ClaudeOpen in ChatGPT
() {
const : PanelTab = {: 'report', : 'Report'}
.
: 'report',
: 'pane',
: (
: () => <>The last report</
})
},
})
{
,
type
PanelTab
,
type
Plugin
}
from
'@conciv/frontend-plugin-api'
import {} from '@conciv/react'
const : PanelTab = {: 'report', : 'Report'}
function () {
return <>The last report</>
}
export const : Plugin.
.
: 'report',
: 'pane',
: (
: (
})
}
{
,
type
PanelTab
,
type
Plugin
}
from
'@conciv/frontend-plugin-api'
import {} from '@conciv/preact'
const : PanelTab = {: 'report', : 'Report'}
function () {
return <>The last report</>
}
export const : Plugin.
.
: 'report',
: 'pane',
: (
: (
})
}
,
,
Plugin
,
type
PanelProps
,
type
PanelTab
}
from
'@conciv/frontend-plugin-api'
const : PanelTab = {: 'report', : 'Report'}
export default Plugin.
() {
.
: 'report',
: 'pane',
: (
:
const = .(.
. = 'The last report'
return () => .()
}),
})
},
})
}
from
'@conciv/client'
import {
import {
export default Plugin.
() {
const : PanelTab = {: 'shelf', : 'Shelf', : true}
.
: 'shelf',
: 'pane',
: () => [],
: () => {
const =
: ['plant-shelf', 'fern'], // <- start with your plugin's id, so keys never clash
: () =>
}))
return <>{.
},
})
},
})
{
,
,
}
from
'react'
import {
import {} from '@conciv/react'
import {
const : PanelTab = {: 'shelf', : 'Shelf', : true}
function (
const =
return <>{ ? `${.
}
export const : Plugin.
function () {
const [] =
.
.(
.
.
) // <- one call each time the tab opens
return (
<
<
</>
)
}
.
}
{
,
}
from
'preact/compat'
import {} from 'preact/hooks'
import {
import {} from '@conciv/preact'
import {
const : PanelTab = {: 'shelf', : 'Shelf', : true}
function (
const =
return <>{ ? `${.
}
export const : Plugin.
function () {
const [] =
.
.(
.
.
) // <- one call each time the tab opens
return (
< ={<>Counting</>}>
<
</>
)
}
.
}
,
,
Plugin
,
type
PanelTab
}
from
'@conciv/frontend-plugin-api'
import {
const : PanelTab = {: 'shelf', : 'Shelf', : true}
export default Plugin.
() {
.
: 'shelf',
: 'pane',
: () => [],
:
const = .(.
. = 'Counting'
.
.(
.
.
() => (. = `${
() => (. = 'The shelf did not answer'),
) // <- one call each time the tab opens
return () => .()
}),
})
},
})
({
(
, {
)
=>
(
.
.
(
'report'
)
?
[
]
:
[]),
// <- open: your tabs the user has open
>,
=
(
)
=>
{
(
, {
)
=>
(
.
.
(
'report'
)
?
[
]
:
[]),
// <- open: your tabs the user has open
),
=
(
)
=>
{
(
, {
)
=>
(
.
.
(
'report'
)
?
[
]
:
[]),
// <- open: your tabs the user has open
),
({
(
, {
)
=>
(
.
.
(
'report'
)
?
[
]
:
[]),
// <- open: your tabs the user has open
<
PanelProps
>((
)
=>
{
(
'p'
))
,
Plugin
,
type
PanelTab
}
from
'@conciv/frontend-plugin-api'
}
from
'./rpc'
({
(
, {
(()
=>
({
.
.
(
).
({
:
'fern'
}),
?
`${
.
.
} ferns`
:
'Counting'
}</
>
,
type
PanelTab
,
type
Plugin
}
from
'@conciv/frontend-plugin-api'
}
from
'../../conciv/plugins/plant-shelf/rpc'
:
{
readonly
:
<{
readonly
:
number
}
|
undefined
>}) {
(
.
)
// <- suspends until the call ends
} ferns`
:
'The shelf did not answer'
}</
>
=
(
)
=>
{
(()
=>
)
({
:
'fern'
})
(()
=>
),
=
{<
>Counting</
>}>
=
{
} />
(
, {
:
'shelf'
,
:
'pane'
,
: ()
=>
[
],
:
(
)})
,
type
PanelTab
,
type
Plugin
}
from
'@conciv/frontend-plugin-api'
}
from
'../../conciv/plugins/plant-shelf/rpc'
:
{
readonly
:
<{
readonly
:
number
}
|
undefined
>}) {
(
.
)
// <- suspends until the call ends
} ferns`
:
'The shelf did not answer'
}</
>
=
(
)
=>
{
(()
=>
)
({
:
'fern'
})
(()
=>
),
=
{
} />
(
, {
:
'shelf'
,
:
'pane'
,
: ()
=>
[
],
:
(
)})
}
from
'./rpc'
({
(
, {
((
)
=>
{
(
'p'
))
)
({
:
'fern'
})
(
.
} ferns`
),