Skip to content

Quick Start

This guide walks you through submitting your first task to the Kernel Service API.

Prerequisites

  • A tenant ID and API key (contact us for beta access)
  • curl or any HTTP client

1. Check the API is up

Terminal window
curl https://beta.kernelservice.com/api/v1/health

Response:

{"status": "ok", "version": "0.1.0", "environment": "beta"}

2. Create an Agent

Terminal window
curl -X POST https://beta.kernelservice.com/api/v1/agents \
-H "Content-Type: application/json" \
-H "X-Tenant-ID: YOUR_TENANT_ID" \
-H "X-API-Key: YOUR_API_KEY" \
-d '{
"name": "My First Agent",
"persona": {
"role": "AI assistant",
"communication_style": "professional and helpful"
},
"objectives": ["Help with sales tasks"]
}'

Save the agent_id from the response.

3. Submit a Task

Terminal window
curl -X POST https://beta.kernelservice.com/api/v1/tasks \
-H "Content-Type: application/json" \
-H "X-Tenant-ID: YOUR_TENANT_ID" \
-H "X-API-Key: YOUR_API_KEY" \
-d '{
"agent_id": "AGENT_ID_FROM_STEP_2",
"objective": "Get the details for lead #456 and summarise them"
}'

4. Review the Result

The response includes:

  • output — the agent’s final response
  • metrics — tokens used, cost, latency
  • steps — every reasoning step and tool call in the audit trail
{
"status": "completed",
"output": {"response": "Lead #456 is Sarah Patel..."},
"metrics": {
"total_input_tokens": 1089,
"total_cost_cents": 0.014,
"elapsed_ms": 4157
},
"steps": [
{"step_type": "reasoning", "model_used": "gemini-2.0-flash"},
{"step_type": "tool_call", "input": {"tool_name": "rol.leads.get"}},
{"step_type": "reasoning", "model_used": "gemini-2.0-flash"}
]
}

Next Steps