Training an agent is mostly orchestration: create the project, import the data, start a run, wait, read the score, try something else, evaluate, deploy. It's the kind of multi-step, tool-heavy work that agents are now good at. So we made sure an agent can do all of it in Kojen.
One tool layer, four front doors
Everything you can do in the Kojen web app, from projects and datasets to Forge runs, evaluations, simulations, deployments, agents, katas and Sensei, is also exposed through the same set of tools in three other places:
- An MCP server at
https://kojen.ai/api/mcp, using streamable HTTP. - A REST API at
https://kojen.ai/api/v1, with an OpenAPI spec at/api/v1/openapi.json. - The Kojen Agent, a chat assistant in the app (and at
POST /api/v1/agent) that chains those tools for you.
Because it's one tool layer, there's no “API version” that lags the UI. A tool that works in one place works in all of them.
Why MCP
Anthropic introduced the Model Context Protocol in November 2024 as an open standard for connecting AI systems to data sources and tools, replacing a custom integration for every source with a single protocol.[1] The specification defines two standard transports: stdio for local servers, and streamable HTTP for remote ones like Kojen's.[2] That means any MCP-capable client (Claude Code, Claude Desktop, IDE assistants, your own agent) can pick up Kojen's tools with one line of config:
claude mcp add --transport http kojen https://kojen.ai/api/mcp \ --header "Authorization: Bearer kojen_…"
For anything that isn't an MCP client, the REST API covers the same ground, described in a standard OpenAPI document[3] so code generators and agent frameworks can read it directly. We also publish a /llms.txt, following the llms.txt proposal, so models browsing the site get a concise map of what's where.[4]
Tools designed for agents, not just wrapped endpoints
Anthropic's engineering guidance on writing tools for agents argues that good agent tools aren't a thin skin over an API. They should return meaningful context, be economical with tokens, and come with clearly written descriptions, and you should evaluate how well agents actually use them.[5] We took that seriously:
- Task-shaped tools.
train_model,evaluate_modelanddeploy_modeleach do the whole job in one call, instead of making the agent assemble five low-level requests. - A way to wait. Training and evaluation take seconds to minutes, so
wait_for_runlets an agent block on a run instead of polling in a loop. - Self-description.
describe_resourcesandlist_modelstell an agent what exists and which model keys are valid, so it doesn't guess. - Honest labels. Tool descriptions say plainly that prompt tuning and model search run for real, and that LoRA, full fine-tuning and RLHF for text models are previews with simulated metrics, so an agent won't report a fake win as a real one.
What a session looks like
With Kojen connected, a single request to a coding agent can cover the whole loop:
> Create a Kojen project for routing support tickets to billing, bug or how-to. Import the 40 labelled tickets in tickets.csv as its test set, run model search, then prompt-tune the winner. Evaluate the result, red-team it, and if the trust score is above 85, deploy it to staging and give me the endpoint.
create_project, thencreate_datasetfrom the CSV rows.train_modelwith model search, thenwait_for_run.train_modelagain with prompt tuning on the winning base model.evaluate_model(comprehensive) andrun_simulation(adversarial).- If the gate passes,
deploy_model, and the agent reports back the OpenAI-compatible endpoint URL.
Every step is a real record in your dojo. Open the web app afterwards and you'll find the project, runs, versions, scores and deployment exactly as if you'd clicked through it yourself.
Same permissions, no back doors
Letting an agent act for you only works if the boundaries are clear:
- API keys are created in Settings → API Keys & MCP, shown once and stored only as a hash. You can set an expiry and revoke them at any time.
- Everything runs as the key's owner, with the same row-level permissions as the web app. An agent can't see or touch anything you couldn't.
- The Kojen Agent asks before deleting anything.
Get started
The developer docs list every tool and REST endpoint, with copy-paste examples for curl, Claude Code and any MCP client. Create a key, connect your agent, and point it at a task.



