ai
Devin CLI for Headless Automation
Use the Devin CLI for headless automation with headless JSON commands, schema discovery, credentials, and permission controls.
5 functions 3 read 2 write API key auth
Devin CLI for Headless Automation
Use KosmoKrator as a non-interactive integration runtime for local automations and wrappers.
Use headless automation when another tool needs a stable local command surface. The Devin CLI uses the same integration registry as the TUI, Lua runtime, and MCP gateway, but returns predictable command output for automation.
Command Shape
# Devin CLI for Headless Automation
kosmokrator integrations:configure devin --set api_key="$DEVIN_API_KEY" --enable --read allow --write ask --json
kosmo integrations:call devin.devin_create_session '{"prompt":"example_prompt","idempotency_key":"example_idempotency_key"}' --json Discovery Before Execution
Agents and scripts can inspect Devin docs and schemas before choosing a function.
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 Useful Devin CLI Functions
| Function | Type | Parameters | Description |
|---|---|---|---|
devin.devin_create_session | Write | prompt, idempotency_key | Create a new Devin AI session. Provide a task prompt describing what you want Devin to do. Optionally provide an idempotency key to prevent duplicate sessions. |
devin.devin_get_session | Read | session_id | 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. |
devin.devin_list_sessions | Read | none | List all Devin sessions. Returns an overview of all sessions including their IDs, statuses, and creation times. |
devin.devin_send_message | Write | session_id, 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. |
devin.devin_get_current_user | Read | none | Get information about the currently authenticated Devin user. Use this to verify the API connection and identify which account is being used. |
Automation Notes
- Use
--jsonfor machine-readable output. - Keep credentials out of argv by using environment variables or stored KosmoKrator configuration.
- Configure read/write policy before unattended runs; use
--forceonly for trusted automation. - Use the MCP gateway instead when the agent needs dynamic tool discovery inside a conversation.