Cortex · OutputText output (
Text output (response)
An agent without output.schema returns text in response. The run’s output is still an output envelope: response is required and is its only field. The model’s one turn is scripted as the JSON a model would send; no model is called.
const desk = defineAgent({
id: 'desk',
instructions: 'Answer the member in one sentence. Doors open thirty minutes before the show.',
});
const result = await desk.run('When do the doors open on Saturday?', { llm }).result;1 writes {"response":"The doors open thirty minutes before the show, on Saturday as on any night."}{
ok: true,
output: {
response: 'The doors open thirty minutes before the show, on Saturday as on any night.',
},
}Runs in this page on the installed package. The input and the expected output are defined by the example.