frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

JSE: A Structural Expression Protocol for AI Agents

1•mars_liu•1h ago
Title: JSE – A JSON-based S-Expression format for structured AI outputs

Hi HN,

I’ve been experimenting with a small idea around structured outputs for AI systems and wanted to share an early spec to get feedback.

*JSE (JSON Structural Expression)* is a lightweight convention that allows *S-expression style logic to be encoded inside valid JSON*.

The motivation is simple:

Modern AI models can reliably generate JSON. However, JSON is usually treated purely as *data*, while many AI interactions actually need to express *structured intent or computation* (similar to Lisp expressions, DSLs, or ASTs).

Tool calls and MCP solve some of this, but they tend to be *API-specific protocols* rather than a *general structural representation*.

JSE tries to fill that gap with a minimal rule set.

---

### Core idea

In JSE:

* Strings starting with `$` are treated as *symbols* * JSON arrays or objects can represent *S-expressions* * The format remains *100% valid JSON* * Metadata can coexist with expressions * `$quote` allows raw data sections

Conceptually:

> Just as a *group* consists of a *set plus operations defined on it*, > *JSE is an S-expression system applied to JSON data.*

Example:

```json ["$add", 1, 2] ```

Or with metadata:

```json { "$call": "$search", "query": "JSON S-expression", "top_k": 5 } ```

A system that understands JSE can interpret these as structured operations, while systems that don’t can still treat them as ordinary JSON.

---

### Why this might be useful for AI

Many AI systems need to communicate things like:

* reasoning plans * tool pipelines * structured transformations * query languages * DSL-like instructions

Today these are usually implemented as:

* ad-hoc JSON schemas * tool-specific formats * embedded code strings

JSE attempts to provide a *uniform representation for structured intent* that is:

* deterministic * machine interpretable * easy for LLMs to generate * easy for humans to read

Importantly, *JSE does not aim to be a full Lisp or a Turing-complete system*. Each implementation can choose how much of the expression space it supports.

---

### Design constraints

The format tries to satisfy a few practical goals:

* Always valid JSON * Easy for LLMs to generate * Close to S-expression semantics * Extensible for metadata * Lightweight enough to embed in prompts or API responses

---

### Example use cases

Some areas where this might be useful:

AI orchestration systems Agent communication protocols Structured reasoning traces Prompt-embedded DSLs Cross-model communication formats

---

### Spec and repo

Early spec and examples are here:

https://github.com/MarchLiu/jse

The spec is intentionally designed so it can also be *embedded directly inside prompts*, allowing models to generate JSE structures consistently.

---

### Questions I’d love feedback on

* Is there prior art I should study? * Would this be useful compared to JSON Schema / tool calling? * Does the `$symbol` design feel reasonable? * Are there obvious edge cases in the semantics?

Curious to hear thoughts.

Comments

verdverm•1h ago
Bespoke languages, or things like this, are a hard sell in the age of Ai. Because there is no training data or real world usage, I have to put a bunch of stuff into my context just so they can work with it. This becomes even more unpalatable when you realize they will (1) have to dedicate attention to this, taking it away from productive tasks (2) will have trouble sticking to it, because it looks so much like other things it has trained into the weights

A Grand Vision for Rust

https://blog.yoshuawuyts.com/a-grand-vision-for-rust/
1•todsacerdoti•2m ago•0 comments

Symfony in 200 Lines

https://wouterj.nl/2026/02/200-lines-of-symfony
1•gsky•8m ago•0 comments

MacBook What?

https://elliotjaystocks.com/blog/macbook-what
1•SenHeng•10m ago•0 comments

Caastle Founder Pleads Guilty to $300M Fraud Scheme

https://www.justice.gov/usao-sdny/pr/caastle-founder-pleads-guilty-300-million-fraud-scheme
1•twalichiewicz•16m ago•0 comments

OpenAI's Codex app lands on Windows after topping 1M Mac installs within a week

https://the-decoder.com/openais-codex-app-lands-on-windows-after-topping-a-million-mac-downloads-...
1•spenvo•16m ago•0 comments

Ask HN: Does downvoting get to a point where you cant upvote?

1•trinsic2•16m ago•1 comments

The Zen of Task Management with Org (2025)

https://bzg.fr/en/the-zen-of-task-management-with-org/
2•aquariusDue•16m ago•0 comments

Show HN: What an AI agent sees in an A2A marketplace – full API walkthrough

https://agoragentic.com/demo.html
1•bourbeau•18m ago•2 comments

An AI avatar is running to represent Indigenous voters in Colombia

https://restofworld.org/2026/ai-avatar-colombia-political-candidate/
1•i7l•19m ago•0 comments

Guild Manager 26 – MMO Management/Spreadsheet SIM

https://playgm26.com
1•itshellboy•20m ago•0 comments

Mysterious blue glow traced to Flying Banana

https://www.bbc.co.uk/news/articles/c795e30j2d0o
1•zeristor•21m ago•0 comments

Nbdantic: Peg like parser for Jupyter notebooks

https://github.com/ivanbelenky/nbdantic/
1•ivanbelenky•22m ago•0 comments

Google's Chatbot Told Man to Give It an Android Body Before Encouraging Suicide

https://gizmodo.com/googles-chatbot-told-man-to-give-it-an-android-body-before-encouraging-suicid...
1•medi8r•23m ago•2 comments

Ask HN: Has anyone noticed the fear-driven prompt suggestions that GPT5.3 makes?

3•cedarscarlett•26m ago•1 comments

Show HN: DJ Claude – 6 Claude Codes in a jam band

https://www.loom.com/share/84dbe5de42f745ba98fe9495dc61fa2e
2•p-poss•29m ago•0 comments

Iranian girls killed by 'double-tap' strikes on Minab school

https://www.middleeasteye.net/news/exclusive-iranian-girls-killed-double-tap-strikes-minab-school
4•xvxvx•30m ago•3 comments

AI 2027 Concrete Predictions and dates

https://alexpear.github.io/pages/ai-2027.html
1•hydrolox•30m ago•0 comments

Be the Idiot

https://luminousmen.substack.com/p/be-the-idiot
2•duck•32m ago•0 comments

Northstead – Wholesale Nursery Management System

https://www.northstead.app
1•chris_wray•36m ago•1 comments

Show HN: Stackspend – Spend management for AI startups

https://www.stackspend.app
1•andrewrday•36m ago•0 comments

Show HN: Async Rust and Embassy on nRF52840: RGB LED Cycle (Video and Code)

https://www.youtube.com/watch?v=fJf5XRAliSE
1•sarmadgulzar•38m ago•0 comments

Modern Unix Tools: A Collection of Modern Alternatives to Common Commands

https://github.com/ibraheemdev/modern-unix
2•nix_owl31•42m ago•0 comments

Super interesting Wikipedia on HN. So I made wiki-hn.

https://wiki-hn.com/
2•oatsandsugar•45m ago•0 comments

Teaching LLMs to reason like Bayesians

https://research.google/blog/teaching-llms-to-reason-like-bayesians/
2•tzury•45m ago•0 comments

What's Driving Rising Business Costs?

https://libertystreeteconomics.newyorkfed.org/2026/03/whats-driving-rising-business-costs/
2•jnord•45m ago•0 comments

Google and Epic announce settlement to end app store antitrust case

https://arstechnica.com/gadgets/2026/03/google-and-epic-look-to-bury-the-hatchet-with-new-app-sto...
2•todsacerdoti•47m ago•0 comments

What it was like to send an email back in 1984 (2016)

https://www.businessinsider.com/video-what-early-email-looked-like-2016-3
1•leecoursey•52m ago•1 comments

Show HN: workz – one command to make any Git worktree a full dev environment

1•rohansx•54m ago•0 comments

Dwarkesh Patel Interview with Gwern

https://www.dwarkesh.com/p/gwern-branwen
1•Curiositry•54m ago•0 comments

Big Medicine Can Learn from the Cheesecake Factory (2012)

https://www.newyorker.com/magazine/2012/08/13/big-med
1•ripe•57m ago•0 comments