Foundations

The primary goal of re-factor is to provide users with a means of re-imagining, re-factoring, and revolutionizing the way they build business processes. To this end, re-factor provides a set of runnables that are composable, executable, and extensible building blocks that allow users to embed AI into their processes in an intuitive and powerful way.

Types

Runnables within re-factor can be classified into one of the following types:
RunnableDescriptionStatus
CompletionsGenerate text and structured responses to prompts with LLMs.🟒
ToolsProvide interfaces to external systems and resources.🚧
FlowsOrchestrate complex processes by chaining prompts and tools.🚧
AgentsOrchestrate dynamic processes by empowering LLMs to take action.🚧

Common parameters

name
string
required
The name of the runnable. This is a human-readable label that helps you identify and manage runnables in your system.
type
enum<completion | flow | tool | agent>
required
The type of the runnable. This is used to determine the runnable’s behavior and can be used to filter and organize runnables in your system.
description
string
A description of the runnable. This can provide additional context to users and help them understand the purpose and functionality of the runnable.
tags
array<string>
An array of tags that categorize the runnable. This can be used to filter and organize runnables in your system.
schemas
object
An object that declares schemas that can be used within the runnable. The keys of the object are the names of the schemas and the values are the schemas themselves. Schemas must be valid JSONSchema Draft 7 objects.
resources
array<EmbeddedResource>
An array of resources that can be used within the runnable. Resources are named entities that can be referenced by name within the runnable’s configuration.See the Resources Guide for more details, schemas, and examples.
prompt
Prompt
Required in completions and agents and often used within the tasks of flows.See the Prompts Guide for more details, schemas, and examples.
llms
array<LLMConfiguration>
Required in completions and agents and often used within the tasks of flows.Provides one or more LLM configurations that can be used within the runnable to generate responses.See the LLMs Guide for more details, schemas, and examples.

Prompts

prompts are required in completions and agents and very commonly used in flows. They provide the context and instructions for the LLM to generate a response.