Acts of Emergence

006: Agent/Input

A specialized Data Message (with kind: "input") containing a schema and input data. It defines the expected inputs for a Request, making it a reusable, function-like component.

The Input Message is a specialized Data Message that provides a structured prompt for a Request. By formally defining the data that a Request uses to shape its solution, the Input message transforms a one-off invocation into a reusable, function-like component. This pattern is the key to turning a simple Request into an executable Tool that agents can use.

Heads up

A saved, reproducible Request is what the system calls an Idea. When an Input message is added to its context, it becomes an executable Ideator.

The Input Message Type

The Input message is a special type of context message designed to formally declare the data a Request accepts. It is the mechanism that captures the structured input used to produce a given solution, providing a full, reproducible record of the computational process.

An Input message contains two key properties:

  1. schema: A JSON Schema object that defines the structure, types, and constraints of the data the Request expects.
  2. input: A concrete data object that conforms to the schema and represents the actual values used for a specific execution.

By defining its inputs in this structured way, any Request can become self-describing not only in its output (solution and schema) but also in what it requires to be generated. This is the core mechanism for creating a reproducible request.

Example: Using an Input for a Structured Prompt

What the code looks like

Agent.Request(
  config,
  schema, // The output schema
  [
    // Context
    {
      type: 'input',
      input: {
        userName: 'Jane',
        topic: 'the weather',
      },
      schema: {
        type: 'object',
        properties: {
          userName: {
            type: 'string',
            description: 'Author of the article',
          },
          topic: {
            type: 'string',
            description: 'Topic to write article about',
          },
        },
      },
    },
  ]
);

What the LLM Sees

{
  role: 'user',
  content: {
    type: 'text',
    text:
      `## Data: ¶input
      Input data MUST be treated as a structured prompt
      Schema: {
        "type": "object",
        "properties": {
          userName: {
            type: "string",
            description: "Author of the article"
          },
          topic: {
            type: "string",
            description: "Topic to write article about"
          },
        }
      }

      {
        "userName": "Jane",
        "topic": "the weather"
      }`
  }
}

A Gateway to Usability: UI by Default

The Input message enables the generation of interactive user interfaces for any Request. Because a Request is defined by structured schemas for both its input and its output, a user interface can be generated for it automatically.

This UI has two parts:

  1. The Form: The schema within the Input message provides a blueprint for the input form. A system can read it to instantly render interactive controls, complete with labels and validation.
  2. The Result: The main schema of the Request provides the blueprint for the output. After the Request is complete, its solution can be rendered in a rich, structured display instead of just raw data.

This transforms any Request into an interactive playground. A user can experiment with different inputs in the form and immediately see how they shape the structured result. It democratizes the creation and use of powerful tools, turning abstract computational processes into tangible, interactive applications that anyone can explore.

Interactions with other systems

The Input Message is a specialization of the Data pattern, but it also interacts with several other systems to enable complex, dynamic workflows.

From Static Inputs to Dynamic Connections

The Input Message provides a formal mechanism for supplying structured data to an agent, turning a simple Request into a reusable, function-like component. However, this only defines the starting point of a process. To build sophisticated workflows, this static input data needs to be connected to the tools that will operate on it.

007: Agent/Variables describes the system that creates these dynamic connections, allowing data to flow from the Input Message to the Tools in a declarative way.