analytics
Langfuse CLI for AI Agents
Use the Langfuse CLI from KosmoKrator to call Langfuse tools headlessly, return JSON, inspect schemas, and automate workflows from coding agents, scripts, and CI.Langfuse CLI Setup
Langfuse can be configured headlessly with `kosmokrator integrations:configure langfuse`.
# 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 langfuse --set public_key="$LANGFUSE_PUBLIC_KEY" --set secret_key="$LANGFUSE_SECRET_KEY" --enable --read allow --write ask --json
kosmokrator integrations:doctor langfuse --json
kosmokrator integrations:status --json Credentials
Authentication type: API key api_key. Configure credentials once, then reuse the same stored profile from scripts, coding CLIs, Lua, and MCP.
| Key | Env var | Type | Required | Label |
|---|---|---|---|---|
public_key | LANGFUSE_PUBLIC_KEY | Text text | yes | Public Key |
secret_key | LANGFUSE_SECRET_KEY | Secret secret | yes | Secret Key |
url | LANGFUSE_URL | URL url | no | API Base URL |
Command Patterns
The generic command is stable across every integration. The provider shortcut is shorter for humans.
kosmo integrations:call langfuse.langfuse_get_health '{}' --json kosmo integrations:langfuse langfuse_get_health '{}' --json Discovery
These commands return structured output for coding agents that need to inspect capabilities before choosing a function.
kosmo integrations:docs langfuse --json
kosmo integrations:docs langfuse.langfuse_get_health --json
kosmo integrations:schema langfuse.langfuse_get_health --json
kosmo integrations:search "Langfuse" --json
kosmo integrations:list --json Automation Contexts
The same configured command surface works in these environments. The command does not change unless the host wrapper, credentials, or permissions change.
CLI Functions
Every function below can be called headlessly. Commands are highlighted, copyable, and scroll horizontally when payloads are long.
langfuse.langfuse_get_health
Check Langfuse Public API health.
read - Parameters
- none
kosmo integrations:call langfuse.langfuse_get_health '{}' --json kosmo integrations:langfuse langfuse_get_health '{}' --json langfuse.langfuse_ingest_batch
Submit Langfuse ingestion batch events.
write - Parameters
- none
kosmo integrations:call langfuse.langfuse_ingest_batch '{}' --json kosmo integrations:langfuse langfuse_ingest_batch '{}' --json langfuse.langfuse_list_traces
List Langfuse traces with filters and pagination.
read - Parameters
- none
kosmo integrations:call langfuse.langfuse_list_traces '{}' --json kosmo integrations:langfuse langfuse_list_traces '{}' --json langfuse.langfuse_get_trace
Retrieve a Langfuse trace by ID.
read - Parameters
- none
kosmo integrations:call langfuse.langfuse_get_trace '{}' --json kosmo integrations:langfuse langfuse_get_trace '{}' --json langfuse.langfuse_delete_trace
Delete a Langfuse trace by ID.
write - Parameters
- none
kosmo integrations:call langfuse.langfuse_delete_trace '{}' --json kosmo integrations:langfuse langfuse_delete_trace '{}' --json langfuse.langfuse_list_observations
List Langfuse observations with v2 filters.
read - Parameters
- none
kosmo integrations:call langfuse.langfuse_list_observations '{}' --json kosmo integrations:langfuse langfuse_list_observations '{}' --json langfuse.langfuse_get_observation
Retrieve a Langfuse observation by ID.
read - Parameters
- none
kosmo integrations:call langfuse.langfuse_get_observation '{}' --json kosmo integrations:langfuse langfuse_get_observation '{}' --json langfuse.langfuse_create_score
Create a trace, observation, session, or dataset score.
write - Parameters
- none
kosmo integrations:call langfuse.langfuse_create_score '{}' --json kosmo integrations:langfuse langfuse_create_score '{}' --json langfuse.langfuse_list_scores
List Langfuse v2 scores with filters.
read - Parameters
- none
kosmo integrations:call langfuse.langfuse_list_scores '{}' --json kosmo integrations:langfuse langfuse_list_scores '{}' --json langfuse.langfuse_get_score
Retrieve a Langfuse score by ID.
read - Parameters
- none
kosmo integrations:call langfuse.langfuse_get_score '{}' --json kosmo integrations:langfuse langfuse_get_score '{}' --json langfuse.langfuse_delete_score
Delete a Langfuse score by ID.
write - Parameters
- none
kosmo integrations:call langfuse.langfuse_delete_score '{}' --json kosmo integrations:langfuse langfuse_delete_score '{}' --json langfuse.langfuse_list_sessions
List Langfuse sessions.
read - Parameters
- none
kosmo integrations:call langfuse.langfuse_list_sessions '{}' --json kosmo integrations:langfuse langfuse_list_sessions '{}' --json langfuse.langfuse_get_session
Retrieve a Langfuse session by ID.
read - Parameters
- none
kosmo integrations:call langfuse.langfuse_get_session '{}' --json kosmo integrations:langfuse langfuse_get_session '{}' --json langfuse.langfuse_list_datasets
List Langfuse v2 datasets.
read - Parameters
- none
kosmo integrations:call langfuse.langfuse_list_datasets '{}' --json kosmo integrations:langfuse langfuse_list_datasets '{}' --json langfuse.langfuse_create_dataset
Create a Langfuse v2 dataset.
write - Parameters
- none
kosmo integrations:call langfuse.langfuse_create_dataset '{}' --json kosmo integrations:langfuse langfuse_create_dataset '{}' --json langfuse.langfuse_get_dataset
Retrieve a Langfuse dataset by name.
read - Parameters
- none
kosmo integrations:call langfuse.langfuse_get_dataset '{}' --json kosmo integrations:langfuse langfuse_get_dataset '{}' --json langfuse.langfuse_create_dataset_item
Create a Langfuse dataset item.
write - Parameters
- none
kosmo integrations:call langfuse.langfuse_create_dataset_item '{}' --json kosmo integrations:langfuse langfuse_create_dataset_item '{}' --json langfuse.langfuse_list_dataset_items
List Langfuse dataset items.
read - Parameters
- none
kosmo integrations:call langfuse.langfuse_list_dataset_items '{}' --json kosmo integrations:langfuse langfuse_list_dataset_items '{}' --json langfuse.langfuse_get_dataset_item
Retrieve a Langfuse dataset item by ID.
read - Parameters
- none
kosmo integrations:call langfuse.langfuse_get_dataset_item '{}' --json kosmo integrations:langfuse langfuse_get_dataset_item '{}' --json langfuse.langfuse_delete_dataset_item
Delete a Langfuse dataset item by ID.
write - Parameters
- none
kosmo integrations:call langfuse.langfuse_delete_dataset_item '{}' --json kosmo integrations:langfuse langfuse_delete_dataset_item '{}' --json langfuse.langfuse_create_dataset_run_item
Create a Langfuse dataset run item.
write - Parameters
- none
kosmo integrations:call langfuse.langfuse_create_dataset_run_item '{}' --json kosmo integrations:langfuse langfuse_create_dataset_run_item '{}' --json langfuse.langfuse_list_dataset_run_items
List Langfuse dataset run items.
read - Parameters
- none
kosmo integrations:call langfuse.langfuse_list_dataset_run_items '{}' --json kosmo integrations:langfuse langfuse_list_dataset_run_items '{}' --json langfuse.langfuse_list_prompts
List Langfuse v2 prompts.
read - Parameters
- none
kosmo integrations:call langfuse.langfuse_list_prompts '{}' --json kosmo integrations:langfuse langfuse_list_prompts '{}' --json langfuse.langfuse_create_prompt
Create a Langfuse prompt version.
write - Parameters
- none
kosmo integrations:call langfuse.langfuse_create_prompt '{}' --json kosmo integrations:langfuse langfuse_create_prompt '{}' --json langfuse.langfuse_get_prompt
Retrieve a Langfuse prompt by name.
read - Parameters
- none
kosmo integrations:call langfuse.langfuse_get_prompt '{}' --json kosmo integrations:langfuse langfuse_get_prompt '{}' --json langfuse.langfuse_delete_prompt
Delete a Langfuse prompt by name.
write - Parameters
- none
kosmo integrations:call langfuse.langfuse_delete_prompt '{}' --json kosmo integrations:langfuse langfuse_delete_prompt '{}' --json langfuse.langfuse_update_prompt_version
Update labels or config for a prompt version.
write - Parameters
- none
kosmo integrations:call langfuse.langfuse_update_prompt_version '{}' --json kosmo integrations:langfuse langfuse_update_prompt_version '{}' --json langfuse.langfuse_create_comment
Create a Langfuse comment.
write - Parameters
- none
kosmo integrations:call langfuse.langfuse_create_comment '{}' --json kosmo integrations:langfuse langfuse_create_comment '{}' --json langfuse.langfuse_list_comments
List Langfuse comments.
read - Parameters
- none
kosmo integrations:call langfuse.langfuse_list_comments '{}' --json kosmo integrations:langfuse langfuse_list_comments '{}' --json langfuse.langfuse_get_comment
Retrieve a Langfuse comment by ID.
read - Parameters
- none
kosmo integrations:call langfuse.langfuse_get_comment '{}' --json kosmo integrations:langfuse langfuse_get_comment '{}' --json langfuse.langfuse_metrics
Query Langfuse v2 metrics.
read - Parameters
- none
kosmo integrations:call langfuse.langfuse_metrics '{}' --json kosmo integrations:langfuse langfuse_metrics '{}' --json langfuse.langfuse_list_models
List Langfuse model definitions.
read - Parameters
- none
kosmo integrations:call langfuse.langfuse_list_models '{}' --json kosmo integrations:langfuse langfuse_list_models '{}' --json langfuse.langfuse_create_model
Create a Langfuse model definition.
write - Parameters
- none
kosmo integrations:call langfuse.langfuse_create_model '{}' --json kosmo integrations:langfuse langfuse_create_model '{}' --json langfuse.langfuse_get_model
Retrieve a Langfuse model definition by ID.
read - Parameters
- none
kosmo integrations:call langfuse.langfuse_get_model '{}' --json kosmo integrations:langfuse langfuse_get_model '{}' --json langfuse.langfuse_delete_model
Delete a Langfuse model definition by ID.
write - Parameters
- none
kosmo integrations:call langfuse.langfuse_delete_model '{}' --json kosmo integrations:langfuse langfuse_delete_model '{}' --json Function Schemas
Use these parameter tables when building CLI payloads without calling integrations:schema first.
langfuse.langfuse_get_health 0 parameters
kosmo integrations:schema langfuse.langfuse_get_health --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
langfuse.langfuse_ingest_batch 0 parameters
kosmo integrations:schema langfuse.langfuse_ingest_batch --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
langfuse.langfuse_list_traces 0 parameters
kosmo integrations:schema langfuse.langfuse_list_traces --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
langfuse.langfuse_get_trace 0 parameters
kosmo integrations:schema langfuse.langfuse_get_trace --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
langfuse.langfuse_delete_trace 0 parameters
kosmo integrations:schema langfuse.langfuse_delete_trace --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
langfuse.langfuse_list_observations 0 parameters
kosmo integrations:schema langfuse.langfuse_list_observations --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
langfuse.langfuse_get_observation 0 parameters
kosmo integrations:schema langfuse.langfuse_get_observation --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
langfuse.langfuse_create_score 0 parameters
kosmo integrations:schema langfuse.langfuse_create_score --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
langfuse.langfuse_list_scores 0 parameters
kosmo integrations:schema langfuse.langfuse_list_scores --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
langfuse.langfuse_get_score 0 parameters
kosmo integrations:schema langfuse.langfuse_get_score --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
langfuse.langfuse_delete_score 0 parameters
kosmo integrations:schema langfuse.langfuse_delete_score --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
langfuse.langfuse_list_sessions 0 parameters
kosmo integrations:schema langfuse.langfuse_list_sessions --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
langfuse.langfuse_get_session 0 parameters
kosmo integrations:schema langfuse.langfuse_get_session --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
langfuse.langfuse_list_datasets 0 parameters
kosmo integrations:schema langfuse.langfuse_list_datasets --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
langfuse.langfuse_create_dataset 0 parameters
kosmo integrations:schema langfuse.langfuse_create_dataset --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
langfuse.langfuse_get_dataset 0 parameters
kosmo integrations:schema langfuse.langfuse_get_dataset --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
langfuse.langfuse_create_dataset_item 0 parameters
kosmo integrations:schema langfuse.langfuse_create_dataset_item --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
langfuse.langfuse_list_dataset_items 0 parameters
kosmo integrations:schema langfuse.langfuse_list_dataset_items --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
langfuse.langfuse_get_dataset_item 0 parameters
kosmo integrations:schema langfuse.langfuse_get_dataset_item --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
langfuse.langfuse_delete_dataset_item 0 parameters
kosmo integrations:schema langfuse.langfuse_delete_dataset_item --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
langfuse.langfuse_create_dataset_run_item 0 parameters
kosmo integrations:schema langfuse.langfuse_create_dataset_run_item --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
langfuse.langfuse_list_dataset_run_items 0 parameters
kosmo integrations:schema langfuse.langfuse_list_dataset_run_items --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
langfuse.langfuse_list_prompts 0 parameters
kosmo integrations:schema langfuse.langfuse_list_prompts --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
langfuse.langfuse_create_prompt 0 parameters
kosmo integrations:schema langfuse.langfuse_create_prompt --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
langfuse.langfuse_get_prompt 0 parameters
kosmo integrations:schema langfuse.langfuse_get_prompt --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
langfuse.langfuse_delete_prompt 0 parameters
kosmo integrations:schema langfuse.langfuse_delete_prompt --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
langfuse.langfuse_update_prompt_version 0 parameters
kosmo integrations:schema langfuse.langfuse_update_prompt_version --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
langfuse.langfuse_create_comment 0 parameters
kosmo integrations:schema langfuse.langfuse_create_comment --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
langfuse.langfuse_list_comments 0 parameters
kosmo integrations:schema langfuse.langfuse_list_comments --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
langfuse.langfuse_get_comment 0 parameters
kosmo integrations:schema langfuse.langfuse_get_comment --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
langfuse.langfuse_metrics 0 parameters
kosmo integrations:schema langfuse.langfuse_metrics --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
langfuse.langfuse_list_models 0 parameters
kosmo integrations:schema langfuse.langfuse_list_models --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
langfuse.langfuse_create_model 0 parameters
kosmo integrations:schema langfuse.langfuse_create_model --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
langfuse.langfuse_get_model 0 parameters
kosmo integrations:schema langfuse.langfuse_get_model --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
langfuse.langfuse_delete_model 0 parameters
kosmo integrations:schema langfuse.langfuse_delete_model --json | Parameter | Type | Required | Description |
|---|---|---|---|
| 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.