Introduction
A CrabTalk service is a Rust program compiled to WebAssembly, with its own database, whose tools your agents, apps and other services call over HTTP.
A service belongs to one account, yours or an org's, and is addressed as {owner}/{name}. The API is at https://api.crab.talk.
A service
- Tools. Every
pub fnin the program's#[berm_lang::program]module is a tool. A tool takes a JSON object and answers JSON. - Public tools. Only a tool marked
#[public]can be called from outside the service. See Access. - Data. A service keeps its data between calls in its own SQLite database. See Data.
- Work on its own. A
#[cron]tool runs on a schedule, and a call can schedule a later call. See Crons and wakes. - Bounds. Each call is bounded by its tool's budget of wasm instructions and rows. See Budgets.
Programs are written in Rust against berm-lang. Writing a program covers tools, arguments, errors, queries and events.
Who calls it
| Caller | How | |
|---|---|---|
| Your agents, scripts and servers | POST /services/{owner}/{name}/tools/{tool} with an API key |
Calling a tool |
| Browsers | The same route, through an app you register | From your app |
| Your other services | berm_lang::call inside a program |
From another service |