Create an agent

Create an agent

There are four ways to get an agent onto LagrangeCloud. All of them end in the same place: a versioned agent with an endpoint, a Playground and a page in the console.

In the console, go to Agents → New agent.

From Codex or Claude Code

If the agent already works in Codex or Claude Code, deploy it from there with the lagrange plugin. This is the shortest path; see the Quickstart.

Upload a folder

On Upload folder, drop the agent's folder or a .zip of it (up to 50 MB). LagrangeCloud reads it the same way the plugin does:

  • the folder's lgr.yaml, when it has one, or else
  • AGENTS.md or CLAUDE.md as the instructions, skills from .claude/skills, skills, .codex/skills or .agents/skills, MCP servers from .mcp.json or .codex/config.toml, and setup from requirements.txt or package.json. Other visible files are copied into the agent's working directory; dot-files, .git and node_modules are left out.

The Review step shows what it found. Pick the harness and model, fill in any secrets the agent needs, and click Deploy. Keys written in an MCP config become secrets rather than being uploaded with the files.

Describe it

On Describe it, write what the agent should do, for example "Answer customer questions about orders on our Shopify store, and hand anything about refunds to a person", and click Draft agent.

The Describe it tab of New agent, with a description of a pull request review agent

A model drafts:

  • the instructions (AGENTS.md),
  • up to a few skills,
  • the secrets those skills read, each named for its service, with what it is for and where to get it.

Drafted agents call outside services over their HTTP APIs from skills, with the secrets as environment variables, so they need no MCP servers to run. Edit anything in the draft, then Continue to the same review as an upload. Drafting takes a minute or so and needs credit left on your organisation.

Try the demo agent

Try the demo agent on the Agents page deploys support-desk, a customer support agent for a made-up shop, and opens a run with a sample message. It has the parts a real agent would have: instructions, a policy skill, data files and a local MCP server that looks up orders and issues refunds.

From the command line

With the CLI, in the agent's folder:

lgr import --harness codex      # writes lgr.yaml from what the folder has
lgr secrets set LINEAR_TOKEN --from-env
lgr deploy
lgr chat support-bot

lgr import takes --harness, --model and --mcp a,b (MCP servers to bring along from your Codex or Claude Code config). Check lgr.yaml before deploying: only the files listed under files: are uploaded.

Harnesses and models

HarnessWhat it is
codexOpenAI's Codex agent
claude-codeAnthropic's Claude Code agent
lagrangeOur harness. It runs on the Claude Code runtime today and needs your own ANTHROPIC_API_KEY secret, since platform models aren't available to it yet. Learning from the agent's runs is coming next.
your ownA command in the agent's files that speaks the harness protocol

Without a model of your own, agents call platform models: Codex agents use tensorblock/gpt-6.1-sol and Claude Code agents tensorblock/claude-opus-5-5 by default. Choose another platform model in the agent's Settings. Codex agents take OpenAI models and Claude Code agents take Claude models. To use your own provider account instead, set OPENAI_API_KEY or ANTHROPIC_API_KEY as a project secret; runs then call the provider with your key and aren't charged for tokens (see Billing).

After deploying

  • Set missing secrets under Settings → Secrets, or with lgr secrets set NAME. A deploy warns about secrets the project doesn't have yet; calls that need them fail until they are set.
  • Add MCP servers that couldn't be deployed, such as ones that ran on your machine, under Setup → MCP servers and secrets on the agent's page.
  • Change the agent with Adjust or a new deploy.