--- title: Getting Started | cadenya description: 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. You’ll need a Cadenya account, a workspace, and an API key. See the [API Reference](/api/index.md) for authentication details. ## Create a tool set 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. ### Define the tool set 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. ## Create an agent Agents define behavior through variations. Each variation specifies a system prompt, a model, and which tools are available. 1. ### Create the agent with a variation 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. ## Run an objective Objectives are where agents do work. You provide an initial message describing the task, and the agent executes it. 1. ### Create the objective ``` 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. ### Check the result 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. ## What’s next Now that you’ve seen the full workflow, explore each concept in depth: - [Tool Sets](/guides/tool-sets/index.md) — Adapters, tool management, and filtering - [Agents](/guides/agents/index.md) — Variations, lifecycle, and tool assignment - [Objectives](/guides/objectives/index.md) — Monitoring, continuing, and providing feedback