elixir: add top-level Contexa module as public API facade

Swadhin Biswas committed 7 months ago
a407de2
1 parent a20b208
commit a407de2
1 file changed
+22 -0
Showing 1 changed file+22-0
▼ELIXIR/lib/contexa.ex
+22-0
1
+defmodule Contexa do
2
+ @moduledoc """
3
+ contexa — Git-inspired context management for LLM agents.
4
+
5
+ COMMIT, BRANCH, MERGE, and CONTEXT operations over a persistent
6
+ versioned memory workspace. Based on arXiv:2508.00031.
7
+
8
+ ## Quick Start
9
+
10
+ ws = Contexa.Workspace.new("/tmp/my-project")
11
+ ws = Contexa.Workspace.init(ws, "Build an AI agent")
12
+
13
+ {ws, _ota} = Contexa.Workspace.log_ota(ws, "Observed X", "Thinking Y", "Did Z")
14
+ {ws, _commit} = Contexa.Workspace.commit(ws, "Implemented feature")
15
+
16
+ ws = Contexa.Workspace.branch(ws, "explore", "Try alternative approach")
17
+ {ws, _commit} = Contexa.Workspace.merge(ws, "explore")
18
+
19
+ ctx = Contexa.Workspace.context(ws, "main", 3)
20
+ IO.puts(Contexa.Models.context_summary(ctx))
21
+ """
22
+end
0
23