KosmoKrator

healthcare

Weave CLI for AI Agents

Use the Weave CLI from KosmoKrator to call Weave tools headlessly, return JSON, inspect schemas, and automate workflows from coding agents, scripts, and CI.

7 functions 7 read 0 write Bearer token auth

Weave CLI Setup

Weave can be configured headlessly with `kosmokrator integrations:configure weave`.

# Install KosmoKrator first if it is not available on PATH.
curl -fsSL https://raw.githubusercontent.com/OpenCompanyApp/kosmokrator/main/install.sh | bash

# Configure and verify this integration.
kosmokrator integrations:configure weave --set access_token="$WEAVE_ACCESS_TOKEN" --enable --read allow --write ask --json
kosmokrator integrations:doctor weave --json
kosmokrator integrations:status --json

Credentials

Authentication type: Bearer token bearer_token. Configure credentials once, then use the same stored profile from scripts, coding CLIs, Lua code mode, and the MCP gateway.

KeyEnv varTypeRequiredLabel
access_token WEAVE_ACCESS_TOKEN Secret secret yes Access Token
url WEAVE_URL URL url no Weave API URL

Call Weave Headlessly

Use the generic call form when another coding CLI or script needs a stable universal interface.

kosmo integrations:call weave.weave_list_patients '{
  "limit": 1,
  "page": 1,
  "query": "example_query"
}' --json

Use the provider shortcut form for shorter human-facing commands.

kosmo integrations:weave weave_list_patients '{
  "limit": 1,
  "page": 1,
  "query": "example_query"
}' --json

Agent Discovery Commands

These commands return structured output for coding agents that need to inspect capabilities before choosing a function.

kosmo integrations:docs weave --json
kosmo integrations:docs weave.weave_list_patients --json
kosmo integrations:schema weave.weave_list_patients --json
kosmo integrations:search "Weave" --json
kosmo integrations:list --json

All CLI Functions

Every function below can be called headlessly. The generic form is stable across all integrations; the provider shortcut is shorter but specific to Weave.

weave.weave_list_patients

Read read

Search and list patients from Weave. Returns patient records with names, contact info, and metadata. Use the query parameter to search by name, phone, or email.

Parameters
limit, page, query

Generic CLI call

kosmo integrations:call weave.weave_list_patients '{"limit":1,"page":1,"query":"example_query"}' --json

Provider shortcut

kosmo integrations:weave weave_list_patients '{"limit":1,"page":1,"query":"example_query"}' --json

weave.weave_get_patient

Read read

Retrieve a single patient by ID. Returns full patient details including demographics and contact information.

Parameters
id

Generic CLI call

kosmo integrations:call weave.weave_get_patient '{"id":"example_id"}' --json

Provider shortcut

kosmo integrations:weave weave_get_patient '{"id":"example_id"}' --json

weave.weave_list_appointments

Read read

List appointments from Weave with optional date range filtering. Returns appointment records with patient info, scheduled times, and status.

Parameters
startDate, endDate, limit

Generic CLI call

kosmo integrations:call weave.weave_list_appointments '{"startDate":"example_startDate","endDate":"example_endDate","limit":1}' --json

Provider shortcut

kosmo integrations:weave weave_list_appointments '{"startDate":"example_startDate","endDate":"example_endDate","limit":1}' --json

weave.weave_get_appointment

Read read

Retrieve a single appointment by ID. Returns full details including patient info, scheduled time, duration, and status.

Parameters
id

Generic CLI call

kosmo integrations:call weave.weave_get_appointment '{"id":"example_id"}' --json

Provider shortcut

kosmo integrations:weave weave_get_appointment '{"id":"example_id"}' --json

weave.weave_list_messages

Read read

List patient messages from Weave with optional type filtering. Returns message records with sender, recipient, content previews, and status.

Parameters
limit, page, type

Generic CLI call

kosmo integrations:call weave.weave_list_messages '{"limit":1,"page":1,"type":"example_type"}' --json

Provider shortcut

kosmo integrations:weave weave_list_messages '{"limit":1,"page":1,"type":"example_type"}' --json

weave.weave_get_message

Read read

Retrieve a single message by ID. Returns full message content, sender, recipient, timestamps, and delivery status.

Parameters
id

Generic CLI call

kosmo integrations:call weave.weave_get_message '{"id":"example_id"}' --json

Provider shortcut

kosmo integrations:weave weave_get_message '{"id":"example_id"}' --json

weave.weave_get_current_user

Read read

Get the currently authenticated Weave user profile. Returns user details including name, email, role, and organization info.

Parameters
none

Generic CLI call

kosmo integrations:call weave.weave_get_current_user '{}' --json

Provider shortcut

kosmo integrations:weave weave_get_current_user '{}' --json

Function Schemas

Use these parameter tables when building CLI payloads without calling integrations:schema first.

weave.weave_list_patients

Search and list patients from Weave. Returns patient records with names, contact info, and metadata. Use the query parameter to search by name, phone, or email.

Operation
Read read
Schema command
kosmo integrations:schema weave.weave_list_patients --json
ParameterTypeRequiredDescription
limit integer no Maximum number of patients to return (default: 25).
page integer no Page number for pagination, 1-based (default: 1).
query string no Search query to filter patients by name, phone, or email.

weave.weave_get_patient

Retrieve a single patient by ID. Returns full patient details including demographics and contact information.

Operation
Read read
Schema command
kosmo integrations:schema weave.weave_get_patient --json
ParameterTypeRequiredDescription
id string yes The unique patient identifier.

weave.weave_list_appointments

List appointments from Weave with optional date range filtering. Returns appointment records with patient info, scheduled times, and status.

Operation
Read read
Schema command
kosmo integrations:schema weave.weave_list_appointments --json
ParameterTypeRequiredDescription
startDate string no Start date for the range (ISO 8601, e.g. "2025-01-01").
endDate string no End date for the range (ISO 8601, e.g. "2025-01-31").
limit integer no Maximum number of appointments to return (default: 25).

weave.weave_get_appointment

Retrieve a single appointment by ID. Returns full details including patient info, scheduled time, duration, and status.

Operation
Read read
Schema command
kosmo integrations:schema weave.weave_get_appointment --json
ParameterTypeRequiredDescription
id string yes The unique appointment identifier.

weave.weave_list_messages

List patient messages from Weave with optional type filtering. Returns message records with sender, recipient, content previews, and status.

Operation
Read read
Schema command
kosmo integrations:schema weave.weave_list_messages --json
ParameterTypeRequiredDescription
limit integer no Maximum number of messages to return (default: 25).
page integer no Page number for pagination, 1-based (default: 1).
type string no Filter by message type (e.g. "sms", "email").

weave.weave_get_message

Retrieve a single message by ID. Returns full message content, sender, recipient, timestamps, and delivery status.

Operation
Read read
Schema command
kosmo integrations:schema weave.weave_get_message --json
ParameterTypeRequiredDescription
id string yes The unique message identifier.

weave.weave_get_current_user

Get the currently authenticated Weave user profile. Returns user details including name, email, role, and organization info.

Operation
Read read
Schema command
kosmo integrations:schema weave.weave_get_current_user --json
ParameterTypeRequiredDescription
No parameters.

Permissions

Headless calls still follow the integration read/write permission policy. Configure read/write defaults with integrations:configure. Add --force only for trusted automation that should bypass that policy.