KosmoKrator

data

Akismet Lua API for KosmoKrator Agents

Agent-facing Lua documentation and function reference for the Akismet KosmoKrator integration.

Lua Namespace

Agents call this integration through app.integrations.akismet.*. Use lua_read_doc("integrations.akismet") 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 Akismet workflow without starting an interactive agent session.

Inline Lua call
kosmo integrations:lua --eval 'dump(app.integrations.akismet.verify_key({}))' --json
Read Lua docs headlessly
kosmo integrations:lua --eval 'print(docs.read("akismet"))' --json
kosmo integrations:lua --eval 'print(docs.read("akismet.verify_key"))' --json

Workflow file

Put repeatable logic in a Lua file, then execute it with JSON output for the calling process.

workflow.lua
local akismet = app.integrations.akismet
local result = akismet.verify_key({})

dump(result)
Run the workflow
kosmo integrations:lua workflow.lua --json
kosmo integrations:lua workflow.lua --force --json
Namespace note. integrations:lua exposes app.integrations.akismet, app.mcp.*, docs.*, json.*, and regex.*. Use app.integrations.akismet.default.* or app.integrations.akismet.work.* when you configured named credential accounts.

MCP-only Lua

If the script only needs configured MCP servers and does not need Akismet, use the narrower mcp:lua command.

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.

Akismet

Namespace: akismet

Use this integration to check user-submitted content for spam with Akismet, verify credentials, submit missed-spam or false-positive feedback, and inspect API-key site activity or monthly usage limits.

Authentication

Akismet requires an API key and a blog URL. The blog value should be the front page or home URL of the site, app, forum, wiki, or other instance making the request, including http:// or https://.

Tools

  • akismet_verify_key: verify the API key and blog URL.
  • akismet_comment_check: check submitted content for spam.
  • akismet_submit_spam: report missed spam.
  • akismet_submit_ham: report a false positive.
  • akismet_key_sites: inspect site activity for the API key.
  • akismet_usage_limit: inspect current monthly usage and throttling status.

Return Notes

akismet_comment_check returns spam = true when Akismet returns true, and spam = false when Akismet returns false. It also includes pro_tip from X-akismet-pro-tip, recheck_after from X-akismet-recheck-after, and debug from X-akismet-debug-help when present.

akismet_verify_key returns valid, body, and optional debug. akismet_key_sites returns JSON by default. With format = "csv", it returns the raw CSV body and status.

Examples

local result = tools.akismet_comment_check({
  user_ip = "198.51.100.10",
  user_agent = "Mozilla/5.0",
  referrer = "https://example.test/contact",
  permalink = "https://example.test/contact",
  comment_type = "contact-form",
  comment_author = "Example User",
  comment_author_email = "[email protected]",
  comment_content = "Hello, I have a question about your product.",
  is_test = true
})

if result.spam then
  -- Queue, reject, or discard according to local policy.
end

local usage = tools.akismet_usage_limit({})

For akismet_submit_spam and akismet_submit_ham, send the original content metadata as closely as possible to the matching comment-check request. Avoid passing private data beyond what is needed for spam analysis.

Raw agent markdown
# Akismet

Namespace: `akismet`

Use this integration to check user-submitted content for spam with Akismet,
verify credentials, submit missed-spam or false-positive feedback, and inspect
API-key site activity or monthly usage limits.

## Authentication

Akismet requires an API key and a `blog` URL. The blog value should be the
front page or home URL of the site, app, forum, wiki, or other instance making
the request, including `http://` or `https://`.

## Tools

- `akismet_verify_key`: verify the API key and blog URL.
- `akismet_comment_check`: check submitted content for spam.
- `akismet_submit_spam`: report missed spam.
- `akismet_submit_ham`: report a false positive.
- `akismet_key_sites`: inspect site activity for the API key.
- `akismet_usage_limit`: inspect current monthly usage and throttling status.

## Return Notes

`akismet_comment_check` returns `spam = true` when Akismet returns `true`, and
`spam = false` when Akismet returns `false`. It also includes `pro_tip` from
`X-akismet-pro-tip`, `recheck_after` from `X-akismet-recheck-after`, and
`debug` from `X-akismet-debug-help` when present.

`akismet_verify_key` returns `valid`, `body`, and optional `debug`.
`akismet_key_sites` returns JSON by default. With `format = "csv"`, it returns
the raw CSV body and status.

## Examples

```lua
local result = tools.akismet_comment_check({
  user_ip = "198.51.100.10",
  user_agent = "Mozilla/5.0",
  referrer = "https://example.test/contact",
  permalink = "https://example.test/contact",
  comment_type = "contact-form",
  comment_author = "Example User",
  comment_author_email = "[email protected]",
  comment_content = "Hello, I have a question about your product.",
  is_test = true
})

if result.spam then
  -- Queue, reject, or discard according to local policy.
end

local usage = tools.akismet_usage_limit({})
```

For `akismet_submit_spam` and `akismet_submit_ham`, send the original content
metadata as closely as possible to the matching `comment-check` request.
Avoid passing private data beyond what is needed for spam analysis.
Metadata-derived Lua example
local result = app.integrations.akismet.verify_key({})
print(result)

Functions

verify_key Read

Verify the Akismet API key and blog URL.

Lua path
app.integrations.akismet.verify_key
Full name
akismet.akismet_verify_key
ParameterTypeRequiredDescription
No parameters.
comment_check Read

Check submitted content for spam.

Lua path
app.integrations.akismet.comment_check
Full name
akismet.akismet_comment_check
ParameterTypeRequiredDescription
No parameters.
submit_spam Write

Submit missed spam feedback to Akismet.

Lua path
app.integrations.akismet.submit_spam
Full name
akismet.akismet_submit_spam
ParameterTypeRequiredDescription
No parameters.
submit_ham Write

Submit false-positive ham feedback to Akismet.

Lua path
app.integrations.akismet.submit_ham
Full name
akismet.akismet_submit_ham
ParameterTypeRequiredDescription
No parameters.
key_sites Read

Retrieve site activity for the API key.

Lua path
app.integrations.akismet.key_sites
Full name
akismet.akismet_key_sites
ParameterTypeRequiredDescription
No parameters.
usage_limit Read

Retrieve current monthly API usage and throttling status.

Lua path
app.integrations.akismet.usage_limit
Full name
akismet.akismet_usage_limit
ParameterTypeRequiredDescription
No parameters.