Skip to main content
Start with an empty workspace and build a published agent that creates synthetic conference attendee records. You create every resource this guide uses: an API key, a Faker tool set, an agent, and its variation. You then dispatch an objective and stream its events from code.

What you need

  • A Cadenya account with access to a workspace.
  • A model available in that workspace.
  • A terminal with one of the supported SDKs or curl.

Build the agent

1

Create an API key

Select API Keys, click Create API Key, and name the key Quickstart.Under Objectives, select Manage. This scope lets the key create objectives and read their event streams. Click Create API key, then copy the token.Find your workspace ID in the dashboard URL. It is the value after /w/, such as workspace_01KZ950VW79SJGDGEMQPAYYCXR.Export both values in your terminal:
Cadenya shows the raw API key when you create or rotate it. If you lose the value, rotate the key and copy the replacement.
2

Create the Faker MCP tool set

Select Tool Sets, click Create Tool Set, and select MCP. Enter https://free.cadenya.com/faker-mcp as the Server URL.
MCP connection settings with MCP selected and the Faker server URL entered

The Faker MCP connection settings

Click Generate Preview. The server exposes GenerateFake, GetFakerOptions, and GenerateCurseWord.
MCP Tools Preview card listing GenerateCurseWord, GenerateFake, and GetFakerOptions as available

The tools exposed by Faker MCP

Continue with the default tool behavior. Name the tool set Faker MCP, review the configuration, and click Create Tool Set.
3

Create the agent

Select Agents, click Create Agent, and enter:
  • Name: Conference Attendee Generator
  • External ID: conference-attendee-generator
  • Description: Creates realistic synthetic conference attendee records for demos and tests with the Faker MCP tool set.
Leave webhooks, structured output, and episodic memory unset. Click Create agent.
Create Agent form for Conference Attendee Generator with its external ID and Faker-focused description

The completed Create Agent form

4

Configure the variation

The agent opens with a New Variation form. Name the variation Default and paste this into System prompt:
Under Model configuration, select a model available in your workspace and set Temperature to 0.2. Set Max tool calls to 20, then click Create variation.
Default variation form with the Faker system prompt, a selected model, 0.2 temperature, and a 20 tool-call limit

The configured Default variation

5

Assign Faker and publish

In the variation’s Assignments card, click Add, keep the assignment type on Tool Set, search for Faker MCP, and select it.
Assignments card showing one tool set named Faker MCP

Faker MCP assigned to the variation

In the agent’s Details card, open the Draft status menu and select Publish. Published agents accept objectives.
Agent Details card showing conference-attendee-generator as the external ID and Published as the status

The published agent

Dispatch an objective

Choose your language and run one example. Each request uses the agent’s external ID, so you do not need to copy its Cadenya ID.
The create call returns while the objective is Pending. Open Objectives in the dashboard and select the returned objective ID. Its timeline shows the Faker tool calls, their results, and the agent’s JSON response.

Stream objective events

An event stream starts with events emitted after the connection opens. Create another objective and connect immediately so a short run cannot finish before the watcher is ready. Choose an example to watch the agent’s messages and tool activity through server-sent events.
event.data is a discriminated union in the TypeScript SDK. Switching on data.type narrows data to the matching event interface, so fields such as toolCalled and assistantMessage are type-safe inside their cases. Both streams stay open because this agent has no structured output definition and can accept another message. Press Ctrl+C after the agent prints its final JSON response.
You now have a published agent that creates synthetic attendee data through a live MCP server, plus an event stream that exposes its work as it happens.

Next steps

Build resilient event streams

Resume after disconnects and handle every terminal event.

Build an agent that improves

Add another variation and use feedback to steer traffic.

Connect another MCP server

Connect a server, inspect its tools, and control approvals.

Use structured output

Validate the final records against a JSON Schema.