In early development
APIs, AI Agents, workflows and integrations made simple
A runtime for microservices
Business analysts, enterprise architects and subject matter experts describe a service in Tessere script. Tessere checks the script and runs it. Software engineers build the foundations the scripts use.
Tessere hasn’t had its first release, so there is nothing to install yet.
Building a service, step by step
The hello service is the smallest service that does something: POST /hello is received by a listener which starts a workflow that builds a greeting. Here is its script, index.tess, one part at a time, and then how to run it and call it.
-
1 Start with the project and its configuration
A project holds the whole service. Its configuration gives the values that the rest of the script reads: the port, from the environment variable
PORTor else 8080, and the greeting.index.tessLines 1 to 6 Project title = "Hello" Config port = %env(PORT, "8080")% greeting = "Hello" -
2 Add a listener
A listener receives requests. This one,
api, takes HTTP requests on the port from the configuration.index.tessLines 8 to 10 HttpListener(api) Config port = {{ config.port }} -
3 Add a route
A route picks out the requests it handles, here by method and path:
POST /hello.index.tessLines 12 to 15 Routes Route(hello) method = "POST" path = "/hello" -
4 Start a workflow
The route’s handler starts the workflow
greet, and builds its parameters from the request. The name comes from the request’s body.index.tessLines 17 to 21 Handlers Handler Workflow(@greet) params name = {{ request.body?.name }} -
5 Send a response
When the workflow has finished, a responder turns its result into the response. Here the body holds the workflow’s message.
index.tessLines 23 to 26 Responders Responder(greeting) body message = {{ workflow.message }} -
6 Write the workflow
The workflow says what it takes and what it gives: a name and a message, both strings. Tessere checks both on every run. Its one step builds the greeting from the configuration and the name.
index.tessLines 28 to 41 Workflow(greet) Params name: string Result message: string Steps DataStep(message) resolver = {{ return { message: `${config.greeting}, ${params.name}!` } }} -
7 Run it
tessere runchecks the script, then starts the service. It listens on port 8080, or on the port inPORT.Terminal tessere run --script index.tess -
8 Call it
From another terminal, send it a name. The greeting comes back as the response.
Terminal curl -X POST localhost:8080/hello \ -H 'content-type: application/json' \ -d '{"name":"Ada"}' # {"message":"Hello, Ada!"}
The problem
Every handoff loses information
Most enterprise software is delivered through a chain of handoffs. Business analysts, enterprise architects and subject matter experts describe what is needed, in designs, documents and conversations. Software engineers then translate that into code.
Each handoff loses information.
The results are friction, delays and defects, and systems that drift from what the people who understand the business intended.
Subject matter experts in the driver’s seat.
Delivery doesn’t end the handoffs. Once engineers have built the service, its business rules live in code that analysts, architects and subject matter experts often can’t read, or can’t reach. To find out how a rule was implemented, they have to go through an engineer.
The idea
Business-driven API development for analysts and domain experts
The domain experts describe the service themselves, in a Tessere script. The script says which events the service listens for, which workflow each event starts, which other systems it calls, and how data moves between them. Tessere checks the script, then runs it.
That turns the usual order around, and puts business analysts, enterprise architects and subject matter experts in the driver’s seat. The script is what runs, so how a business rule works is written there for them to read, without going through an engineer.
Authors write a script instead of application code. Scripts do contain small expressions, in JavaScript by default.
How a request flows
A small tea shop shows the way. Its customer lookup asks three of the shop’s other systems at once: a customer database, an order history and a loyalty programme. The shop’s script is split into files, and each step of a request is done by a few of their lines.
Choose a step to open the file that does it, with those lines highlighted.
-
1 A listener receives the request
Such as an HTTP request on a port. The shop’s listener,
shop, takes its port from the configuration.src/listener/web-listener.tess, lines 2 to 4 HttpListener(shop) Config port = {{ Number(config.port) }} -
2 A route matches it
One of the listener’s routes matches the request, for example by method and path. This one matches
GET /customers/{customerId}.src/listener/web-listener.tess, lines 8 to 10 Route(customer) method = "GET" path = "/customers/{customerId}" -
3 The handler picks a workflow
The route’s handler picks a workflow and builds the workflow’s parameters from the request. Here
customerIdcomes from the path.src/listener/web-listener.tess, lines 13 to 16 Handler Workflow(@customer-overview) params customerId = {{ request.params.customerId }} -
4 The workflow runs its steps
In order. A step computes a value, calls another system through a connector, ends the workflow early, or writes a log record. Each step’s value is kept in the workflow’s state, so later steps can use it. Here a
BundleStepasks the three systems at once, with the threeConnectorSteps on lines 33 to 49. AHaltStepends early if the customer is unknown.src/workflow/web/customer-overview.tess, lines 27 to 73 Steps BundleStep(sources) description = "Ask the three systems at once" concurrent = true Steps ConnectorStep(profile) connector = @backend options method = "GET" path = {{ `customers/${params.customerId}` }} ConnectorStep(orders) connector = @backend options method = "GET" path = "orders" query customer = {{ params.customerId }} ConnectorStep(loyalty) connector = @backend options method = "GET" path = {{ `loyalty/${params.customerId}` }} // After all steps have been executed we can read the three responses as // state.profile, state.orders and state.loyalty. The steps that follow this // bundle step see only what this gives, as state.sources (i.e. the ID of // this step). resolver = {{ if (state.profile.status !== 200) { return null } return { ...state.profile.data, orders: state.orders.data, loyalty: state.loyalty.data } }} HaltStep(missing) // Did the bundle step before this step resolve into null? condition = {{ state.sources === null }} resolver = {{ ({ found: false, customerId: params.customerId }) }} DataStep(overview) resolver = {{ ({ found: true, customerId: params.customerId, ...state.sources }) }}4 Calling systems through a connector
Each
ConnectorStepnames the connector@backend, which holds the address and the timeout. Here it points at stand-ins for the shop’s systems. Pointing it at the real systems would change nothing else.src/connector/backend-connector.tess, lines 2 to 5 HttpConnector(backend) Config baseUrl = "http://127.0.0.1:{{ config.backend_port }}" timeout = 5_000 -
5 A responder turns the result into a response
The workflow’s result goes back to the route, whose first matching responder turns it into the response: a 404 if the customer wasn’t found, otherwise the overview.
src/listener/web-listener.tess, lines 18 to 24 Responders Responder(unknown) condition = {{ !workflow.found }} statusCode = 404 body = {{ workflow }} Responder(found) body = {{ workflow }}
tea-shop
- src
- index.tess
- data
- shop.yaml
- connector
- backend-connector.tess
- listener
- backend-listener.tess
- web-listener.tess
- workflow
- backend
- backend-customer.tess
- backend-loyalty.tess
- backend-orders.tess
- backend-pay.tess
- backend-payment.tess
- web
- checkout.tess
- customer-overview.tess
- quote-shipping.tess
- backend
// The shop, which clients call.
HttpListener(shop)
Config
port = {{ Number(config.port) }}
Routes
// What the shop knows about a customer, from three systems at once.
Route(customer)
method = "GET"
path = "/customers/{customerId}"
Handlers
Handler
Workflow(@customer-overview)
params
customerId = {{ request.params.customerId }}
Responders
Responder(unknown)
condition = {{ !workflow.found }}
statusCode = 404
body = {{ workflow }}
Responder(found)
body = {{ workflow }}
// Scenario 1: a concurrent bundle. Three systems are asked at once, so
// the answer takes as long as the slowest of them, not all three added
// up.
Workflow(customer-overview)
description = "What the shop knows about a customer."
Params
customerId: string
// Every way the workflow ends gives this shape: the halt for a
// customer the shop doesn't know, with found = false and the
// customerId, and the last step, overview, with the rest. Without a
// resolver, the result is the value of the last step that produced
// one.
Result
found: boolean
customerId: string
name?: string
country?: string
orders?:
- id: string
total: number
loyalty?:
tier: string
discount: number
Steps
BundleStep(sources)
description = "Ask the three systems at once"
concurrent = true
Steps
ConnectorStep(profile)
connector = @backend
options
method = "GET"
path = {{ `customers/${params.customerId}` }}
ConnectorStep(orders)
connector = @backend
options
method = "GET"
path = "orders"
query
customer = {{ params.customerId }}
ConnectorStep(loyalty)
connector = @backend
options
method = "GET"
path = {{ `loyalty/${params.customerId}` }}
// After all steps have been executed we can read the three responses as
// state.profile, state.orders and state.loyalty. The steps that follow this
// bundle step see only what this gives, as state.sources (i.e. the ID of
// this step).
resolver = {{
if (state.profile.status !== 200) {
return null
}
return {
...state.profile.data,
orders: state.orders.data,
loyalty: state.loyalty.data
}
}}
HaltStep(missing)
// Did the bundle step before this step resolve into null?
condition = {{ state.sources === null }}
resolver = {{ ({ found: false, customerId: params.customerId }) }}
DataStep(overview)
resolver = {{ ({ found: true, customerId: params.customerId, ...state.sources }) }}
// The shop's other systems: here, the systems listener below.
HttpConnector(backend)
Config
baseUrl = "http://127.0.0.1:{{ config.backend_port }}"
timeout = 5_000
Calling it
In this example, stand-ins play the three systems, and each takes about 300 ms to answer. Because the three are asked at once, the answer takes about 0.3 s instead of 0.9 s.
curl localhost:8080/customers/ada
# {"found":true,"customerId":"ada","name":"Ada Lovelace","country":"NL","orders":[…],"loyalty":{"tier":"gold","discount":0.1}}
curl localhost:8080/customers/nobody
# 404 {"found":false,"customerId":"nobody"}
A workflow doesn’t care how it was started
A workflow knows nothing about HTTP: it takes parameters and returns a result. So the same workflow can also be started by a schedule, by a file arriving in a folder, or by an AI agent that calls it as a tool. It can be reviewed on its own, too. Changing an API’s shape changes only the route’s mappings, not the workflow.
Schedules and files are drafts. See Drafts and planned.
Checked before it runs
A script is plain text, by convention index.tess, so it can be stored, diffed and reviewed in Git. It is made of nested blocks. Each block has a type, such as HttpListener or Workflow, and the type decides what the block accepts: its attributes, the blocks it can hold, and where expressions may appear.
That is why tessere validate can check a whole script before anything runs. A script can span many files, and tessere bundle writes it out as a single file for deployment.
tessere validate --script index.tess # check a script
tessere run --script index.tess # check it, then start the service
tessere bundle --script index.tess --target dist # check it, then write it as one file
index.tess:30:24: error DSL_UNRESOLVED_REFERENCE: Nothing is defined with the id 'gret'. Available: greet
index.tess:42:15: error DSL_UNKNOWN_ATTRIBUTE: HttpResponder has no 'statuscode'. Available: condition, statusCode, headers, body
Validation checks references between blocks, attributes, the names each expression reads, and what each step sends to its connector. Each error gives the file, line and column, and lists the alternatives. tessere validate exits non-zero on errors, so it can run in CI.
Checked on every run, too
The hello service’s workflow takes a name and gives a message, both strings, and Tessere checks both on every run. A request whose parameters don’t fit the workflow gets a 400 before the workflow starts. A request that no route matches gets a 404.
curl -X POST localhost:8080/hello -H 'content-type: application/json' -d '{}'
# 400: the workflow requires a name
curl localhost:8080/nope
# 404: no route matches
What script authors are owed
A script is a program, even when its author isn’t a programmer. So Tessere aims to give authors what programmers expect.
Works today
- Validation before deploy
- Clear errors, with the file, line and column
Planned
- Testing, with
tessere test - Debugging, in a VS Code extension
- Observability in production, with OpenTelemetry
Who does what
One person may hold several of these roles.
Engineers stay essential, in a different role
They build the components that scripts are made of: listeners for incoming traffic, and connectors to databases, queues and APIs. They assemble those components into distributions, and they support the domain experts, as on any team.
| Role | What they do |
|---|---|
| Business analyst | Writes and maintains workflows; defines inputs, outputs and business rules; tests and debugs scripts |
| Enterprise architect | Decides which systems a service integrates with and how; reviews scripts for architectural fit |
| Subject matter expert | Describes and validates domain behavior; reads and reviews scripts; may write simpler workflows |
| Software engineer | Builds components; supports script authors; may build services in TypeScript directly |
| Platform / operations | Runs services; manages configuration, secrets, scaling and monitoring |
Works today
What it does today
Everything in this part runs today. Agents have a part of their own, after this one. Drafts and planned work are listed apart, further down.
-
Receiving requests
An HTTP listener with routes, matched by method, and by path with path parameters. Each route’s handlers run in order, each starting a workflow or an agent, and the first responder whose condition holds sends the response. A request whose parameters don’t fit the workflow gets a 400 before the workflow starts.
-
Workflows
Typed parameters and result, checked on every run. Steps compute a value (
DataStep), end early (HaltStep), call a system (ConnectorStep), run another workflow (WorkflowStep), group steps to run one after another or all at once (BundleStep), wait (DelayStep), and write a log record (LogStep). Any step can have a condition. -
Calling HTTP APIs
An HTTP connector with timeouts. It retries only calls whose method is safe to repeat, so a
POSTis never sent twice. -
Validation before anything runs
References between blocks, attributes, the names each expression reads, and what each step sends to its connector. Errors give the file, line and column, and list the alternatives.
-
Expressions
JavaScript by default, limited to a safe subset of the language. An expression can read only the names in scope where it is written. Mustache templates are available for documents such as HTML or XML.
-
Configuration
Values come from environment variables, with defaults. Secrets are read from the environment and can’t have a default, so a secret is never written in the script. Values can also come from project files (text, JSON, YAML), and a
.envfile serves local development. -
Logging
Two logs: a system log for the people who run the service, and an app log for script authors. Records are JSON lines on stdout. Every record of a request names its session. Detailed logging can be turned on for one workflow or step.
-
Shutting down
On
SIGTERM, the service stops accepting requests, lets those in progress finish, and flushes its logs. -
Extending
Tessere has no plugins. Engineers build components and wire them into a distribution of their own. Tessere ships the Standard Distribution, and scripts are written the same way for every distribution. Engineers can also use Tessere as a TypeScript library.
Works today
Agents
An agent is a workflow whose steps a model chooses while it runs. It is written in the same kind of script. It gets instructions, a prompt, and tools: the project’s own workflows and other agents, with nothing else to define. This one reads its instructions from a file of the project.
Its answer is checked against its result, as any workflow’s is. This agent’s only tool is a workflow of the project, shipping-cost.
// The model the agent thinks with.
OpenAIModel(agent-model)
Config
apiKey = {{ config.openai_api_key }}
model = "gpt-6-luna"
Agent(shipping-assistant)
description = "An agent that Answers questions about shipping costs"
model = @agent-model
instructions = %file("INSTRUCTIONS.md")%
// The earlier turns of the conversation, before the question.
messages = {{ params.history }}
prompt = {{ params.question }}
maxTurns = 4
Params
question: string
history?:
- role: "user" | "assistant"
text: string
// The shape of the answer: asked of the model as structured output,
// and checked like any workflow's result.
Result
answer: string
// The agent's tools are workflows of this project, or other agents.
// The model can use the shipping-cost workflow as a tool: the workflow's
// id is the tool's name and the workflow Params define to tool input.
Tools
Workflow(@shipping-cost)
Started like a workflow
A route calls an agent as it would a workflow, and its responder reads the result as agent.
Handler
// Calls the agent. Its result is kept as agent, for the
// responders below.
Agent(@shipping-assistant)
params
question = {{ request.body?.question }}
// The conversation so far, which the chat page keeps.
history = {{ request.body?.history ?? [] }}
// Streams to a client that asks for server-sent events: the
// answer as the model writes it, and when the agent uses a
// tool. Nothing else of the run is sent. Other clients get
// the JSON response.
Stream
events = ["tool.started", "tool.completed"]
Responders
Responder(answer)
body
answer = {{ agent.answer }}
-
Fixed parameters
The script can fix a tool’s parameters so that the model neither chooses nor sees them, such as the customer a request is for.
-
Limits
A run stops after a set number of turns or a timeout, and can also be given a token budget.
-
Models
Models come from Anthropic, OpenAI or Amazon Bedrock. Moving an agent to another provider changes one reference, such as
model = @agent-modelabove. -
Agents as tools
Agents can use other agents as tools.
-
Streaming
A client can receive an agent’s answer as server-sent events, while the model writes it. Nothing about the run is sent unless the script names it, and the same route still serves plain JSON to clients that don’t ask for a stream.
-
MCP
An MCP listener offers a project’s workflows and agents as tools to agents elsewhere, over the Model Context Protocol.
Planned
Debugging, as planned
A VS Code extension for writing and debugging scripts is planned. It doesn’t exist yet. The pictures below are concepts of it, drawn for this page.
They show it debugging the tea shop’s checkout workflow, for a POST /checkout request from customer ada with the items tea (quantity 2) and pot (quantity 1).
What the extension is meant to do
- Show validation errors in the editor while you write, with completion and hover documentation.
- Start a service in debug mode with
tessere debug, locally or attached to one running in a container. - Set breakpoints on a route, a step or a connector call, and pause there.
- Step over (run the current step), step into (a bundle, a branch or another workflow), step out, and continue.
- Inspect the workflow’s parameters, its state with each earlier step’s output, and a connector call’s request and response.
- Evaluate expressions against the paused state.
- Use conditional breakpoints, and break when a step fails.
DataStep(total). Variables shows the workflow’s parameters and its state, with each earlier step’s output. The Debug Console evaluates expressions against the paused state.DelayStep(backoff), which waits the 250 ms the payment system asked for.Drafts and planned
Tessere is in early development and hasn’t had its first release, so there is nothing to install yet. What follows is kept apart from what works today.
Draft
They run today, but their design may still change
- Schedules. Run workflows and agents on a timetable of cron expressions, in a chosen time zone.
- Files. Start workflows when files are created, changed or deleted in a directory. Read and write files inside a root directory that no path can leave.
- Databases: PostgreSQL and MySQL. The SQL is fixed in the script, and values are sent to the database apart from it, so data from a request can never change a statement. Statements are checked against the database when the service starts. Each step runs in a transaction of its own, so a step that fails has changed nothing.
- MCP connector. Workflows and agents use the tools of other MCP servers.
Planned
Not available yet
- A VS Code extension for writing and debugging scripts, shown as concepts above.
tessere test, which runs tests for a script with its connectors replaced by mocks.- A Docker image, for running
tesserewithout Node.js and for building service images. - Durable workflows that survive crashes and restarts, with a built-in backend or on Temporal.
- Health and readiness endpoints, OpenTelemetry traces and metrics, and secrets managers.
- More listeners and connectors, such as Kafka, gRPC, GraphQL, OpenAPI, AMQP, MongoDB and Redis.