Agent Building Blocks
Agents in Elemental are built using a set of building blocks. Each block is a separate logical component with limited responsibility. The blocks are reusable and may be provided with several different implementation serving specific use case but the same general purpose.
The diagram below shows the building blocks of an agent in Elemental. The blocks are connected with solid lines if they are required for the agent to work. The blocks connected with dashed lines are optional and may be used in specific use cases.

The definition of what constitutes an agent in Elemental is broad and encompasses what could be considered a simple assistant with simple request-response capabilities to a more complex structure with internal iterative reasoning and tool execution.
The generic agent composition is split into two major parts i.e. Agent Logic which includes all interactions with the language model and Tool Box which includes all interactions with the tools. The agent logic is responsible for the agent's reasoning and decision-making process, while the tool box is responsible for handling any interaction with the external systems.
The execution pattern of the agent will require using the components that match the desired outcome. For example, if the agent is required to use a tool, the Tool Box needs to be used and prompt strategy needs to support the tool usage.
We can consider the example composition patterns:
- Simple assistant - Agent with no tools and simple request-reply prompt strategy.
- Generic agent - Agent with tools and internal iterative reasoning.
- Conversational agent - Agent with tools and internal iterative reasoning with ability to collaborate with other agents.
Each of the patterns above can be built using the same building blocks but with different configuration and orchestration depending on how agent logic and agent main function is chosen.
Definitions
For the clarity, the building blocks in Elemental may be defined as:
- Agent Logic - Component of the agent responsible for managing the language model interaction.
- Language Model - Choice of the language model and its parameters to use for this agent.
- Prompt Strategy - The method language model system prompt and order of consecutive message will be run.
- Prompt Template - Generic template for the system prompt including variables that will be rendered into complete message at runtime.
- Agent Persona (variable in Prompt Template) - The specific characteristics of the agent, e.g. tonality, specialization, additional formatting instructions.
- Memory - The component responsible for storing the agent's memory. This can be used to store information about the agent's past interactions, preferences, and other relevant data.
- Short Memory - The component responsible for storing the agent's internal message history withing the current session.
- Long Memory (Optional) - The method of bringing information from messages other than the current session will be brought back to the agent.
- Tool Box (Optional) - Information about the external systems agent can access and other methods to bring additional information to an agent that goes beyond the language model internal knowledge.
- Tools (Standalone modules) - Exact implementation of how the given external command is executed, its required arguments and results that are brought back.