Respond to a Query Agent

The Respond to a Query agent is the core, general-purpose response agent on the Ema platform. It generates text responses by synthesizing any combination of typed inputs -- search results, documents, conversation history, structured entities, and free-form text -- using LLM reasoning. Unlike specialized response agents that are tuned for a single input type, Respond to a Query uses the full Type System through Named Inputs, making it the right choice whenever no specialized agent fits your specific input combination.

Use Cases

  • You need a flexible response agent that can work with any combination of upstream data.
  • You want to generate a response that synthesizes information from multiple sources (e.g., search results plus extracted entities plus conversation history).
  • No specialized response agent fits your specific input combination.
  • You want to route custom typed data (documents, extracted entities, chat conversations) through a single response step without a custom agent.

Inputs

Respond to a Query uses Named Inputs for its "Additional Context" section, allowing any number of labeled, typed fields to be bound from upstream agents. Common named inputs include:

Named InputTypeDescription
TextTextAny free-form text context.
Search_ResultsSearchResultsSearch results to ground the response. The agent reads passages and can cite sources.
ConversationConversationChat history for conversational awareness and multi-turn context.
DocumentDocumentDocument content to reference in the response.
EntitiesJSONStructured data (extracted fields, key-value pairs) to include in the response.
Text_With_SourcesTextWithSourcesText paired with citations, formatted for LLM consumption.

You can add your own named input fields for any supported type -- see Named Inputs and Outputs for the full list of supported primitive and framework types and instructions for adding custom fields.

Outputs

OutputTypeDescription
responseTextThe generated response.

Configurations

ParameterDescriptionDefault
instructionsInstructions that guide the response style, tone, and content.None
modelOverride EmaFusion model selection.EmaFusion default
temperatureLLM temperature.0.0

Type-Aware Input Handling

Because Respond to a Query uses the platform Type System, each input type is prepared for LLM consumption according to its type contract:

  • SearchResults are flattened with snippet text, source metadata, and relevance scores so the model can cite specific passages.
  • Documents are passed with their extracted text content; the model can reference sections by name.
  • Conversation history is formatted as turn-by-turn dialogue, allowing the model to track references like "the order I mentioned earlier."
  • Entities (JSON) are rendered as structured key-value pairs the model can embed in the response.
  • Text with Sources is presented with inline citation markers.

This means you do not need intermediate formatting agents between typed upstream data and Respond to a Query.

Choosing the Right Response Agent

  • Use Respond to a Query when you need to synthesize multiple input types, or when your input combination is non-standard.
  • Use Respond using Search Results when your input is purely search results and you need inline citations out of the box.
  • Use Respond using Action Calling Results when your input is tool execution results from Intelligent Actions.
  • Use Fixed Response when the response is deterministic and template-based.

How to Use This Agent

Synthesize search results and extracted entities into a single grounded response:

trigger -> knowledge_search --------\
 -> extract_entities --------> respond_to_a_query -> workflow_output

Combine conversation history with a document reference:

chat_trigger -> conversation_summarizer ---\
 -> document_synthesis ---> respond_to_a_query -> workflow_output

Last updated: Jul 3, 2026