Contextual simplifies the development, deployment, operations, and scaling of the AI-enabled services behind your applications, automations, and integrations.

The code and data behind your solution.

Workers

Workers run the code behind your solution in TypeScript, Rust, Go, or Python. Contextual builds, deploys, and scales your Worker and provides its logs.

About Workers
use contextual_worker::{Worker, json};

fn main() -> std::process::ExitCode {
    Worker::new("hello-managed", env!("CARGO_PKG_VERSION"))
        .handler("default", |_, _| async {
            Ok(json!({
                "status": 200,
                "headers": {"content-type": "text/plain"},
                "body": "Hello from Contextual",
            }))
        })
        .run()
}

Object Types and Records

Bring your business data into your solution as records. Define custom Object Types as JSON schemas with validation and versions.

Your tenant provides an API for every Object Type so your Workers can read and write records right away.

Object Types
use contextual_worker::{Context, Value, anyhow::{Context as _, Result}, json};

pub async fn approve_invoice(ctx: &Context, id: &str) -> Result<Value> {
    let records = ctx.records();
    let invoice = records.get("invoices", id, Default::default()).await?;
    let hash = invoice["_metaData"]["hash"].as_str().context("Missing record hash")?;
    let patch = json!([{"op": "add", "path": "/status", "value": "approved"}]);
    records.patch("invoices", id, patch, hash).await
}

Ship your first Worker in minutes.

~/hello-worker · zsh
$ npm install -g @contextual-io/cli $ ctxl --version @contextual-io/cli/0.16.0 darwin-arm64 node-v24.11.0 $ ctxl config add prod --tenant-id acme-prod $ ctxl config use prod $ ctxl config login Logged in as you@acme.com. Welcome to Contextual! $ ctxl workers configure-docker --pretty { "dockerConfig": "/Users/you/.docker/config.json", "hosts": [ "images.acme-prod.my.contextual.io", "images.contextual.io" ] } $ ctxl workers create hello-worker --size small --build . \ --env "GREETING=Hello from Contextual" --config-id prod --pretty [+] Building 9.4s (8/8) FINISHED The push refers to repository [images.acme-prod.my.contextual.io/hello-worker] build-20261118170212: digest: sha256:9c1e… size: 1784 { "id": "hello-worker", "version": 1, "image": "images.acme-prod.my.contextual.io/hello-worker:build-20261118170212@sha256:9c1e…" } $ curl --fail "$WORKER_URL/" {"greeting":"Hello from Contextual"} $ ctxl workers logs hello-worker --config-id prod [hello-worker-6d4f9c7b8-k2x9p/worker] Listening on port 8080 [hello-worker-6d4f9c7b8-k2x9p/worker] Handled GET /

AI is one call away.

Classify, extract, answer, and act without managing keys or models.

Generate

Classify a message or extract an invoice into your own schema. Use a configured AI Route to choose the provider, model, retries, and fallback.

AI Routes

Search

Find the passages that answer a question from your own documents. Use a Search Profile and a named index to apply the retrieval settings you configured.

AI Search

Tools

Give an agent tools that act in your other systems. The model calls functions your handler implements.

Platform Capabilities

AI Calls

Run a saved prompt by ID and use a label such as stable to control its version. The example needs AI Calls enabled and managed host 0.18.0 or later.

Explore AI Calls
use contextual_worker::{Context, Value, anyhow::Result, json};

pub async fn answer(ctx: &Context, route_id: &str, question: &str) -> Result<Value> {
    ctx.ai().generate(json!({
        "route": route_id,
        "system": "Answer in one sentence.",
        "prompt": question,
        "maxTokens": 128,
    })).await
}

Build with a coding agent.

Give your coding agent access to Contextual documentation and the tools to build and deploy.

Solution AI Knowledge MCP

Give your agent tools to search and read the docs. Add this server to your agent and follow the sign-in prompt.

https://contextual-docs-mcp.contextualio.workers.dev
Connect your coding agent

Solution AI Connect

A plugin for Claude Code and Codex with Contextual docs, CLI, and data-modeling skills.

Get the plugin

Contextual CLI

Your agent uses ctxl to deploy Workers and work with your tenant.

npm install -g @contextual-io/cli
View on npm