KosmoKrator

productivity

Devin CLI for AI Agents

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

Devin CLI Setup

Devin can be configured headlessly with `kosmokrator integrations:configure devin`.

Install, configure, and verify
# 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 devin --set api_key="$DEVIN_API_KEY" --enable --read allow --write ask --json
kosmokrator integrations:doctor devin --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.

KeyEnv varTypeRequiredLabel
api_key DEVIN_API_KEY Secret secret yes API Key
org_id DEVIN_ORG_ID Text text no Organization ID
url DEVIN_URL URL url no Devin API URL
api_version DEVIN_API_VERSION Select select no API Version

Command Patterns

The generic command is stable across every integration. The provider shortcut is shorter for humans.

Generic CLI call
kosmo integrations:call devin.devin_create_session '{"prompt":"example_prompt","title":"example_title","tags":"example_tags","repos":"example_repos","playbook_id":"example_playbook_id","child_playbook_id":"example_child_playbook_id","knowledge_ids":"example_knowledge_ids","secret_ids":"example_secret_ids"}' --json
Provider shortcut
kosmo integrations:devin devin_create_session '{"prompt":"example_prompt","title":"example_title","tags":"example_tags","repos":"example_repos","playbook_id":"example_playbook_id","child_playbook_id":"example_child_playbook_id","knowledge_ids":"example_knowledge_ids","secret_ids":"example_secret_ids"}' --json

Discovery

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

Discovery commands
kosmo integrations:docs devin --json
kosmo integrations:docs devin.devin_create_session --json
kosmo integrations:schema devin.devin_create_session --json
kosmo integrations:search "Devin" --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.

devin.devin_create_session

Create a Devin session from a task prompt. Current v3 accounts can pass tags, repositories, playbooks, knowledge IDs, secrets, attachments, title, and user attribution options.

Write write
Parameters
prompt, title, tags, repos, playbook_id, child_playbook_id, knowledge_ids, secret_ids, session_secrets, attachment_urls, session_links, create_as_user_id, max_acu_limit, advanced_mode, bypass_approval, idempotent, snapshot_id, structured_output_schema, unlisted
Generic call
kosmo integrations:call devin.devin_create_session '{"prompt":"example_prompt","title":"example_title","tags":"example_tags","repos":"example_repos","playbook_id":"example_playbook_id","child_playbook_id":"example_child_playbook_id","knowledge_ids":"example_knowledge_ids","secret_ids":"example_secret_ids"}' --json
Shortcut
kosmo integrations:devin devin_create_session '{"prompt":"example_prompt","title":"example_title","tags":"example_tags","repos":"example_repos","playbook_id":"example_playbook_id","child_playbook_id":"example_child_playbook_id","knowledge_ids":"example_knowledge_ids","secret_ids":"example_secret_ids"}' --json

devin.devin_get_session

Retrieve details and current status of a Devin session. Use this to check progress on a task, view the session state, or get the output.

Read read
Parameters
session_id
Generic call
kosmo integrations:call devin.devin_get_session '{"session_id":"example_session_id"}' --json
Shortcut
kosmo integrations:devin devin_get_session '{"session_id":"example_session_id"}' --json

devin.devin_list_sessions

List Devin sessions. Current v3 accounts support cursor and timestamp filters; legacy v1 accounts support basic pagination and tag filters.

Read read
Parameters
first, after, session_ids, created_after, created_before, updated_after, updated_before, playbook_id, origins, schedule_id, user_ids, service_user_ids, limit, offset, skip, tags, user_email
Generic call
kosmo integrations:call devin.devin_list_sessions '{"first":1,"after":"example_after","session_ids":"example_session_ids","created_after":"example_created_after","created_before":"example_created_before","updated_after":"example_updated_after","updated_before":"example_updated_before","playbook_id":"example_playbook_id"}' --json
Shortcut
kosmo integrations:devin devin_list_sessions '{"first":1,"after":"example_after","session_ids":"example_session_ids","created_after":"example_created_after","created_before":"example_created_before","updated_after":"example_updated_after","updated_before":"example_updated_before","playbook_id":"example_playbook_id"}' --json

devin.devin_send_message

Send a message to an existing Devin session. Use this to provide additional instructions, ask questions, or guide the AI during an active session.

Write write
Parameters
session_id, message, message_as_user_id
Generic call
kosmo integrations:call devin.devin_send_message '{"session_id":"example_session_id","message":"example_message","message_as_user_id":"example_message_as_user_id"}' --json
Shortcut
kosmo integrations:devin devin_send_message '{"session_id":"example_session_id","message":"example_message","message_as_user_id":"example_message_as_user_id"}' --json

devin.devin_terminate_session

Terminate an active Devin session by ID.

Write write
Parameters
session_id, archive
Generic call
kosmo integrations:call devin.devin_terminate_session '{"session_id":"example_session_id","archive":true}' --json
Shortcut
kosmo integrations:devin devin_terminate_session '{"session_id":"example_session_id","archive":true}' --json

devin.devin_list_session_messages

List messages for a Devin v3 session with optional cursor pagination.

Read read
Parameters
session_id, first, after
Generic call
kosmo integrations:call devin.devin_list_session_messages '{"session_id":"example_session_id","first":1,"after":"example_after"}' --json
Shortcut
kosmo integrations:devin devin_list_session_messages '{"session_id":"example_session_id","first":1,"after":"example_after"}' --json

devin.devin_list_session_attachments

List attachments for a Devin v3 session with optional cursor pagination.

Read read
Parameters
session_id, first, after
Generic call
kosmo integrations:call devin.devin_list_session_attachments '{"session_id":"example_session_id","first":1,"after":"example_after"}' --json
Shortcut
kosmo integrations:devin devin_list_session_attachments '{"session_id":"example_session_id","first":1,"after":"example_after"}' --json

devin.devin_get_session_tags

Get tags attached to a Devin v3 session.

Read read
Parameters
session_id
Generic call
kosmo integrations:call devin.devin_get_session_tags '{"session_id":"example_session_id"}' --json
Shortcut
kosmo integrations:devin devin_get_session_tags '{"session_id":"example_session_id"}' --json

devin.devin_append_session_tags

Append tags to a Devin session.

Write write
Parameters
session_id, tags
Generic call
kosmo integrations:call devin.devin_append_session_tags '{"session_id":"example_session_id","tags":"example_tags"}' --json
Shortcut
kosmo integrations:devin devin_append_session_tags '{"session_id":"example_session_id","tags":"example_tags"}' --json

devin.devin_get_session_insights

Get generated insights for a Devin v3 session.

Read read
Parameters
session_id
Generic call
kosmo integrations:call devin.devin_get_session_insights '{"session_id":"example_session_id"}' --json
Shortcut
kosmo integrations:devin devin_get_session_insights '{"session_id":"example_session_id"}' --json

devin.devin_generate_session_insights

Generate insights for a Devin v3 session.

Write write
Parameters
session_id
Generic call
kosmo integrations:call devin.devin_generate_session_insights '{"session_id":"example_session_id"}' --json
Shortcut
kosmo integrations:devin devin_generate_session_insights '{"session_id":"example_session_id"}' --json

devin.devin_get_current_user

Get information about the authenticated Devin API principal. Use this to verify the current account, user, or service user.

Read read
Parameters
none
Generic call
kosmo integrations:call devin.devin_get_current_user '{}' --json
Shortcut
kosmo integrations:devin devin_get_current_user '{}' --json

devin.devin_list_secrets

List Devin v3 organization secrets with optional cursor pagination. Secret values are not returned.

Read read
Parameters
first, after
Generic call
kosmo integrations:call devin.devin_list_secrets '{"first":1,"after":"example_after"}' --json
Shortcut
kosmo integrations:devin devin_list_secrets '{"first":1,"after":"example_after"}' --json

devin.devin_create_secret

Create a Devin v3 organization secret for use in sessions.

Write write
Parameters
type, key, value, is_sensitive, note
Generic call
kosmo integrations:call devin.devin_create_secret '{"type":"example_type","key":"example_key","value":"example_value","is_sensitive":true,"note":"example_note"}' --json
Shortcut
kosmo integrations:devin devin_create_secret '{"type":"example_type","key":"example_key","value":"example_value","is_sensitive":true,"note":"example_note"}' --json

devin.devin_delete_secret

Delete a Devin v3 organization secret by ID.

Write write
Parameters
secret_id
Generic call
kosmo integrations:call devin.devin_delete_secret '{"secret_id":"example_secret_id"}' --json
Shortcut
kosmo integrations:devin devin_delete_secret '{"secret_id":"example_secret_id"}' --json

Function Schemas

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

devin.devin_create_session 19 parameters
Schema command
kosmo integrations:schema devin.devin_create_session --json
ParameterTypeRequiredDescription
prompt string yes The task description for Devin to execute. Be specific about what you want accomplished.
title string no Optional title for the session.
tags array no Optional tags to attach to the session.
repos array no Optional repository references for v3 sessions.
playbook_id string no Optional Devin playbook ID.
child_playbook_id string no Optional child playbook ID for v3 sessions.
knowledge_ids array no Optional Devin knowledge IDs.
secret_ids array no Optional secret IDs Devin may use.
session_secrets object no Optional per-session secrets.
attachment_urls array no Optional attachment URLs for v3 session creation.
session_links array no Optional links to associate with the v3 session.
create_as_user_id string no Optional v3 user ID to create the session as.
max_acu_limit number no Optional maximum ACU limit.
advanced_mode boolean no Whether to enable v3 advanced mode.
bypass_approval boolean no Whether v3 may bypass approval when allowed by account policy.
idempotent boolean no Legacy v1 idempotency flag.
snapshot_id string no Legacy v1 snapshot ID.
structured_output_schema object no Optional structured output schema.
unlisted boolean no Legacy v1 unlisted-session flag.
devin.devin_get_session 1 parameters
Schema command
kosmo integrations:schema devin.devin_get_session --json
ParameterTypeRequiredDescription
session_id string yes The Devin session ID. Current v3 IDs are usually prefixed with devin-.
devin.devin_list_sessions 17 parameters
Schema command
kosmo integrations:schema devin.devin_list_sessions --json
ParameterTypeRequiredDescription
first integer no Maximum v3 records to return.
after string no Cursor for v3 pagination.
session_ids array no Optional v3 session ID filter.
created_after string no Optional v3 created-after timestamp.
created_before string no Optional v3 created-before timestamp.
updated_after string no Optional v3 updated-after timestamp.
updated_before string no Optional v3 updated-before timestamp.
playbook_id string no Optional v3 playbook filter.
origins array no Optional v3 origin filters such as api, cli, slack, or webapp.
schedule_id string no Optional v3 schedule ID filter.
user_ids array no Optional v3 user ID filters.
service_user_ids array no Optional v3 service user ID filters.
limit integer no Legacy v1 limit.
offset integer no Legacy v1 offset.
skip integer no Legacy v1 skip count.
tags array no Legacy v1 tag filter.
user_email string no Legacy v1 user email filter.
devin.devin_send_message 3 parameters
Schema command
kosmo integrations:schema devin.devin_send_message --json
ParameterTypeRequiredDescription
session_id string yes The Devin session ID. Current v3 IDs are usually prefixed with devin-.
message string yes The message content to send to the session.
message_as_user_id string no Optional v3 user ID to attribute the message to.
devin.devin_terminate_session 2 parameters
Schema command
kosmo integrations:schema devin.devin_terminate_session --json
ParameterTypeRequiredDescription
session_id string yes The Devin session ID to terminate.
archive boolean no For v3, archive the session while terminating so it is preserved for reference.
devin.devin_list_session_messages 3 parameters
Schema command
kosmo integrations:schema devin.devin_list_session_messages --json
ParameterTypeRequiredDescription
session_id string yes The Devin session ID.
first integer no Maximum records to return.
after string no Cursor for the next page.
devin.devin_list_session_attachments 3 parameters
Schema command
kosmo integrations:schema devin.devin_list_session_attachments --json
ParameterTypeRequiredDescription
session_id string yes The Devin session ID.
first integer no Maximum records to return.
after string no Cursor for the next page.
devin.devin_get_session_tags 1 parameters
Schema command
kosmo integrations:schema devin.devin_get_session_tags --json
ParameterTypeRequiredDescription
session_id string yes The Devin session ID.
devin.devin_append_session_tags 2 parameters
Schema command
kosmo integrations:schema devin.devin_append_session_tags --json
ParameterTypeRequiredDescription
session_id string yes The Devin session ID.
tags array yes Tags to append.
devin.devin_get_session_insights 1 parameters
Schema command
kosmo integrations:schema devin.devin_get_session_insights --json
ParameterTypeRequiredDescription
session_id string yes The Devin session ID.
devin.devin_generate_session_insights 1 parameters
Schema command
kosmo integrations:schema devin.devin_generate_session_insights --json
ParameterTypeRequiredDescription
session_id string yes The Devin session ID.
devin.devin_get_current_user 0 parameters
Schema command
kosmo integrations:schema devin.devin_get_current_user --json
ParameterTypeRequiredDescription
No parameters.
devin.devin_list_secrets 2 parameters
Schema command
kosmo integrations:schema devin.devin_list_secrets --json
ParameterTypeRequiredDescription
first integer no Maximum records to return.
after string no Cursor for the next page.
devin.devin_create_secret 5 parameters
Schema command
kosmo integrations:schema devin.devin_create_secret --json
ParameterTypeRequiredDescription
type string yes Secret type accepted by Devin.
key string yes Secret key or name.
value string yes Secret value to store.
is_sensitive boolean no Whether Devin should treat the value as sensitive.
note string no Optional note for humans managing the secret.
devin.devin_delete_secret 1 parameters
Schema command
kosmo integrations:schema devin.devin_delete_secret --json
ParameterTypeRequiredDescription
secret_id string yes The Devin secret ID to delete.

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.