Skip to content
Get started

Getting Started

Create your first tool set, configure an agent, and run an objective.

This guide walks you through the core Cadenya workflow: creating a tool set, configuring an agent, and running an objective. By the end, you’ll have an agent executing a task using tools you’ve defined.

Tool sets connect Cadenya to external tool providers. In this example, we’ll create a tool set that syncs tools from an MCP server.

  1. Create a tool set with an MCP adapter. The adapter tells Cadenya where to find tools and how to connect.

    const toolSet = await client.toolSets.create({
    name: "My MCP Tools",
    description: "Tools synced from my MCP server",
    adapter: {
    mcp: {
    url: "https://your-mcp-server.example.com",
    },
    },
    });

    Cadenya connects to the MCP server and syncs the available tools into the tool set. You can view the synced tools by listing the tool set’s tools.

Agents define behavior through variations. Each variation specifies a system prompt, a model, and which tools are available.

  1. Create an agent and include an initial variation that uses the tool set from the previous step.

    const agent = await client.agents.create({
    name: "My First Agent",
    description: "An agent that uses my MCP tools",
    status: "published",
    default_variation: {
    name: "v1",
    prompt:
    "You are a helpful assistant. Use the tools available to you to complete the user's request.",
    model_config: {
    model_id: "claude/opus-4.6",
    temperature: 0.5,
    },
    agent_tools: [
    {
    tool_set: {
    tool_set_id: toolSet.metadata.id,
    },
    },
    ],
    },
    });

    Setting status to "published" makes the agent immediately available for objectives. You can also create agents in "draft" status and publish them later.

Objectives are where agents do work. You provide an initial message describing the task, and the agent executes it.

  1. const objective = await client.objectives.create({
    agent_id: agent.metadata.id,
    initial_message: "Summarize the latest data from my dashboard.",
    });

    The objective starts in a pending state, transitions to running as the agent begins work, and eventually reaches completed or failed.

  2. Retrieve the objective to see its current status and execution details.

    const result = await client.objectives.retrieve(objective.metadata.id);
    console.log(result.status.state); // "completed"

    You can also list events and tool calls to see exactly what the agent did during execution.

Now that you’ve seen the full workflow, explore each concept in depth:

  • Tool Sets — Adapters, tool management, and filtering
  • Agents — Variations, lifecycle, and tool assignment
  • Objectives — Monitoring, continuing, and providing feedback