Quickstart

Get started with Knify in under 5 minutes. This guide will walk you through creating your first agentic job.

Prerequisites

Before you begin, you'll need:

  • A Knify API key (contact your administrator or see the API keys section)
  • curl or any HTTP client
  • (Optional) Your agent's workspace files

Your First Job

Set Your API Key

All API requests require authentication via the Authorization header:

export KNIFY_API_KEY="your_api_key_here"
Create a Simple Job

Let's start with a basic Cursor task that writes a Python script:

curl -X POST https://api.knify.io/jobs \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $KNIFY_API_KEY" \
  -d '{
    "spec": {
      "job_type": "cursor_task",
      "prompt": "Write a Python script that calculates fibonacci numbers"
    }
  }'

Response:

{
  "job_id": "job_abc123",
  "status": "running"
}
Check Job Status

Monitor your job's progress:

curl https://api.knify.io/jobs/job_abc123 \
  -H "Authorization: Bearer $KNIFY_API_KEY"

Response includes:

  • Current status (pending, running, completed, failed)
  • Execution events and logs
  • Sandbox ID (for continuation)
  • Error details (if failed)
Get Job Results

Once the job completes, fetch the artifacts:

curl https://api.knify.io/jobs/job_abc123/artifacts \
  -H "Authorization: Bearer $KNIFY_API_KEY"

Artifacts include:

  • Generated files
  • Execution logs
  • Agent output
  • Any reports or data produced

Continue the Conversation

Jobs can be continued to build multi-turn workflows:

curl -X POST https://api.knify.io/jobs/job_abc123/continue \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $KNIFY_API_KEY" \
  -d '{
    "spec": {
      "job_type": "cursor_task",
      "prompt": "Now run the fibonacci script and show me the output"
    }
  }'

The agent resumes in the same sandbox with all files and context preserved.

Next Steps

API Endpoint

  • Base URL: https://api.knify.io (or your self-hosted instance)
  • Authentication: Authorization: Bearer <api_key>
  • Documentation: See the API Reference section for full endpoint details