Control Plane Server
ish-server is an optional HTTP service that can stream updates to clients and a command-line tool for inspecting SQLite data. Agents, tools, workflows, context, and persistence run in your application without the server. Start it when you need shared operational APIs, authentication, metrics, or a central view of saved data.
Use the public health route to check that the optional server is reachable:
- Python
- TypeScript
- Rust
- Go
- C#
- Java
from urllib.request import urlopen
with urlopen("http://127.0.0.1:8080/health") as response:
print(response.status, response.read().decode())
const response = await fetch("http://127.0.0.1:8080/health");
console.log(response.status, await response.text());
use std::io::{Read, Write};
use std::net::TcpStream;
fn main() -> std::io::Result<()> {
let mut stream = TcpStream::connect("127.0.0.1:8080")?;
stream.write_all(b"GET /health HTTP/1.1\r\nHost: 127.0.0.1\r\nConnection: close\r\n\r\n")?;
let mut response = String::new();
stream.read_to_string(&mut response)?;
println!("{response}");
Ok(())
}
package main
import (
"fmt"
"io"
"net/http"
)
func main() {
response, err := http.Get("http://127.0.0.1:8080/health")
if err != nil { panic(err) }
defer response.Body.Close()
body, err := io.ReadAll(response.Body)
if err != nil { panic(err) }
fmt.Println(response.StatusCode, string(body))
}
using var client = new HttpClient();
using var response = await client.GetAsync("http://127.0.0.1:8080/health");
Console.WriteLine($"{(int)response.StatusCode} {await response.Content.ReadAsStringAsync()}");
import java.net.URI;
import java.net.http.*;
class HealthCheck {
public static void main(String[] args) throws Exception {
var client = HttpClient.newHttpClient();
var request = HttpRequest.newBuilder(URI.create("http://127.0.0.1:8080/health")).GET().build();
var response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.statusCode() + " " + response.body());
}
}
Start the server
Set a strong administrator key before binding beyond loopback. The server refuses an unsafe non-loopback configuration.
export ISH_ADMIN_API_KEY="replace-with-a-strong-secret"
export ISH_STUDIO_HOST="127.0.0.1"
export ISH_STUDIO_PORT="8080"
export ISH_DB_PATH="./data/traces.sqlite3"
cargo run -p ish-server --release -- serve
The serve command is also the default when no subcommand is supplied. Options can be passed directly:
cargo run -p ish-server --release -- serve \
--host 127.0.0.1 --port 8080 --db ./data/traces.sqlite3 \
--workspace ./workspace --ui-dir ./public
--ui-dir <dir> and ISH_STUDIO_UI_DIR point to an optional directory of static web assets. The server validates resolved asset paths and serves a headless status response at / when no directory is configured. API access does not require a frontend or a JavaScript runtime.
Operational API
The server exposes authenticated routes under /api/. Common route groups include:
| Area | Routes | Purpose |
|---|---|---|
| Status and observability | GET /api/status, GET /api/analytics, GET /metrics | Health, aggregate usage, and Prometheus metrics. /metrics requires system-admin access. |
| Traces | GET /api/traces, GET /api/traces/:trace_id, `GET | POST /api/traces/:trace_id/scores` |
| Work and state | /api/workflows, /api/checkpoints, /api/side-effects, /api/evaluations, /api/approvals | Inspect durable workflow, checkpoint, side-effect, evaluation, and approval records; resolve or reconcile supported records. |
| Context and sessions | /api/blackboard, /api/sessions, /api/blobs, /api/chat, /api/sandbox | Operate shared context, sessions, stored blobs, chat runs, and sandbox status. |
| Skills and keys | /api/skills, /api/auth/keys, /api/tenants/quotas | Manage tenant-scoped skills and administrator-controlled API keys and quotas. |
| Audit | GET /api/audit | Read the persisted audit history. |
| OpenTelemetry trace ingest | POST /api/otel/v1/traces, POST /api/public/otel/v1/traces | Accept authenticated trace data in the common OpenTelemetry HTTP/JSON format. The /public/ route is an SDK path alias, not an unauthenticated endpoint. |
Authentication accepts a bearer token or X-Ish-Key. Keys map to a tenant and a role (admin, developer, or auditor); administrative routes require the system administrator identity. The server applies tenant request-rate limits and records supported administrative changes in its audit log.
The audit records are SHA-256 hash-linked in sequence and verified before new entries are appended. The SQLite table retains the historical name audit_merkle_chain, but the current implementation is a linear hash chain, not a Merkle tree.
GET /metrics returns Prometheus text metrics for server status, trace and span totals, active Blackboard entries, and audit event totals. It is restricted to system administrators.
SQLite inspection CLI
The same binary can inspect the database without starting the HTTP service:
ish-server logs --db ./data/traces.sqlite3 --limit 20
ish-server inspect <trace_id> --db ./data/traces.sqlite3
ish-server workflows --db ./data/traces.sqlite3 --limit 20
ish-server inspect-workflow <workflow_id> --db ./data/traces.sqlite3
ish-server memories --db ./data/traces.sqlite3
logs lists recent traces; inspect lists spans for a trace; workflows lists workflow snapshots; and inspect-workflow prints a workflow's steps. The memories command inspects the server's memory records; it does not enumerate namespaced MemoryStore or ContextStore app records. Those SDK stores use the same persistence backend but have separate collections and APIs. ISH_DB_PATH supplies the default database when --db is omitted.
Persist SDK telemetry
Configure SDK SQLite persistence to use the same database path as ISH_DB_PATH. For example, the Python SDK writes agent traces and spans to the configured file:
from ish import Agent, OpenAICompatibleModel, SQLiteLogger
logger = SQLiteLogger(db_path="./data/traces.sqlite3")
agent = Agent(
name="release_review",
model=OpenAICompatibleModel(model="gpt-4o-mini"),
instructions="Summarize release readiness.",
persistence=logger,
)
Rust, Python, TypeScript, Go, C#, and Java can all write to the shared persistence contract. The server reads those records from SQLite; it does not need to host agent execution.
Security notes
- Keep the administrator key secret and use TLS termination when exposing the service outside a trusted network.
- Non-loopback binds require a strong
ISH_ADMIN_API_KEY. - Add allowed browser origins with
ISH_CORS_ORIGINwhen a separately hosted client must call the API cross-origin. - API requests, trace ingestion, and
/metricsuse the server's authentication and authorization checks. - Static serving is optional. Use
--ui-dir <dir>only for a directory of assets you intend the server to expose.