Projects Independent experiment

Encode Lang / Lambda H

An experimental numeric semantic transport for AI agents: encode intent into structured fields, hand it to a Doer, and let the receiving agent act normally without carrying the original wording.

PythonLLM agentsSemantic protocolsStructured IR

The problem

Most agent-to-agent communication still looks like ordinary prompting. One model writes natural language, another model reads it, and the whole exchange inherits the ambiguity and surface-level baggage of English.

I wanted to explore a narrower question: can two model endpoints exchange enough structured meaning to act correctly without carrying the original sentence on the wire?

Encode Lang is that experiment. Its current protocol, Lambda H/2.2, represents approximate concepts as numeric semantic coordinates and keeps operational structure such as action targets, relation direction, prerequisites, policy, epistemic state, and task progress explicit.

The goal is not compression for its own sake. The interesting part is whether a receiving agent can recover the intended task, preserve important constraints, and then continue working normally.

The current architecture

The current flow separates human control from agent transport:

human instruction
  -> Encoder
  -> local symbolic IR
  -> numeric Lambda H packet
  -> Doer
  -> local symbolic IR
  -> semantic handoff
  -> normal agent execution/output

A separate Decoder exists for humans who want to inspect a packet without executing it.

The numeric packet deliberately excludes the original wording, arbitrary text labels, developer JSON, and human audit text. That makes the wire opaque at the lexical surface, but it is not encryption: a receiver with the shared semantic basis and relevant context can still interpret the meaning.

What the packet keeps exact

Lambda H uses approximate semantic geometry for meaning that can tolerate breadth, but it does not make everything fuzzy.

The following stay structural and exact:

That split is important. An agent can be uncertain about whether a semantic field is best described as “failure”, “hazard”, or “anomaly” while still knowing exactly which entity is hypothesized to cause which other entity.

Receiver-relative context

A useful instruction often contains deictic language such as “this repo”. The packet should not need to serialize an absolute filesystem path just to preserve that meaning.

Lambda H therefore reserves context 0 for receiver-current ambient state. X08 means the workspace/repository already active when the packet arrives.

For a coding agent, the grounding rule is intentionally narrow:

  1. use the host/IDE workspace root if the environment already exposes one;
  2. otherwise use the current process/tool working directory;
  3. optionally normalize only upward to that directory’s enclosing Git worktree root;
  4. freeze that workspace for the request;
  5. do not scan other repositories to decide what X08 means.

That rule came from a real failure. An early Doer correctly understood that X08 meant a repository, but treated the missing explicit binding as a reason to search /home and / for candidate repos. The fix was to define X08 as a snapshot of the already-active workspace, not a repository-discovery query.

A concrete packet

This packet represents a read-only instruction to investigate the current repository and gather context:

ΛH2.2|
8 15
0 0 0
0 1 0
1 4 0 0 0
1 4 0 1 3 7
1 4 0 4 5 8
1 4 1 0 1
1 4 1 1 0 7
1 4 1 4 5 8
1 4 1 6 2 0
3 8 0 0
3 8 1 1
3 8 2 5 8
3 8 3 2
3 8 5 6
3 8 6 6
9 15

The important behavior is not that another model can paraphrase those rows. It is that a Doer already operating inside a repository can ground X08 to that workspace, inspect it with normal tools, and return the same kind of useful result it would have produced from an ordinary English instruction.

The output mistake

Another early design mistake was forcing the Doer to reply in Lambda H after every successful task.

That made the protocol control too much. If the incoming packet means “investigate this repository”, then after the task is decoded and grounded the agent should simply investigate the repository. Its normal progress messages, files, tool calls, and final explanation should work exactly as they would for an equivalent English request.

The current rule is simpler:

P.reply omitted   -> normal host-native agent output
P.reply=packet    -> explicitly require a Lambda H final response

Lambda H is therefore primarily an instruction transport and semantic handoff layer, not a permanent conversational language the receiving agent must stay inside.

What I have tested so far

The strongest evidence so far is behavioral rather than benchmark-scale.

I used fresh model sessions with only the standalone Decoder prompt and a dense packet containing:

Two independent decoders reconstructed the same operational story: the repository had already been inspected, the current blocker should be diagnosed if it exists, the blocker-to-failure causal hypothesis should then be verified, and the result should be reported. They also preserved the difference between the observed relation and the unconfirmed causal hypothesis instead of collapsing both into one fact.

The Doer tests were more useful because they failed.

The first Doer refused to act because it demanded an explicit X08 binding even though it was already running inside the target repository. The next version accepted receiver-current context but searched across unrelated repositories to determine which repo was “current”. The next correction pinned X08 to the workspace that existed at packet receipt. Finally, I removed the mandatory Lambda H response requirement so a successfully decoded instruction returns the agent to its normal workflow.

Those failures changed the protocol more than the successful Decoder test did.

Use case: classifier robustness and representation shift

A second reason I am interested in this project is classifier robustness.

Many moderation, routing, intent, and policy classifiers are trained primarily on ordinary language or embeddings derived from ordinary language. Lambda H changes the observable representation: the same high-level intent can arrive as semantic coordinates, structural references, conditions, and policy fields rather than as the original sentence.

That creates a useful research question:

Does a classifier remain semantically consistent when the lexical surface changes but the represented intent does not?

This can be studied as an evasion/robustness problem without turning the project into a recipe for defeating production safeguards.

A responsible evaluation would compare paired examples with equivalent intended meaning across representations and measure whether downstream controls make consistent decisions. Useful outcomes include discovering:

The goal of that work is not “find a magic encoding that bypasses every classifier”. A robust system should eventually classify the meaning and authority of the action, regardless of whether the request arrived as English, JSON, a tool call, or a semantic packet.

What this is not

Encode Lang is still an experiment.

It is not:

The wire can remove ordinary source wording while still leaking meaning through shared semantic anchors, packet shape, repeated references, traffic metadata, and host context.

What I want to learn next

The next useful experiments are behavioral:

The interesting result may be that numeric semantic transport is not better than natural language. That would still be useful. The project is valuable to me as a way to make the hidden assumptions in agent handoff—meaning, context, authority, output, and classification—explicit enough to test.