Quickstart: your first microVM runner in Slack
Create a credential-backed MicroVM runner in your AWS account and reach it from Slack.
On this page
Follow this path from an empty Evident team to your first reply in Slack. The quickstart uses the Evident-hosted credential proxy as the recommended default and keeps every MicroVM command and configuration file in one place.
Before you start
Plan on roughly 15–25 minutes end to end: nine hands-on steps take a minute or two each, the first deployment takes five to six minutes, and the first boot takes about 27 seconds.
-
An AWS account with
cdk bootstrapalready run for the account and region where you deploy. - The AWS CLI, Node.js, and
pnpm. - A full, non-shallow clone of the repository your runner will work on.
- An Evident team where you are an owner or admin.
- A MicroVM-supported AWS region. See the AWS runner reference for the current region list.
- The AWS permissions listed in the AWS runner reference.
-
The next step creates a CDK app and installs
@evident-ai/runner-cdkplus its peer dependencies.
Create a credential pool and connect a provider
Time: a minute or two.
Create a pool in Settings → Credentials's Managed section and connect the provider it should use. Follow Create an Evident-hosted pool for that click path. The hosted credential proxy is the recommended default; use the model provider reference for the direct-provider alternative.
Read the inference address and write the OpenCode overlay
Time: a minute or two.
Before you create a runner, open the credential pool's Inference tokens tab and select Setup instructions. The address is available before a runner exists. Put this complete OpenCode configuration file in the repository you will stage for the image:
{
"$schema": "https://opencode.ai/config.json",
"provider": {
"anthropic": {
"options": {
"baseURL": "https://<inference-base-url>/v1",
"authToken": "{env:EVIDENT_PROXY_TOKEN}"
}
}
}
}
This is a complete overlay file. The runner copies it over opencode.jsonc or
opencode.json; it does not merge the file, so include every provider and plugin you
need. See the credential proxy provider entries for
Anthropic and OpenAI shapes. Keep the credential as {env:EVIDENT_PROXY_TOKEN};
never put a token in the file.
If the overlay file is missing, the runner logs
RUNNER-OPENCODE-CONFIG-MISSING and continues without it. Commit the file before
you deploy because the staged workspace supplies it to the image. Before deploying, verify that
the file at runnerOpencodeConfigPath exists and is committed.
The overlay is the default route this quickstart uses. The opt-in
autoConfigureCredentialsProxy route and its current availability and workaround
are documented in the AWS runner reference.
Create the runner pool and generate the signing secret
Time: a minute or two.
This is an Evident Swarm — several runners behind one address.
- In the Evident web app, open Provisioners and select New provisioner. Give it a Name and select Create provisioner. No URL is needed yet: the controller must hold the secret before it can be deployed, and its URL exists only afterwards.
- Copy the secret. It is shown once. If you need to recover it, Regenerate secret invalidates the deployed secret.
Evident sets the provisioner event subscriptions and run payload inclusion automatically. You do not select a separate checkbox.
Store the signing secret in AWS Secrets Manager
Store the copied value in a Secrets Manager secret before you deploy. The JSON field must be
exactly CONTROLLER_SIGNING_SECRET, not DOORBELL_SECRET; the controller
reads it at startup.
aws secretsmanager create-secret \
--name <secret-name> \
--secret-string '{"CONTROLLER_SIGNING_SECRET":"<signing-secret>"}' Create the CDK app and install the construct
Time: a minute or two.
In an empty directory, create the TypeScript CDK app and install the published construct with its peer dependencies:
cdk init app --language typescript
pnpm add @evident-ai/runner-cdk @evident-ai/lambda-microvm-cdk aws-cdk-lib constructs
The peer-dependency floors are aws-cdk-lib ^2.240.0, constructs ^10.5.0,
and @evident-ai/lambda-microvm-cdk ^0.1.1; they are explicit because the construct
declares them as peers, so a pnpm install does not necessarily pull them in.
Look up the managed base image
Read the service-managed MicroVM image for the region you will deploy into:
aws lambda-microvms list-managed-microvm-images --region <region> Use the ARN and version from this command as the stack's base image inputs.
Write the stack
Time: a minute or two.
Stage the full repository checkout, create the construct, and declare the controller URL as an output in your own CDK stack. The overlay path is relative to the staged workspace.
import * as cdk from 'aws-cdk-lib';
import * as secretsmanager from 'aws-cdk-lib/aws-secretsmanager';
import {
EvidentMicrovmConstruct,
HOOKS_PORT,
HOOK_TIMEOUT_SECONDS,
stageMicrovmBuildContext,
} from '@evident-ai/runner-cdk';
const baseImageArn = new cdk.CfnParameter(this, 'BaseImageArn', {
type: 'String',
description: 'ARN from aws lambda-microvms list-managed-microvm-images',
}).valueAsString;
const baseImageVersion = new cdk.CfnParameter(this, 'BaseImageVersion', {
type: 'String',
description: 'Version from aws lambda-microvms list-managed-microvm-images',
}).valueAsString;
const controllerSigningSecret = secretsmanager.Secret.fromSecretNameV2(
this,
'ControllerSigningSecret',
'<secret-name>',
);
const buildContextPath = stageMicrovmBuildContext({
buildContextPath: './microvm',
workspaceRepositoryPath: './repo',
workspaceOriginUrl: 'https://github.com/acme/widgets.git',
});
const runner = new EvidentMicrovmConstruct(this, 'Runner', {
buildContextPath,
hooksPort: HOOKS_PORT,
hookTimeoutSeconds: HOOK_TIMEOUT_SECONDS,
baseImageArn,
baseImageVersion,
controllerSigningSecret,
runnerOpencodeConfigPath: 'opencode-overlay.json',
});
new cdk.CfnOutput(this, 'ControllerFunctionUrl', {
value: runner.functionUrl,
}); controllerSigningSecret is a Secrets Manager ISecret. Its JSON field
must be named CONTROLLER_SIGNING_SECRET. The construct does not create the output
for you.
Write the Dockerfile
Time: a minute or two.
Use the pinned base image and copy the staged workspace into the image. See Customising the image for additional packages and build steps.
FROM ghcr.io/sroze/evident-microvm-base:sha-c852a6f
COPY --chown=10001:10001 workspace /workspace
USER runner
WORKDIR /workspace
RUN git reset --quiet Deploy
Deploy the CDK stack that contains the construct. Time: five to six minutes. AWS stages the workspace and builds the MicroVM image during the first deployment.
npx cdk deploy Read the Function URL
The output exists because your stack declared ControllerFunctionUrl above. Read it
after the deployment finishes:
aws cloudformation describe-stacks \
--stack-name <your stack name> \
--query "Stacks[0].Outputs" Finish configuring the Provisioner
Time: a minute or two.
- Open the provisioner's detail page from Provisioners.
- Enter the output in Controller URL, then select Check.
- Select a value under Machine size.
- Select Save controller settings.
The machine-size picker is a live signed probe of your controller. Seeing your sizes means Evident reached the controller and the signing key matched.
Set the Swarm's credential default
Time: a minute or two.
After you save the controller URL, choose Default credential pool in the Swarm's Provisioner card and select Save default. Follow Set a credential default for provisioned runners for the click path. Save this default before you create the first runner: the default is read when a runner is claimed and does not affect runners that already exist.
Create the first runner
Select Create runner in the Provisioner card. The runner starts the first time
a message reaches it. For a managed runner, open the Swarm's Associated runners
tab and select Setup instructions to see the
RUNNER_OPENCODE_CONFIG guidance and inference address.
Confirm the runner is enrolled
Before connecting Slack, open the credential pool's Associated runners tab. The new runner should be listed as Waiting for credential delivery: “The runner hasn’t confirmed receiving its proxy token yet.” This confirms that the credential default is set and the runner is enrolled, not that managed inference is ready. The machine has not started yet; it starts when the first message reaches it.
Connect Slack
Time: a minute or two.
Follow the Slack setup in this order: Add to Slack, each person's Connect my Slack account, then the runner's Connectors tab → Slack tile → Any channel/DM (default for Slack). Until the workspace is connected, the runner tile offers only Connect in Settings and no add dialog.
Send the first message
@mention the bot in a channel it is in, or send it a direct message. The reply comes back in the same thread; see How messages flow for the reaction and threading details. Your first message cold-starts the newly deployed MicroVM; expect a first boot of about 27 seconds, after which the runner comes online.
On the same Associated runners row, Managed inference ready
means: “The proxy token is delivered and the proxy policy is acknowledged. You manage this
runner's OpenCode provider configuration.” This confirms token delivery and policy acknowledgment,
not that your overlay was applied. If no reply arrives, open the runner's Activity
tab: a missing overlay appears as an error entry carrying
RUNNER-OPENCODE-CONFIG-MISSING. There is no positive “overlay applied” entry to look
for because that line is not forwarded, so the Slack reply is the only end-to-end proof that the
providers are usable. For recovery, see Recover managed setup.
Check it worked
- Reader check — no CI gate covers the AWS deploy: after
Read the Function URL, confirm the deployed stack exposes a
ControllerFunctionUrloutput. - Reader check: after Finish configuring the Provisioner, confirm Choose a machine size lists your stack's sizes. This live signed probe proves reachability and a matching signing key.
- Reader check after the first message: in the Associated runners row, confirm Managed inference ready. As described in Send the first message, this confirms token delivery and policy acknowledgment, not that your overlay was applied.
- After the first message: confirm a reply arrives in the Slack thread, the end-to-end proof that the providers are usable.
If something is wrong
| Symptom | Reference |
|---|---|
| The controller URL or signing secret is rejected. | AWS runner troubleshooting |
| The machine-size picker cannot load shapes. | AWS runner troubleshooting |
| The runner has a credential but cannot use the proxy. | Recover managed setup |
RUNNER-OPENCODE-CONFIG-MISSING appears in Activity. |
Confirm the committed overlay path and redeploy. An empty Activity tab is not evidence that
the overlay landed; OpenCode runtime provenance proves the feed is live.
|
| Slack says your account is not linked. | Slack setup |