|
| 1 | +--- |
| 2 | +name: ella-core |
| 3 | +description: > |
| 4 | + Manage and inspect a running Ella Core 5G private mobile network via its REST API. |
| 5 | + Use when the user asks to provision, update, list, inspect, or delete subscribers, |
| 6 | + profiles, slices, policies, data networks, radios, routes, BGP peers, NAT, operators, |
| 7 | + or users; or asks about live status, data usage, flow reports, audit logs, AMF/SMF/UPF |
| 8 | + state, PDU sessions, gNB connections, IMSIs, S-NSSAIs, DNNs, 5QI, AMBR, ARP, or any |
| 9 | + runtime telemetry of an Ella Core instance. |
| 10 | +metadata: |
| 11 | + version: 0.2.0 |
| 12 | + author: ellanetworks |
| 13 | +--- |
| 14 | + |
| 15 | +# Ella Core Skill |
| 16 | + |
| 17 | +Ella Core is a 5G private mobile network packaged as a single Go binary (AMF + SMF + UPF + AUSF). This skill operates a running instance via its REST API. |
| 18 | + |
| 19 | +## Connection |
| 20 | + |
| 21 | +Two values are required: |
| 22 | + |
| 23 | +- **Base URL** — e.g. `http://192.168.1.10:5000`. Read from `ELLA_CORE_URL` if set. |
| 24 | +- **API token** — string prefixed with `ellacore_`. Read from `ELLA_CORE_TOKEN` if set. |
| 25 | + |
| 26 | +Ask the user for any value that is not in the environment or earlier in the conversation. Token minting and roles: `references/auth.md`. |
| 27 | + |
| 28 | +Authenticate every request with `Authorization: Bearer $ELLA_CORE_TOKEN`. Exceptions (no auth required): `GET /api/v1/status`, `GET /api/v1/metrics`, `GET /api/v1/openapi.yaml`. |
| 29 | + |
| 30 | +Ella Core typically serves HTTPS with a self-signed certificate. Use `curl -k` (or `--cacert <file>` if the user provides one) for `https://` URLs. Plain HTTP works against `h2c` instances. |
| 31 | + |
| 32 | +## Calling the API |
| 33 | + |
| 34 | +Use `curl -sk` (silent + skip cert verification) and pipe JSON through `jq` (or `python3 -m json.tool`): |
| 35 | + |
| 36 | +```bash |
| 37 | +curl -sk -H "Authorization: Bearer $ELLA_CORE_TOKEN" \ |
| 38 | + "$ELLA_CORE_URL/api/v1/subscribers?per_page=100" | jq |
| 39 | +``` |
| 40 | + |
| 41 | +**Retrieval-first.** Before calling any endpoint not already used in this session, check `references/examples.md` for a recipe. If the operation isn't covered, fetch the OpenAPI spec — the source of truth, never guess paths or shapes: |
| 42 | + |
| 43 | +```bash |
| 44 | +curl -s "$ELLA_CORE_URL/api/v1/openapi.yaml" |
| 45 | +``` |
| 46 | + |
| 47 | +Fetch once per session and reuse. Don't pre-fetch resource lists unless you need their IDs — aggregate endpoints often return everything in one call. |
| 48 | + |
| 49 | +## Endpoint namespacing |
| 50 | + |
| 51 | +Many resources live under sub-paths — never assume top-level. Common groups: |
| 52 | + |
| 53 | +- `/api/v1/auth/*` — login, logout, refresh, lookup-token |
| 54 | +- `/api/v1/networking/*` — data-networks, routes, NAT, BGP, interfaces |
| 55 | +- `/api/v1/ran/*` — radios, events |
| 56 | +- `/api/v1/logs/audit` — audit logs |
| 57 | +- `/api/v1/operator/*` — operator code, ID, home-network-keys, NAS security |
| 58 | +- `/api/v1/cluster/*` — HA cluster management |
| 59 | +- `/api/v1/subscribers`, `/api/v1/profiles`, `/api/v1/policies`, `/api/v1/slices` — top-level |
| 60 | +- `/api/v1/subscriber-usage`, `/api/v1/flow-reports` — top-level |
| 61 | + |
| 62 | +When in doubt, fetch the OpenAPI spec. |
| 63 | + |
| 64 | +## Response envelope |
| 65 | + |
| 66 | +- Success: `{"result": <payload>}` |
| 67 | +- Error: `{"error": "message"}` |
| 68 | +- Mutation success (201/200): `{"result": {"message": "..."}}` |
| 69 | + |
| 70 | +## Pagination |
| 71 | + |
| 72 | +List endpoints accept `page` (default 1) and `per_page` (default 25, max 100). Responses include `items`, `page`, `per_page`, `total_count`. Use `per_page=100` when iterating to minimize round-trips. |
| 73 | + |
| 74 | +## Mutations and destructive operations |
| 75 | + |
| 76 | +For any `POST`, `PUT`, `PATCH`, or `DELETE`: |
| 77 | + |
| 78 | +1. **Confirm with the user first.** State what will change and ask for explicit approval. Do not chain destructive calls without re-confirming. |
| 79 | +2. **List or GET before delete.** Confirm the target exists and show its current state to the user. |
| 80 | +3. **Verify prerequisites before create.** Resources follow a strict dependency chain (data network → slice → profile → policy → subscriber). See `references/data-model.md`. |
| 81 | +4. **One change at a time.** Don't bundle unrelated mutations. Re-read state after each one to confirm it landed. |
| 82 | + |
| 83 | +## When to load references |
| 84 | + |
| 85 | +| File | Read when | |
| 86 | +|------|-----------| |
| 87 | +| `references/auth.md` | Setting up tokens, hitting 401/403, reasoning about RBAC | |
| 88 | +| `references/data-model.md` | Provisioning new resources or explaining the data model | |
| 89 | +| `references/conventions.md` | Questions about IMSI, K/OPc, 5QI, ARP, AMBR, bitrate strings, byte conversion, BGP/NAT specifics | |
| 90 | +| `references/examples.md` | Looking for a recipe before fetching the full OpenAPI | |
| 91 | +| `references/troubleshooting.md` | A request fails or returns unexpected data | |
| 92 | + |
| 93 | +## External documentation |
| 94 | + |
| 95 | +For non-API guidance, fetch from `https://docs.ellanetworks.com/` — for example `how_to/ai_agents/`, `how_to/backup_and_restore/`, or `reference/`. |
0 commit comments