@cotofe/agent-kit
v0.1.4
Published
<h1 style="text-align: center; font-size: 42px; font-weight: bold;" > AgentKit </h1>
Downloads
13
Readme
Getting Started
Install
npm install @cotofe/agent-kitUse
import { createAgentKit } from '@cotofe/agent-kit'
const kit = createAgentKit(...options)Plugin
Register plugin
// ...
kit
.use(plugin)
.use(plugin2, {})How to write a plugin
import { createPlugin } from '@cotofe/agent-kit'
function Widget(props, ctx) {
return (
<div>
Hello
{props.name}
</div>
)
}
const weatherTool = createPlugin({
id: 'weather',
hooks: {
},
view: {
type: 'tool-widget',
render: Widget,
},
})
export default pluginRender
import {
MessageItemUI,
MessagesProvider,
ToolWidgetUI,
} from '@cotofe/agent-kit/react'