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)
curlor any HTTP client
1. Check the API is up
curl https://beta.kernelservice.com/api/v1/healthResponse:
{"status": "ok", "version": "0.1.0", "environment": "beta"}2. Create an Agent
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
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"} ]}