Quickstart: your first agent
Sign up, create an agent, talk to it through the API, and open it in the chat app. It takes about ten minutes and needs no provider account of your own.
The agent in this guide runs on gpt-5.1, a platform model that every organization can use without adding a provider key.
Sign up and create an organization
Go to app.2kw.ai and sign up. The console then asks you to Create An Organization: give it a name, keep or change the slug it suggests, and create it.
Everything in the rest of this guide belongs to that organization. If a colleague already invited you, accept the invitation instead of creating a new organization.
Create an API key
Open API Keys in the sidebar and click Create. The full key is shown once, so copy it now and export it for the commands below:
export AI_2KW_API_KEY=sk_your_api_key
See API Keys for managing and revoking keys.
Create the agent
In the console: open Agents in the sidebar and click New agent. Fill in:
- Name:
first-agent - Model:
gpt-5.1 - Instructions:
You are a concise assistant. Answer in two sentences at most.
Click Save. The console stores the agent and its first version together, and the latest label points at that version, so the agent can run straight away.
Or from the terminal: install the CLI and create the agent. The CLI signs in with the key in AI_2KW_API_KEY, and stores the agent and its version in two calls; the agent runs only once it has a version.
npm install -g @2kw/ai
backbone agents create --name first-agent --model gpt-5.1 \
--instructions "You are a concise assistant. Answer in two sentences at most."
# copy the "id" from the output, then create version 1:
backbone agents versions create --agent <agent-id> --model gpt-5.1 \
--instructions "You are a concise assistant. Answer in two sentences at most."
Talk to it through the API
Call POST /v1/responses and name the agent in model as agent/first-agent. The instructions and the model come from the agent, so the request only carries your message:
Request
curl https://api.2kw.ai/v1/responses \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $AI_2KW_API_KEY" \
-d '{
"model": "agent/first-agent",
"input": "What can you help me with?"
}'
The answer is in output, as a message item with output_text. model in the response names the version number that ran, for example agent/first-agent@1. That number is for reading only: requests address a version by label, such as @latest or @production, never by number.
{
"id": "resp_…",
"object": "response",
"status": "completed",
"model": "agent/first-agent@1",
"output": [
{
"type": "message",
"role": "assistant",
"content": [
{ "type": "output_text", "text": "I answer questions and draft short texts." }
]
}
],
"conversation": { "id": "conv_…" }
}
Continue the conversation
Send the next message with the previous response's id. 2kw.ai keeps the history, so you do not replay the transcript yourself:
curl https://api.2kw.ai/v1/responses \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $AI_2KW_API_KEY" \
-d '{
"model": "agent/first-agent",
"previous_response_id": "resp_…",
"input": "Summarise that in one sentence."
}'
With the CLI, pass the conversation id printed under the first answer: backbone agents run first-agent "Summarise that in one sentence." --conversation conv_…. See Conversations for creating and reading conversations directly.
Open it in the chat app
In the console, open Agents, open first-agent from the list and click Open in chat at the top of its page (the row's actions menu has it too). The chat app opens at chat.2kw.ai with first-agent selected; sign in with the same account and send a message. Every member of your organization can chat with the agent the same way, without an API key.
Next steps
Your agent answers from the model alone. Each of these adds one capability to it:
- Answer from your documents: upload them to a knowledge base and give the agent the
file_searchtool; answers then carry citations. - Act in your systems: add function tools that call your webhooks, or connectors to MCP servers, and require a human approval where it matters.
- Pin what callers get: label a version
productionand callagent/first-agent@production, so a new version changes nothing until you move the label (see Versions and Labels). - Put it in your product: embed the agent in your own web application with the Embeddable Surface.
- Measure it: trace every run in Observability, and compare versions with Datasets and Experiments.