kassi-CLI
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@kassi-CLI load test the latest commit and find regressions in Splunk"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
kassi-CLI
Divines disaster, crafts the cure.
kassi is an AI agent that load-tests a code change, finds the regression in live Splunk, and writes the fix, before it reaches production. Point it at a git diff or a plain-language intent. It drives real k6 load against the affected endpoints, correlates the result with server-side telemetry from the official Splunk MCP Server, names the root cause, and hands back a validated remediation diff. For engineering and SRE teams who need to catch load-induced regressions before a 2am page.
kassi runs as an audited Burr state machine over MCP, served by
Theodosia: the driving agent sees one tool, illegal steps
are refused, and every step and refusal lands on a hash-chained ledger. Named for Kassandra, who
foresaw what others would not believe; the workflow is themed as a tarot draw, one Major Arcana
card per phase (kassi arcana lays out the spread).
Built for the Splunk Agentic Ops Hackathon (Observability track). See DEVPOST.md
for the writeup and architecture_diagram.md for the design.
The demo above is a recorded end-to-end run: it prints the state machine, then drives the whole workflow (script + analysis from the configured model, k6 docs + run, Splunk preflight and correlation) against a live Splunk.
Screenshots
|
|
|
|
|
|
| a full run: k6 + Splunk correlated, every tool call logged |
What it does
Diff or intent driven. Reads the changed endpoints from a git diff, or scores an OpenAPI spec against a plain-language intent.
Real load. Generates and runs an actual k6 test through the Grafana k6 MCP server, on top of a deterministic scaffold so a run never fails for lack of a model.
Server-side truth from Splunk. Correlates the run with windowed SPL through the official Splunk MCP Server, then runs the Splunk AI Toolkit (
StateSpaceForecast+anomalydetection) to locate the saturation onset statistically. Catches latency degradations that produce zero errors and would slip past any threshold alert.Root cause and a fix. Writes a cited analysis and a validated remediation diff that applies cleanly, screened by an independent auditor model before the verdict is sealed.
Audited by construction. A governed state machine refuses illegal steps; every step and refusal is on a hash-chained ledger that
kassi verifychecks.Hands-free guard.
kassi watchruns the whole workflow when a commit changes an endpoint, catching the regression at commit time.Model-agnostic. The same loop (drive, write, audit) runs on a local open 8B, on-prem and air-gapped, or on a frontier model, unchanged.
Self-observable. Publishes its own state-machine walk back to Splunk, so the agent is visible in the system it observes.
Measured. 0% false alarms on a live ground-truth benchmark; root cause in the top 3 100% of the time on RCAEval RE3 (details).
Related MCP server: playwright-fixer-mcp
Install
uv synckassi drives k6 through the Grafana k6 MCP server and reads
Splunk through the official Splunk MCP Server. Full
setup: docs/SPLUNK_SETUP.md.
brew install k6 && kassi warm-k6 # install k6 2.0+; warms the extension cache on first use
# alternatives: standalone binary (KASSI_K6_CMD=mcp-k6) or Docker (KASSI_K6_DOCKER=1)The Splunk step is optional: without KASSI_SPLUNK_MCP_ENDPOINT + KASSI_SPLUNK_TOKEN, kassi
skips correlation and runs k6-only. Model backend: see Configuration.
Quickstart
The fastest first success needs no Splunk, k6, or model. It runs the whole state machine against fakes:
uv run pytest # the full workflow against Theodosia's FakeUpstream and a fake model
kassi render # print the state machine
kassi arcana # the tarot spread, one card per phaseFor a full live run against a bundled demo app (starts the app, drives real k6, queries live Splunk, writes the grounded analysis):
uv run python scripts/verify_scenario.py petclinic # or storefront | feed | gateway | ordersUsage
Inspect and serve the workflow:
kassi doctor --runtime # validate the graph and runtime tool shape
kassi render # print the state machine
kassi serve # mount as an MCP server over stdio (both upstreams wired in)Drive it locally, no cloud agent. kassi pilot lets a local open model drive the FSM step by step:
it reads the reachable actions and calls step for each phase itself, doing the per-phase work as it
goes (the screen phase hands off to an independent auditor). Driver, writer, and auditor are all
the local model:
kassi pilot --intent "load test the pet listing endpoint" \
--repo-path examples/petstore --target-base-url http://localhost:8000 --splunk-index web
# or diff mode: kassi pilot --repo-path /path/to/repo --ref HEAD~1 --splunk-index webRun it in the background, triggered on diff detection. kassi watch polls a repo's git HEAD and,
when a new commit changes an HTTP endpoint, drives the whole workflow in diff mode against that
change, then prints the verdict and a proposed fix and publishes the run to Splunk:
kassi watch --repo-path /path/to/repo --target-base-url http://localhost:8000 --splunk-index web
# one-shot for a post-commit hook or CI: kassi watch --once --repo-path . --target-base-url ...Or drive it from Claude Code (or any MCP client) by registering the server:
claude mcp add --scope=user --transport=stdio kassi -- kassi serveThen ask the agent to run the workflow with the step tool, for example:
"Use the kassi step tool. Load test the pet listing endpoint against
http://localhost:8000; the spec is under examples/petstore; correlate with Splunk
index web."
The entry inputs for select_mode:
diff mode:
{"repo_path": "/path/to/repo", "ref": "HEAD~1", "target_base_url": "http://localhost:8000", "splunk_index": "web"}intent mode:
{"repo_path": "/path/with/openapi.json", "intent": "load test the checkout endpoint", "target_base_url": "...", "splunk_index": "web"}
Review recorded runs:
kassi sessions ls
kassi sessions show <app-id>
kassi logs <app-id> --refusals
kassi verify <app-id> # confirm the ledger has not been tampered withConfiguration
Variable | Default | Purpose |
|
| model backend: |
|
| model tag: an Ollama tag, or a Claude model alias/id for the Claude backends |
|
| Ollama endpoint (point at the host running the local model, e.g. a LAN box) |
| unset | Claude API key (only for |
|
| command line for the k6 MCP server (set to |
| unset | if set, run the k6 MCP server via Docker |
|
| Docker image when |
| unset | streamable-HTTP endpoint of the Splunk MCP Server (e.g. |
| unset | encrypted MCP token (sent as |
|
| stdio bridge command (runs |
| unset | skip TLS verification in the bridge (local self-signed Splunk only) |
|
| ledger / session store |
kassi serve loads these from a .env in the project root if present (see
.env.example); real environment variables take precedence. Keep .env out of git
(it is git-ignored) since the token is a credential.
When running the k6 server in Docker, a target on the host is reachable as
http://host.docker.internal:<port> from inside the container.
How it works
stateDiagram-v2
[*] --> Initialize
state "Initialization" as Initialize {
[*] --> LoadConfig
LoadConfig --> ValidateEnvironment
ValidateEnvironment --> DetectExecutionMode
DetectExecutionMode --> Ready
ValidateEnvironment --> FatalError: Invalid Config
}
Ready --> InputProcessing
state "Input Processing" as InputProcessing {
[*] --> SelectMode
SelectMode --> ReadDiff : Diff Mode
SelectMode --> ParseIntent : Intent Mode
ReadDiff --> ValidateDiff
ValidateDiff --> ExtractEndpoints
ValidateDiff --> ParseFailure : Invalid Diff
ParseIntent --> NLPAnalysis
NLPAnalysis --> ExtractRequirements
NLPAnalysis --> ParseFailure : Low Confidence
ExtractEndpoints --> MergeContext
ExtractRequirements --> MergeContext
ParseFailure --> RetryParser
RetryParser --> SelectMode : Retry
RetryParser --> Abort : Max Retries
}
MergeContext --> KnowledgeDiscovery
state "Knowledge Discovery" as KnowledgeDiscovery {
[*] --> LookupDocs
LookupDocs --> SearchExamples
SearchExamples --> FetchSchemas
FetchSchemas --> BuildContext
LookupDocs --> MissingDocs : No Match
MissingDocs --> AIInference
AIInference --> BuildContext
}
BuildContext --> Planning
state "Execution Planning" as Planning {
[*] --> GeneratePlan
GeneratePlan --> DependencyAnalysis
DependencyAnalysis --> RiskAssessment
RiskAssessment --> PlanValidation
PlanValidation --> Scaffold
PlanValidation --> Abort : Critical Risk
}
Scaffold --> CodeGeneration
state "Generation Pipeline" as CodeGeneration {
[*] --> GenerateScript
GenerateScript --> StaticAnalysis
StaticAnalysis --> AutoFix : Issues Found
AutoFix --> StaticAnalysis
StaticAnalysis --> SecurityScan
SecurityScan --> Linting
Linting --> SyntaxValidation
SyntaxValidation --> CompileCheck
CompileCheck --> GenerationSuccess
CompileCheck --> Regenerate
Regenerate --> GenerateScript
Regenerate --> Abort : Max Attempts
}
GenerationSuccess --> TestExecution
state "Execution & Validation" as TestExecution {
[*] --> PrepareRuntime
PrepareRuntime --> RunSmokeTests
RunSmokeTests --> RunFunctionalTests
RunFunctionalTests --> RunPerformanceTests
RunPerformanceTests --> EvaluateResults
EvaluateResults --> RetryExecution : Retryable Failure
RetryExecution --> RunPerformanceTests
EvaluateResults --> ValidationSuccess
EvaluateResults --> ValidationFailure
}
ValidationSuccess --> Observability
state "Observability Pipeline" as Observability {
[*] --> SplunkPreflight
SplunkPreflight --> CollectLogs
CollectLogs --> CorrelateEvents
CorrelateEvents --> DetectAnomalies
DetectAnomalies --> RootCauseAnalysis
RootCauseAnalysis --> MetricsAggregation
}
MetricsAggregation --> QualityGate
state "Quality Gates" as QualityGate {
[*] --> CoverageCheck
CoverageCheck --> PerformanceThreshold
PerformanceThreshold --> SecurityThreshold
SecurityThreshold --> ReliabilityScore
ReliabilityScore --> Pass
ReliabilityScore --> NeedsImprovement
}
NeedsImprovement --> CodeGeneration
Pass --> Reporting
state "Reporting & Delivery" as Reporting {
[*] --> GenerateSummary
GenerateSummary --> GenerateHTMLReport
GenerateHTMLReport --> ExportArtifacts
ExportArtifacts --> NotifyUser
NotifyUser --> Complete
}
ValidationFailure --> FailureAnalysis
state "Failure Analysis" as FailureAnalysis {
[*] --> CaptureDiagnostics
CaptureDiagnostics --> RootCause
RootCause --> SuggestFixes
SuggestFixes --> GenerateFailureReport
}
GenerateFailureReport --> Complete
Abort --> Complete
FatalError --> Complete
Complete --> [*]doc_lookup— consults the k6 MCP documentation tools and records version-grounded citations. Non-blocking; generation proceeds if the docs are unavailable.scaffold— composes a deterministic, self-contained k6 baseline from the OpenAPI schema (per-endpoint requests with sample bodies, baked base URL, load options). No model. This scaffold is the known-good fallback.generate_script— the model authors the final script on top of the scaffold, guided by k6's owngenerate_scriptMCP prompt andbest_practicesresource.validate_script— gates the script atk6.validate_script. Failures route tofix_script, which repairs the script from the real k6 error (stderr + the server's structured issues and suggestions) and loops back. Bounded byMAX_FIX_ATTEMPTS; gives up cleanly to the scaffold so an unvalidated script never reachesrun_test.run_test— executes the validated script viak6.run_scriptand records the wall-clock test window.splunk_preflight— checks the target index exists, capturing event count, sourcetypes, and Splunk version before correlating. Catches the wrong-index failure early. Non-blocking.correlate— four windowed SPL queries (rollup, timeline, by-endpoint, dominant error) synthesize client-vs-server findings: which route degraded and why. Answers what the k6 summary alone cannot show.detect_anomalies— the AI Toolkit'sStateSpaceForecastforecasts the latency band (falling back topredictwhen the add-on is absent) andanomalydetectionflags outlying buckets. The saturation onset is found by Splunk's ML, not a fixed threshold. Non-blocking.analyze— the writer model produces a grounded analysis (root cause, evidence with source citations, recommendation) and, in diff mode, a proposed remediation diff that applies cleanly. Both fall back to deterministic text when no model is available.screen— an independent auditor model checks every claim in the analysis against the cited telemetry. The pass/fail is sealed to the report. Non-blocking.report— assembles the combined client-plus-server verdict, seals it to the ledger, and publishes the run and the agent's state-machine walk to Splunk over HEC.
The Major Arcana
Each phase is a card the agent turns. Run kassi arcana for the full spread.
Card | Phase | Omen |
The Fool (0) |
| the querent sets out: diff or intent |
The High Priestess (II) |
| hidden knowledge read from the diff |
The Emperor (IV) |
| order from change: the routes are named |
The Empress (III) |
| intuition reads the intent into endpoints |
The Hierophant (V) |
| doctrine consulted: the k6 docs ground the rite |
The Chariot (VII) |
| the vehicle is assembled from the spec: a runnable scaffold takes shape |
The Magician (I) |
| as above, so below: the agent authors the script atop the scaffold |
Justice (XI) |
| the script is weighed; the unworthy is turned back |
Temperance (XIV) |
| the flawed draft is tempered against k6's judgment until it holds |
The Tower (XVI) |
| load strikes the structure; what breaks is revealed |
The Hermit (IX) |
| a lantern into the index before the reading |
The Lovers (VI) |
| client and server joined over one window |
The Star (XVII) |
| Splunk's own forecast is cast; where the load breaches the band is revealed |
The Sun (XIX) |
| the reading is made plain: cause, evidence, and the cure laid bare |
The Hanged Man (XII) |
| seen again through another's eyes: the reading is judged grounded, or not |
Judgement (XX) |
| the verdict is spoken and sealed to the ledger |
The World (XXI) | the ledger | the cycle closes: an immutable, hash-chained record |
The Devil (XV) | a refusal | you are bound: only the legal moves are permitted |
Case study
Verified end-to-end against Splunk Enterprise 10.4.0 with the official Splunk MCP Server
(Splunkbase 7931, v1.2.0), called live at runtime. scripts/verify_petclinic.py drives the
whole FSM with nothing canned, in diff mode. A throwaway git repo holds a healthy petclinic
baseline plus a second commit that adds POST /api/visits, so kassi picks the changed
endpoint from the diff, runs real k6 through the k6 MCP server against it, and reads the
server-side regression back from Splunk through the four correlate queries. It also runs the
AI Toolkit's StateSpaceForecast (with predict as the fallback) and anomalydetection over
the same window in detect_anomalies, all on the official splunk_run_query tool.
$ KASSI_LLM=claude_agent uv run python scripts/verify_petclinic.py
target app: petclinic (flawed POST /api/visits) at http://127.0.0.1:8400
diff mode: HEAD~1..HEAD adds POST /api/visits # kassi tests exactly the changed endpoint
... extract_endpoints_ok count=1 # one new route, read from the diff
... validation failed (attempt 0): Unexpected token ILLEGAL ... Missing k6 module imports
... fix_script_done attempt=1 # repaired from the real k6 error
... run_test_ok exit_code=0 reqs=2937
verdict: server-side regression: /api/visits p95 318.44ms, 59.4% 5xx, cause 'database is locked'
endpoints: POST /api/visits
k6 client-side: 2937 reqs, p95 318.44 ms, 59.4% failed
worst endpoint: /api/visits 59.4% errs p95 318.44 ms
root cause: database is locked (1797x)
anomaly scan: splunk StateSpaceForecast + anomalydetection over 13 buckets, 1 anomalous bucket
mcp tool calls: k6.{list_sections, get_documentation x4, generate_script(prompt),
validate_script x2, run_script}
splunk.{get_info, get_index_info, get_metadata, run_query x6}
the reading:
🂠The Fool: Diff mode revealed 1 endpoint under scrutiny.
🂠The Magician: Script authored, repaired once, validated successfully.
🂠The Tower: 2937 requests executed; p95 318.44 ms, 59.4% failure rate.
🂠The Lovers: /api/visits worst at 59.4% errors, database locked 1797 times.
🂠The Star: StateSpaceForecast forecast p95 ~312ms; anomalydetection flagged the anomalous bucket.
🂠Judgement: Server regression confirmed: /api/visits, database lock root cause.What this proves, all at runtime against live Splunk: kassi read the new POST /api/visits
from the git diff (the healthy GET routes are untouched by the change, so it tests exactly
the new endpoint), the model authored a script that failed k6 validation, the fix_script
loop repaired it from the real k6 error and re-validated, real k6 drove 2937 requests, the
four correlate queries on the official Splunk MCP Server isolated the new endpoint
(/api/visits at 59.4% 5xx) and named the root cause k6 cannot see ("database is locked"),
and the AI Toolkit's StateSpaceForecast forecast the latency band while anomalydetection
flagged the anomalous bucket statistically.
Every upstream call is on the hash-chained ledger and in mcp_provenance. See
docs/SPLUNK_SETUP.md for the full setup.
For a lighter reproduction without a target app, scripts/verify_correlate_live.py cans the
k6 metrics and ingests sample telemetry, but still queries the real official Splunk MCP Server.
Demo scenarios
examples/ ships five target apps, each a healthy baseline plus one "new" endpoint with a
distinct load-induced failure, so the suite spans the common regression classes (not just one
trick). Each ships the same access_json telemetry to Splunk, so kassi correlates them
unchanged; the failure only appears under concurrency.
App | New endpoint | Failure signature | What it exercises |
|
| 5xx, constant, | correlation isolates the root-cause error |
|
| latency, 0 errors (N+1 over a shared connection) | server-side |
|
| latency rising over the run (unbounded recompute) |
|
|
| 4xx 429 throttling (too-tight rate limit) | client-vs-server error split: "throttled, not broken" |
|
| latency + 504 mix (downstream cascade) | dependency root cause, resilience recommendation |
Run any of them end-to-end (starts the app, real k6, live Splunk, the grounded analysis):
uv run python scripts/verify_scenario.py feed # or petclinic | storefront | gateway | orderspetclinic is also the headline diff-mode run above.
Benchmark
kassi-bench scores kassi against ground truth: 80 live runs over five change-induced fault classes
(5xx regression, two latency degradations, 4xx throttling, a 504 cascade) plus three healthy
controls, ten reps each, with the model authoring the load test and analysis and the verdict computed
deterministically from Splunk. Across the faults kassi detects 90%, localizes 92%, classifies 90%,
and names the root cause 95%; the controls hold a 0% false-alarm rate. A second suite,
kassi-bench-ext, runs kassi against go-httpbin (a third-party app it never instrumented, observed
through a generic access-log proxy) and scores 15/15. Against the canonical academic benchmark
RCAEval RE3 (code-level faults in Online Boutique and Train Ticket), kassi's diagnosis engine
localizes the root-cause service at top-1 in 81% of 57 cases (90% on Online Boutique) and within
top-3 in 100%, competitive with the strongest published methods and well ahead of the classical
baselines. Between them the suites found and fixed three
real bugs: a missing throttling branch, a too-low latency floor, and a validation step that read a
crossed k6 threshold as a broken script. Full methodology and tables:
docs/benchmark/BENCHMARK.md.
uv run python scripts/benchmark.py --reps 10 # demo suite -> docs/benchmark/results.json
docker run -d -p 8600:8080 ghcr.io/mccutchen/go-httpbin
uv run python scripts/benchmark_external.py --reps 5 # external suite (go-httpbin via the proxy)
uv run python scripts/benchmark_rcaeval.py --systems OB,TT # canonical RCAEval RE3 (after download)
uv run python scripts/benchmark_report.py # regenerates the reportDashboard
The report phase publishes each run to index=kassi_runs over HEC: a kassi:run summary
(verdict, k6 client metrics, the server-side correlation, the forecast, the root cause) and,
because the agent's own execution is telemetry too, one kassi:step event per state-machine
phase, the agent's walk from The Fool to Judgement, keyed by Burr's app_id. So the dashboard
shows both what the change did and how the agent reached the verdict. The agent stays CLI/MCP;
Splunk is the reporting surface. Provision it once:
uv run python scripts/setup_dashboard.py # creates the index, an HEC token, and the dashboard
# paste the printed KASSI_HEC_TOKEN into .env, then every run self-publishesThe dashboard (docs/dashboard/kassi_overview.xml) shows the latest verdict, the agent's
state-machine walk for that run (each phase, its outcome, and the tool calls it made), step
outcomes across runs, k6 vs server-side p95, p95 across runs, server-side errors by endpoint,
and a run-history table. Gated on KASSI_HEC_TOKEN: with it unset, runs simply don't publish.
Development
uv run ruff format . && uv run ruff check .
uv run pytestThe tests use Theodosia's FakeUpstream for both MCP servers and a fake LLM, so
they run offline with no k6, Splunk, Ollama, or network.
Local Splunk
docs/SPLUNK_SETUP.md walks through running Splunk Enterprise
locally, seeding sample telemetry, and verifying the integration. The two helper scripts:
uv run python scripts/seed_splunk.py # index + HEC + sample data + verify the SPL kassi emits
uv run python scripts/verify_correlate_live.py # drive the whole FSM; correlate hits live Splunk
KASSI_LLM=claude_agent uv run python scripts/verify_petclinic.py # the real-app root-cause demoverify_petclinic.py is the headline demo, nothing canned: it starts the
examples/petclinic app (a healthy baseline plus a new
POST /api/visits with a SQLite write-lock flaw that only bites under load, shipping
access logs to Splunk's HEC), runs real k6 through the k6 MCP server, and reads the
server-side regression back from Splunk: which endpoint, how bad, and the "database is
locked" root cause k6 alone can't see.
scripts/dev_splunk_mcp.py is a local stdio MCP bridge to Splunk REST, used only to
exercise the correlate path without the official app. Production uses the official Splunk
MCP Server via KASSI_SPLUNK_MCP_ENDPOINT + KASSI_SPLUNK_TOKEN. See the Case
study for a verified run.
Available Tools
6 toolsfork_atBranch this session from a prior stepADestructive
Rewind the session to the state captured after history[seq=N].
``sequence_id`` is the ``seq`` field on a ``theodosia://history`` entry.
``seq`` is accepted as an alias so a client can copy the value straight
from history under either name (``sequence_id`` wins if both are given).
The session's Application is rebuilt via the factory, then its
state is overwritten with the snapshot captured at that point,
and its ``__PRIOR_STEP`` is set to the action name from that
entry so ``valid_next_actions`` computes correctly. Sub-runs
recorded after that point are cleared. A ``fork_at`` marker is
appended to history with the target sequence_id under
``inputs``.
Refuses when:
- shared-app mode (would affect every connected client);
- sequence_id is out of range;
- the target entry was a refusal (state_after is None);
- the target entry is itself a fork or reset marker (avoid
walking a hall of mirrors).
Inputs: seq, sequence_id.
fork_from_pastResume a different session's past stateADestructive
Resume a past Burr run by loading persisted state.
Three-tier source resolution:
1. If ``mount(state_loader=...)`` was passed an explicit Burr
``BaseStateLoader``, use it. Any persister works:
``SQLitePersister``, custom S3/postgres loaders, etc.
2. Else if the session's current Application has a
``LocalTrackingClient`` attached, read its on-disk log.
3. Else refuse.
``partition_key`` defaults to empty string, matching Burr's
default; pass it explicitly when your persister uses
partitioned storage.
Use this for:
- resuming a session across server restarts (track
``app_id`` on the client, restore here after reconnect);
- forking from any persisted past run, not just the current
session's in-memory history.
Refuses when:
- shared-app mode (no factory to rebuild from);
- no state_loader configured and no LocalTrackingClient on
the Application;
- the requested app_id/sequence_id doesn't exist.
Inputs: app_id (required), sequence_id, partition_key.
list_resourcesARead-only
List all available resources and resource templates.
Returns JSON with resource metadata. Static resources have a 'uri' field, while templates have a 'uri_template' field with placeholders like {name}.
Inputs: no named parameters. Returns: result
read_resourceARead-only
Read a resource by its URI.
For static resources, provide the exact URI. For templated resources, provide the URI with template parameters filled in.
Returns the resource content as a string. Binary content is base64-encoded.
Inputs: uri (required). Returns: result
reset_sessionReset this sessionADestructiveIdempotent
Reset this session's FSM to its entrypoint.
Rebuilds the session's Application via the factory, clears any
sub-runs the session spawned, and appends a ``reset_session``
marker entry to ``theodosia://history``. Prior history entries are
preserved, so the audit trail records the reset rather than
wiping it: ``ran A -> ran B -> reset -> ran A again``.
Refuses in shared-app mode (servers mounted with an
``Application`` instance rather than a factory) because
resetting would affect every connected client at once. Use
per-session isolation (factory mode) for servers where reset
matters.
Inputs: no named parameters.
stepTake one FSM transitionADestructive
Advance the FSM by one transition.
Args:
action: Name of the action to run. Must be in the
current valid-next set; otherwise the call returns
an ``invalid_transition`` error with the list of
actions actually allowed right now.
inputs: Keyword inputs to the action. Each action
declares its own required + optional inputs;
consult ``theodosia://next`` and the action's docstring
to see what's expected. Object is the canonical
form. A JSON-encoded string is also accepted (some
clients serialize nested object arguments that way)
and is parsed into an object before dispatch.Actions (entry: select_mode):
select_mode: Start a run. Pass
intentfor natural-language mode, or justrepo_path/reffor diff mode.repo_pathis also where openapi.json is read from;splunk_indexis the index holding the target's server-side telemetry.read_diff: Read
git diff <ref>..HEADfrom the repo.extract_endpoints: Pull changed routes from the diff and load the sibling openapi.json.
parse_intent: Score OpenAPI operations against the natural-language intent and pick the top matches.
doc_lookup: Consult the k6 MCP documentation for the constructs kassi emits (HTTP requests, thresholds, checks, scenarios) and record version-grounded citations. Non-blocking: degrades to no references when the docs are unavailable.
scaffold: Compose a deterministic, self-contained k6 scaffold from the OpenAPI spec (no model): per-endpoint requests with sample bodies, the baked base URL, and load options. This is the runnable baseline the next step builds on.
generate_script: Author the final k6 script on top of the scaffold, using k6's own
generate_scriptMCP prompt and best-practices to guide the model. Falls back to the scaffold when the model or guidance is unavailable; validation failures are repaired by the fix_script phase.validate_script: Validate the script via the k6 MCP
validate_scripttool (1 VU, 1 iteration).fix_script: Repair the k6 script using the error the k6 MCP
validate_scripttool returned (real stderr + issues + suggestions), then loop back to validation. The correction loop is an explicit edge in the state machine; on a model failure it falls back to the scaffold.run_test: Execute the load test via the k6 MCP
run_scripttool (passing VUs + duration, which the tool needs since it ignores the script's own options) and parse the metrics from the summary. Bounded by a timeout: if the authored script wedges k6 so the call never returns, fall back to running the deterministic scaffold once, so the pipeline never hangs.splunk_preflight: Before correlating, verify the target Splunk index exists and capture its event count, sourcetypes, and the Splunk version via the Splunk MCP
splunk_get_info/splunk_get_index_info/splunk_get_metadatatools. Non-blocking: correlate still runs if a probe fails.correlate: Read the target's server-side telemetry over the exact test window via the Splunk MCP
splunk_run_querytool: an overview rollup, a per-second timeline (when it degraded), a by-endpoint breakdown (which route degraded), and the dominant server-side error (why). Synthesize the actionable findings. Passsplunk_splto override the rollup query.detect_anomalies: Run Splunk's own ML over the test window via the Splunk MCP
splunk_run_querytool: the AI Toolkit'sStateSpaceForecastprojects the latency band (falling back to the corepredictcommand when the toolkit is unavailable), andanomalydetectionflags statistically outlying buckets. This is the saturation onset found statistically, independent of the fixed error thresholds. Non-blocking: degrades to no anomalies when Splunk is unavailable.analyze: The writer phase (Granite 4.1): turn the correlated facts into a cited analysis (cause,
screen: The auditor phase (Granite Guardian): an independent model judges whether the analysis is
report: Assemble the final report from the analyzed and screened state and have the model narrate
Transitions:
select_mode -> read_diff (when: stage == 'selected' and mode == 'diff')
select_mode -> parse_intent (when: stage == 'selected' and mode == 'intent')
read_diff -> analyze (when: stage == 'failed')
read_diff -> extract_endpoints (when: stage == 'diffed')
extract_endpoints -> doc_lookup (when: stage == 'scoped')
parse_intent -> analyze (when: stage == 'failed')
parse_intent -> doc_lookup (when: stage == 'scoped')
doc_lookup -> scaffold (when: stage == 'documented')
scaffold -> analyze (when: stage == 'failed')
scaffold -> generate_script (when: stage == 'scaffolded')
generate_script -> validate_script (when: stage == 'generated')
validate_script -> fix_script (when: stage == 'needs_fix')
fix_script -> validate_script (when: stage == 'generated')
validate_script -> run_test (when: stage == 'validated')
validate_script -> analyze (when: stage == 'failed_validation')
run_test -> splunk_preflight (when: stage == 'ran' and splunk_enabled)
run_test -> analyze (when: stage == 'ran' and not splunk_enabled)
run_test -> analyze (when: stage == 'failed')
splunk_preflight -> correlate (when: stage == 'preflighted')
correlate -> detect_anomalies (when: stage == 'correlated')
detect_anomalies -> analyze (when: stage == 'detected')
analyze -> screen (when: stage == 'analyzed')
screen -> report (when: stage == 'screened')
Inputs: action (required), inputs. Returns: Result of one step. When `error` is absent, the response is a successful step (…
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 6 tools
The core FSM `step` tool is a single entrypoint that dispatches to ~14 embedded actions, while the named tools (step, fork_at, fork_from_past, reset_session) all deal with session/FSM lifecycle and heavily overlap in purpose—all four are about navigating or resetting the state machine state. The `read_resource`/`list_resources` pair is distinct, but the boundary between step-driven control flow and fork/rewind/resume tools is genuinely blurry and would cause misselection.
The tool names use consistent snake_case and a Verb_Noun structure (read_resource, list_resources, reset_session, fork_at, fork_from_past), which is fairly consistent. However, `step` and `fork_at`/`fork_from_past` use dramatically different verb styles—`step` is vague while the others are specific—and there's no clear naming cue that these all orchestrate the same state machine. The embedded actions inside `step` are well-named, but the surface-level naming lacks a cohesive pattern.
Six tools is a well-scoped count for an orchestration server whose real surface is a state machine. The design deliberately centralizes the ~14 pipeline actions behind `step`, so six surface tools appropriately capture both the FSM orchestration (step, reset, forks) and resource access (read/list). This is reasonable for the stated purpose.
The FSM covers an impressively complete lifecycle: entry, intermediate pipeline stages, validation/fix loops, telemetry correlation, analysis, screening, and final reporting—plus reset and multiple resume/fork mechanisms. However, there are notable gaps: no tool exposes the FSM's current state/history/valid-next directly (only indirectly via `step` errors and `theodosia://history`), and no mechanism to inspect available code actions before stepping. The `read_resource` mechanism partially covers this, but it's not a first-class surface capability.
Maintenance
Related MCP Connectors
MCP-native AI SRE: ask what's broken in production, get a reviewed GitHub fix PR.
Synthetic checks, nightly regression replay and model-drift alerts for AI agents
Autonomous and governed SRE & MLOps control plane for AI agent platforms.
MCP server for building and testing AI agents with multi-model experimentation and insights.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA multi-agent MCP server that turns LLMs into an autonomous incident-response copilot, enabling rapid investigation, correlation, and remediation of production incidents.MIT
- AlicenseAqualityDmaintenanceAutomated Playwright E2E test repair powered by a self-improving, governed MCP server that runs failing tests, collects failure artifacts, reasons about root causes, validates and applies fixes, and re-runs to verify.12MIT
- FlicenseAqualityDmaintenanceAn MCP server implementing a 7-stage agentic frontend workflow—from design audit to PR review—including AI-driven component generation, browser validation, E2E testing, and CI self-healing.4-
- FlicenseNot gradedqualityCmaintenanceMCP server that enables AI agents to programmatically run tests, query results, and receive intelligent recommendations about test execution strategy.-



