agentram 0.1.0 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,18 @@
1
+ ---
2
+ name: agentram-docs
3
+ description: Updates or reviews docs from AgentRAM memory and current repo state.
4
+ tools: Read, Grep, Glob, Edit, mcp__agentram__agentram_retrieve
5
+ ---
6
+
7
+ You are AgentRAM Docs Subagent.
8
+
9
+ Scope:
10
+ - Read current README/docs.
11
+ - Pull relevant AgentRAM notes.
12
+ - Update usage docs for commands, MCP, npm, and integrations.
13
+
14
+ Rules:
15
+ - Keep docs runnable.
16
+ - Prefer short examples.
17
+ - Do not expose secrets.
18
+ - Mention Python 3.10+ requirement for npm wrapper.
@@ -0,0 +1,20 @@
1
+ ---
2
+ name: agentram-memory
3
+ description: Records decisions, files, task state, and risks into AgentRAM. Use after major coding actions or before context compaction.
4
+ tools: Read, Grep, Glob, mcp__agentram__agentram_emit_event, mcp__agentram__agentram_retrieve
5
+ ---
6
+
7
+ You are AgentRAM Memory Subagent.
8
+
9
+ Scope:
10
+ - Observe coding work.
11
+ - Extract durable notes: decisions, file changes, task state, open questions, risks.
12
+ - Write notes through `agentram_emit_event`.
13
+ - Do not edit code.
14
+
15
+ Rules:
16
+ - Use only facts visible in repo, tool results, or conversation.
17
+ - Keep notes short.
18
+ - Include file paths when known.
19
+ - Prefer `ingest: true` for important decisions.
20
+ - Prefer `ingest: false` for noisy chat/tool events.
@@ -0,0 +1,18 @@
1
+ ---
2
+ name: agentram-planner
3
+ description: Builds task plans using AgentRAM Goal Stack and checks drift before scope changes.
4
+ tools: Read, Grep, Glob, mcp__agentram__agentram_retrieve, mcp__agentram__agentram_check_goal_drift, mcp__agentram__agentram_update_goal_state
5
+ ---
6
+
7
+ You are AgentRAM Planner Subagent.
8
+
9
+ Scope:
10
+ - Read Goal Stack first.
11
+ - Check whether requested task aligns with mission/current goal/current task.
12
+ - Produce small ordered implementation plan.
13
+ - Update Goal Stack only when user intent is clear.
14
+
15
+ Rules:
16
+ - No code edits.
17
+ - No broad refactors unless current goal requires them.
18
+ - If drift risk appears, ask for confirmation.
@@ -0,0 +1,18 @@
1
+ ---
2
+ name: agentram-reviewer
3
+ description: Reviews changed code against AgentRAM context, tests, and goal drift.
4
+ tools: Read, Grep, Glob, mcp__agentram__agentram_retrieve, mcp__agentram__agentram_check_goal_drift
5
+ ---
6
+
7
+ You are AgentRAM Reviewer Subagent.
8
+
9
+ Scope:
10
+ - Review current changes.
11
+ - Compare implementation to Goal Stack and RAM notes.
12
+ - Find correctness gaps, missing tests, risky assumptions, and docs drift.
13
+
14
+ Rules:
15
+ - Return concise findings.
16
+ - Cite file paths.
17
+ - Separate blockers from non-blockers.
18
+ - Do not edit code.
@@ -0,0 +1,11 @@
1
+ ---
2
+ description: Check whether current task drifts from AgentRAM Goal Stack.
3
+ argument-hint: [task]
4
+ ---
5
+
6
+ Check AgentRAM goal drift.
7
+
8
+ 1. Call MCP tool `agentram_check_goal_drift` with `task`: `$ARGUMENTS`.
9
+ 2. If `status` is `ok`, continue.
10
+ 3. If `status` is `drift_risk`, ask user to confirm scope change or update Goal Stack.
11
+ 4. Do not suggest extra next actions when AgentRAM returns `next_actions: []`.
@@ -0,0 +1,17 @@
1
+ ---
2
+ description: Save a decision or important fact into AgentRAM.
3
+ argument-hint: [note]
4
+ ---
5
+
6
+ Save this note to AgentRAM.
7
+
8
+ Call MCP tool `agentram_emit_event` with:
9
+
10
+ ```json
11
+ {
12
+ "type": "DECISION",
13
+ "payload": {"content": "$ARGUMENTS"},
14
+ "task_id": "codex",
15
+ "ingest": true
16
+ }
17
+ ```
@@ -0,0 +1,15 @@
1
+ ---
2
+ description: Build or run AgentRAM multi-model coding orchestration.
3
+ argument-hint: [task]
4
+ ---
5
+
6
+ Use AgentRAM multi-model orchestration for this task.
7
+
8
+ 1. Call `agentram_read_coding_models`.
9
+ 2. If no endpoints exist, ask user to bind a model with `agentram_bind_coding_model`.
10
+ 3. Call `agentram_build_coding_orchestration` with:
11
+ - `task`: `$ARGUMENTS`
12
+ - `files`: relevant files if known
13
+ - `modalities`: `["text"]` unless images/audio are included
14
+ 4. If user explicitly requests execution, call `agentram_run_coding_orchestration` with `execute: true`.
15
+ 5. Summarize per-model outputs and disagreements.
@@ -0,0 +1,10 @@
1
+ ---
2
+ description: Show AgentRAM status and Goal Stack.
3
+ ---
4
+
5
+ Show AgentRAM project memory status.
6
+
7
+ 1. Call `agentram_init` if files do not exist.
8
+ 2. Call `agentram_read_goal_state`.
9
+ 3. Call `agentram_read_task_state` with `task_id`: `codex`.
10
+ 4. Summarize current goal, current task, and recent memory notes.
@@ -0,0 +1,14 @@
1
+ ---
2
+ description: Retrieve AgentRAM context before coding.
3
+ argument-hint: [query]
4
+ ---
5
+
6
+ Use AgentRAM before coding.
7
+
8
+ 1. Call MCP tool `agentram_retrieve` with:
9
+ - `query`: `$ARGUMENTS`
10
+ - `task_id`: `codex`
11
+ - `limit`: `8`
12
+ 2. Read Goal Stack first.
13
+ 3. Use returned RAM notes as extra context.
14
+ 4. If no notes exist, continue normally and emit new events after important actions.
package/README.md CHANGED
@@ -65,6 +65,12 @@ Equivalent explicit command:
65
65
  agentram tui
66
66
  ```
67
67
 
68
+ Install Claude Code commands and subagents into the current project:
69
+
70
+ ```bash
71
+ agentram claude-install --target .
72
+ ```
73
+
68
74
  Buttons inside the UI:
69
75
 
70
76
  ```text
@@ -153,6 +159,66 @@ If `python` is not the right binary, set `PYTHON`:
153
159
  ```bash
154
160
  PYTHON=python3 npx agentram status
155
161
  ```
162
+
163
+ ## Coding TUI, Slash Commands, And Subagents
164
+
165
+ AgentRAM TUI now behaves like a coding-agent CLI inspired by `freecodexyz/free-code`: left status panel, chat transcript, slash command registry, RAM tool calls, and Claude subagent prompt templates.
166
+
167
+ Run TUI:
168
+
169
+ ```bash
170
+ agentram tui
171
+ ```
172
+
173
+ Supported TUI slash commands:
174
+
175
+ ```text
176
+ /help
177
+ /init
178
+ /status
179
+ /retrieve <query>
180
+ /goal
181
+ /set-goal current_goal="Ship CLI" current_task="Add slash commands"
182
+ /drift <task>
183
+ /events
184
+ /replay
185
+ /agents
186
+ /agent reviewer <task>
187
+ /claude-install .
188
+ /note <decision>
189
+ /clear
190
+ /exit
191
+ ```
192
+
193
+ Claude Code repo templates are included:
194
+
195
+ ```text
196
+ .claude/commands/ram.md
197
+ .claude/commands/ram-drift.md
198
+ .claude/commands/ram-note.md
199
+ .claude/commands/ram-status.md
200
+ .claude/agents/agentram-memory.md
201
+ .claude/agents/agentram-planner.md
202
+ .claude/agents/agentram-reviewer.md
203
+ .claude/agents/agentram-docs.md
204
+ ```
205
+
206
+ Usage inside Claude Code:
207
+
208
+ ```text
209
+ /ram adapter memory writer
210
+ /ram-drift refactor MCP server
211
+ /ram-note Use npm wrapper only as Python launcher.
212
+ /ram-status
213
+ ```
214
+
215
+ Subagent intent:
216
+
217
+ - `agentram-memory`: records durable notes, no code edits.
218
+ - `agentram-planner`: checks Goal Stack and plans work.
219
+ - `agentram-reviewer`: reviews changes against RAM and goal drift.
220
+ - `agentram-docs`: updates docs from repo state and RAM notes.
221
+
156
222
  ## Install In Coding Agents
157
223
 
158
224
  ### Codex MCP
@@ -286,6 +352,53 @@ Minimum usage pattern:
286
352
  3. Call `agentram_check_goal_drift` before switching direction.
287
353
  4. Call `agentram_retrieve` again near context pressure or resume.
288
354
 
355
+
356
+ ## Multi-Model Coding Orchestration
357
+
358
+ AgentRAM can bind multiple coding model endpoints and let Claude Code or MCP clients orchestrate them in parallel. This keeps the `free-code` style command registry, but adds project RAM, Goal Stack, and multi-agent model routing.
359
+
360
+ Bind models:
361
+
362
+ ```bash
363
+ agentram bind-model claude claude-3-5-sonnet-latest --role reviewer --api-key-env ANTHROPIC_API_KEY
364
+ agentram bind-model openai-compatible qwen2.5-coder --role coder --base-url http://localhost:8000/v1 --api-key-env OPENAI_API_KEY
365
+ ```
366
+
367
+ Build a dry-run orchestration plan:
368
+
369
+ ```bash
370
+ agentram orchestrate "review CLI orchestration" --file agentram/cli.py
371
+ ```
372
+
373
+ Run endpoints concurrently when keys and base URLs are configured:
374
+
375
+ ```bash
376
+ agentram orchestrate "review CLI orchestration" --file agentram/cli.py --execute
377
+ ```
378
+
379
+ Claude/MCP tools:
380
+
381
+ ```text
382
+ agentram_bind_coding_model
383
+ agentram_read_coding_models
384
+ agentram_build_coding_orchestration
385
+ agentram_run_coding_orchestration
386
+ ```
387
+
388
+ TUI slash commands:
389
+
390
+ ```text
391
+ /bind-model claude claude-3-5-sonnet-latest role=reviewer api_key_env=ANTHROPIC_API_KEY
392
+ /models
393
+ /orchestrate review CLI orchestration
394
+ ```
395
+
396
+ Storage:
397
+
398
+ ```text
399
+ .agentram/agent_profile.json
400
+ ```
401
+
289
402
  ## MCP Tools
290
403
 
291
404
  | Tool | Purpose |
@@ -298,6 +411,10 @@ Minimum usage pattern:
298
411
  | `agentram_read_goal_state` | Read mission, goals, current task, histories. |
299
412
  | `agentram_update_goal_state` | Update Goal Stack fields. |
300
413
  | `agentram_check_goal_drift` | Warn only when task appears off-goal. |
414
+ | `agentram_bind_coding_model` | Bind provider/model/role/modalities endpoint. |
415
+ | `agentram_read_coding_models` | Read bound coding model endpoints. |
416
+ | `agentram_build_coding_orchestration` | Build multi-agent prompts without model calls. |
417
+ | `agentram_run_coding_orchestration` | Dry-run or execute endpoints concurrently. |
301
418
 
302
419
  ### Init
303
420
 
@@ -1,6 +1,7 @@
1
1
  from .adapter import AnthropicMemoryAdapter, HeuristicMemoryAdapter, OllamaMemoryAdapter, OpenAICompatibleMemoryAdapter
2
2
  from .config import anthropic_from_env, load_env_file, merged_env, openai_compatible_from_env
3
3
  from .daemon import AgentRAMDaemon
4
+ from .orchestration import AgentModelEndpoint, CodingOrchestrationRequest, MultiModelCodingOrchestrator
4
5
  from .orchestrator import AgentRAM
5
6
  from .retriever import MemoryRetriever
6
7
  from .schema import Event, EventType, MemoryItem, MemoryPatch, MemoryScope, MemoryType
@@ -8,6 +9,8 @@ from .schema import Event, EventType, MemoryItem, MemoryPatch, MemoryScope, Memo
8
9
  __all__ = [
9
10
  "AgentRAM",
10
11
  "AgentRAMDaemon",
12
+ "AgentModelEndpoint",
13
+ "CodingOrchestrationRequest",
11
14
  "AnthropicMemoryAdapter",
12
15
  "anthropic_from_env",
13
16
  "Event",
@@ -20,6 +23,7 @@ __all__ = [
20
23
  "MemoryRetriever",
21
24
  "MemoryScope",
22
25
  "MemoryType",
26
+ "MultiModelCodingOrchestrator",
23
27
  "OllamaMemoryAdapter",
24
28
  "openai_compatible_from_env",
25
29
  "OpenAICompatibleMemoryAdapter",