Let your coding agent test the 5G core
Your coding agent can read 3GPP. With Runik it can also run a real 5G procedure against your core and read a verdict. Agents call the rk CLI.
Models can read 3GPP. They can't attach a UE.
A coding agent working on an AMF or SMF can write the handler, write the unit test and explain the clause it implements. What it cannot do on its own is prove the change works on the wire: that a UE still registers, that the PDU session still comes up, that the reject still carries the right cause. Runik gives the agent that step. It is a 5G core tester the agent runs from the shell, the same way an engineer or a CI job runs it.
The agent calls the CLI
There is nothing to install in the agent. Any agent that can run a shell command and read a file can use Runik. It runs rk, reads the exit code, and reads the JSON report. The site publishes /llms.txt, which describes the commands and the exit-code contract in a form an agent can load.
Runik itself contains no model. It is a deterministic tester: the flow and its checks are the same whoever runs them. You bring the agent, or use none.
Learn offline, then touch the lab
Four discovery commands run with no core, no config and no network, so an agent learns the flow language before it sends anything:
| Command | What the agent gets |
|---|---|
rk schema |
the JSON Schema (draft 2020-12) for flow and suite YAML |
rk vocab |
message builders, check operators, metric keys and finding classes, as JSON |
rk describe -flow <file> -json |
the states, transitions, sends and final checks of one flow |
rk lint -flow <path> |
validation of a flow before it runs; exit 0 clean, 1 invalid |
An agent that drafts a new flow can lint it before anything reaches the core. A bad flow fails at lint time, in the agent's own loop, not in the lab.
How it works
- The agent picks or writes a flow. It starts from the public flow catalog, or edits one to match the change it just made.
- The agent runs it.
rk run-flow -flow registration -templates ./d3x-templates -c lab.yaml -s subscribers.yaml -output json - The agent reads the verdict. The exit code says pass or fail. The JSON says which step and which check.
A verdict an agent can act on
The report is built so the agent does not have to parse logs. Each step and each final check has a result, and verdict_reasons explains a failure:
final_checks:
- name: the UE ended registered
metric: final_state_counts.registered
op: equals
value: 1
{ "flow_name": "registration", "verdict": "pass", "all_passed": true,
"final_checks": [ { "name": "the UE ended registered", "pass": true } ] }
Exit codes: 0 pass, 1 fail or error, 2 usage error, 3 unsupported by the core under test. An agent should treat 1 and 2 as a failure to fix. Exit 3 means the core does not implement the scenario: report it, and do not count it as a pass. A pipeline either gates strictly on 0 or accepts 3 with a notice. When the run fails, -trace hands back the bytes the tester sent and the bytes that came back, so the agent can see the information element that was wrong instead of guessing.
A loop that ends in evidence
A typical session on a core change looks like this:
- The agent changes the registration handler.
- It runs the registration flow. Exit 1: the final check "no REGISTRATION REJECT arrived" failed, and the verdict names the step.
- It reruns with
-trace, reads the reject the core sent, fixes the handler, and reruns. - Exit 0. It attaches the JSON verdict to the pull request.
The reviewer sees a verdict from a real procedure, not an agent's claim that the change works.
Bounded by design
Giving an agent a network tool should not mean giving it the network. Runik keeps the agent inside the lines you draw:
rkconnects only to the endpoints in your config.- It does not spawn shell commands by default. The
cmdaction is off unless enabled and takes an argument list, not a shell string. - It sends no telemetry and needs no route off the host. What your agent sends to its own model provider is governed by your agent setup, not by Runik.
Same flow for the agent, the engineer and CI
Nothing here is agent-only. An engineer runs the same command in a terminal, and a pipeline runs it on every merge. A flow the agent wrote and linted becomes a regression test the moment it is committed. See 5G core regression testing in CI.
What the agent can run
Community covers individual flows and core NGAP, NAS, and SBI procedures, plus REST and the GTP-U user plane after an N2 session, with JSON and JUnit reports and up to 1,000 subscribers. Pro adds test suites, fuzzing, failure injection, and advanced procedures, including PFCP and Diameter. See pricing.
Start
Install Community with curl -fsSL https://get.dflux.io/runik/install.sh | sh, clone the flow catalog, and give your agent /llms.txt and the rk command. Let it run the registration flow against your lab core and read the verdict.