productivity
wallabag Lua API for KosmoKrator Agents
Agent-facing Lua documentation and function reference for the wallabag KosmoKrator integration.Lua Namespace
Agents call this integration through app.integrations.wallabag.*.
Use lua_read_doc("integrations.wallabag") inside KosmoKrator to discover the same reference at runtime.
Call Lua from the Headless CLI
Use kosmo integrations:lua when a shell script, CI job, cron job, or another coding CLI should run a deterministic
wallabag workflow without starting an interactive agent session.
kosmo integrations:lua --eval 'dump(app.integrations.wallabag.password_token({}))' --json kosmo integrations:lua --eval 'print(docs.read("wallabag"))' --json
kosmo integrations:lua --eval 'print(docs.read("wallabag.password_token"))' --json Workflow file
Put repeatable logic in a Lua file, then execute it with JSON output for the calling process.
local wallabag = app.integrations.wallabag
local result = wallabag.password_token({})
dump(result) kosmo integrations:lua workflow.lua --json
kosmo integrations:lua workflow.lua --force --json integrations:lua exposes app.integrations.wallabag, app.mcp.*, docs.*, json.*, and regex.*. Use app.integrations.wallabag.default.* or app.integrations.wallabag.work.* when you configured named credential accounts.
MCP-only Lua
If the script only needs configured MCP servers and does not need wallabag, use the narrower mcp:lua command.
# Use mcp:lua for MCP-only scripts; use integrations:lua for this integration namespace.
kosmo mcp:lua --eval 'dump(mcp.servers())' --json Agent-Facing Lua Docs
This is the rendered version of the full Lua documentation exposed to agents when they inspect the integration namespace.
wallabag
Namespace: wallabag
Use this integration to create and manage saved articles in a hosted or self-hosted wallabag instance. The API uses OAuth2 bearer tokens. Configure an instance URL such as https://app.wallabag.it or your own wallabag root URL.
OAuth Tokens
Exchange client/user credentials for a token:
wallabag_token_password({
client_id = "client-id",
client_secret = "client-secret",
username = "[email protected]",
password = "fake-password"
})
Refresh a token:
wallabag_token_refresh({
client_id = "client-id",
client_secret = "client-secret",
refresh_token = "refresh-token"
})
Entries
wallabag_entries_create({
url = "https://example.test/article",
payload = {
title = "Example Article",
tags = "research,examples"
}
})
wallabag_entries_list({
payload = {
page = 1,
perPage = 30,
archive = 0,
starred = 0
}
})
Other entry tools include wallabag_entries_exists, wallabag_entries_get, wallabag_entries_update, wallabag_entries_delete, wallabag_entries_reload, and wallabag_entries_export. For export, pass format as epub, mobi, pdf, txt, csv, json, or xml.
Tags And Annotations
wallabag_tags_list({})
wallabag_entry_tags_add({
entry = "123",
tags = "research,priority"
})
wallabag_annotations_list({ entry = "123" })
wallabag_annotations_create({
entry = "123",
text = "Important passage",
ranges = {
{ start = "/p[1]", startOffset = 0, ["end"] = "/p[1]", endOffset = 18 }
}
})
wallabag_entry_tag_delete, wallabag_annotations_update, and wallabag_annotations_delete handle cleanup and edits.
Raw API Calls
wallabag_api_get, wallabag_api_post, wallabag_api_patch, and wallabag_api_delete call safe relative paths with the configured bearer token. Absolute URLs are rejected.
wallabag_api_get({
path = "/api/entries.json",
payload = { perPage = 10 }
})Raw agent markdown
# wallabag
Namespace: `wallabag`
Use this integration to create and manage saved articles in a hosted or self-hosted wallabag instance. The API uses OAuth2 bearer tokens. Configure an instance URL such as `https://app.wallabag.it` or your own wallabag root URL.
## OAuth Tokens
Exchange client/user credentials for a token:
```lua
wallabag_token_password({
client_id = "client-id",
client_secret = "client-secret",
username = "[email protected]",
password = "fake-password"
})
```
Refresh a token:
```lua
wallabag_token_refresh({
client_id = "client-id",
client_secret = "client-secret",
refresh_token = "refresh-token"
})
```
## Entries
```lua
wallabag_entries_create({
url = "https://example.test/article",
payload = {
title = "Example Article",
tags = "research,examples"
}
})
wallabag_entries_list({
payload = {
page = 1,
perPage = 30,
archive = 0,
starred = 0
}
})
```
Other entry tools include `wallabag_entries_exists`, `wallabag_entries_get`, `wallabag_entries_update`, `wallabag_entries_delete`, `wallabag_entries_reload`, and `wallabag_entries_export`. For export, pass `format` as `epub`, `mobi`, `pdf`, `txt`, `csv`, `json`, or `xml`.
## Tags And Annotations
```lua
wallabag_tags_list({})
wallabag_entry_tags_add({
entry = "123",
tags = "research,priority"
})
wallabag_annotations_list({ entry = "123" })
wallabag_annotations_create({
entry = "123",
text = "Important passage",
ranges = {
{ start = "/p[1]", startOffset = 0, ["end"] = "/p[1]", endOffset = 18 }
}
})
```
`wallabag_entry_tag_delete`, `wallabag_annotations_update`, and `wallabag_annotations_delete` handle cleanup and edits.
## Raw API Calls
`wallabag_api_get`, `wallabag_api_post`, `wallabag_api_patch`, and `wallabag_api_delete` call safe relative paths with the configured bearer token. Absolute URLs are rejected.
```lua
wallabag_api_get({
path = "/api/entries.json",
payload = { perPage = 10 }
})
``` local result = app.integrations.wallabag.password_token({})
print(result) Functions
password_token Write
Exchange wallabag client and user credentials for an access token.
- Lua path
app.integrations.wallabag.password_token- Full name
wallabag.wallabag_token_password
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
refresh_token Write
Refresh a wallabag access token.
- Lua path
app.integrations.wallabag.refresh_token- Full name
wallabag.wallabag_token_refresh
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
list_entries Read
List wallabag entries with filters and pagination.
- Lua path
app.integrations.wallabag.list_entries- Full name
wallabag.wallabag_entries_list
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
create_entry Write
Create a wallabag entry from a URL.
- Lua path
app.integrations.wallabag.create_entry- Full name
wallabag.wallabag_entries_create
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
entry_exists Read
Check whether a URL already exists in wallabag.
- Lua path
app.integrations.wallabag.entry_exists- Full name
wallabag.wallabag_entries_exists
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
get_entry Read
Get one wallabag entry.
- Lua path
app.integrations.wallabag.get_entry- Full name
wallabag.wallabag_entries_get
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
update_entry Write
Update title, archived/starred state, tags, or other entry fields.
- Lua path
app.integrations.wallabag.update_entry- Full name
wallabag.wallabag_entries_update
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
delete_entry Write
Delete one wallabag entry.
- Lua path
app.integrations.wallabag.delete_entry- Full name
wallabag.wallabag_entries_delete
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
reload_entry Write
Refetch and reload a wallabag entry.
- Lua path
app.integrations.wallabag.reload_entry- Full name
wallabag.wallabag_entries_reload
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
export_entry Read
Export an entry as epub, mobi, pdf, txt, csv, json, or xml.
- Lua path
app.integrations.wallabag.export_entry- Full name
wallabag.wallabag_entries_export
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
list_tags Read
List wallabag tags.
- Lua path
app.integrations.wallabag.list_tags- Full name
wallabag.wallabag_tags_list
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
add_entry_tags Write
Add comma-separated tags to an entry.
- Lua path
app.integrations.wallabag.add_entry_tags- Full name
wallabag.wallabag_entry_tags_add
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
delete_entry_tag Write
Remove one tag from an entry.
- Lua path
app.integrations.wallabag.delete_entry_tag- Full name
wallabag.wallabag_entry_tag_delete
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
list_annotations Read
List annotations for a wallabag entry.
- Lua path
app.integrations.wallabag.list_annotations- Full name
wallabag.wallabag_annotations_list
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
create_annotation Write
Create an annotation for a wallabag entry.
- Lua path
app.integrations.wallabag.create_annotation- Full name
wallabag.wallabag_annotations_create
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
update_annotation Write
Update a wallabag annotation.
- Lua path
app.integrations.wallabag.update_annotation- Full name
wallabag.wallabag_annotations_update
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
delete_annotation Write
Delete a wallabag annotation.
- Lua path
app.integrations.wallabag.delete_annotation- Full name
wallabag.wallabag_annotations_delete
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
api_get Read
Call a safe relative wallabag API GET path.
- Lua path
app.integrations.wallabag.api_get- Full name
wallabag.wallabag_api_get
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
api_post Write
Call a safe relative wallabag API POST path.
- Lua path
app.integrations.wallabag.api_post- Full name
wallabag.wallabag_api_post
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
api_patch Write
Call a safe relative wallabag API PATCH path.
- Lua path
app.integrations.wallabag.api_patch- Full name
wallabag.wallabag_api_patch
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
api_delete Write
Call a safe relative wallabag API DELETE path.
- Lua path
app.integrations.wallabag.api_delete- Full name
wallabag.wallabag_api_delete
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||