agentram 0.1.20 → 0.1.29
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.
- package/README.md +159 -146
- package/agentram/cli.py +426 -77
- package/agentram/orchestration.py +159 -28
- package/package.json +1 -1
- package/pyproject.toml +1 -1
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# AgentRAM
|
|
1
|
+
# AgentRAM
|
|
2
2
|
|
|
3
3
|
Async, model-agnostic Working RAM for coding agents such as Codex, Claude Code, Cursor, and custom MCP clients.
|
|
4
4
|
|
|
@@ -358,20 +358,20 @@ Minimum usage pattern:
|
|
|
358
358
|
|
|
359
359
|
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.
|
|
360
360
|
|
|
361
|
-
Bind models:
|
|
362
|
-
|
|
363
|
-
```bash
|
|
364
|
-
agentram bind-model claude-subagent agentram-reviewer --role reviewer
|
|
365
|
-
agentram bind-model claude claude-3-5-sonnet-latest --role reviewer --api-key-env ANTHROPIC_API_KEY
|
|
366
|
-
agentram bind-model openai-compatible qwen2.5-coder --role coder --base-url http://localhost:8000/v1 --api-key-env OPENAI_API_KEY
|
|
367
|
-
```
|
|
368
|
-
|
|
369
|
-
Claude Code subagent endpoint uses your local Claude CLI entrypoint. `model` is the subagent name from `.claude/agents`, for example `agentram-reviewer` or `agentram-planner`. Default command is `claude -p`. Override command when needed:
|
|
370
|
-
|
|
371
|
-
```bash
|
|
372
|
-
set AGENTRAM_CLAUDE_COMMAND=claude
|
|
373
|
-
agentram bind-model claude-subagent agentram-reviewer --role reviewer
|
|
374
|
-
```
|
|
361
|
+
Bind models:
|
|
362
|
+
|
|
363
|
+
```bash
|
|
364
|
+
agentram bind-model claude-subagent agentram-reviewer --role reviewer
|
|
365
|
+
agentram bind-model claude claude-3-5-sonnet-latest --role reviewer --api-key-env ANTHROPIC_API_KEY
|
|
366
|
+
agentram bind-model openai-compatible qwen2.5-coder --role coder --base-url http://localhost:8000/v1 --api-key-env OPENAI_API_KEY
|
|
367
|
+
```
|
|
368
|
+
|
|
369
|
+
Claude Code subagent endpoint uses your local Claude CLI entrypoint. `model` is the subagent name from `.claude/agents`, for example `agentram-reviewer` or `agentram-planner`. Default command is `claude -p`. Override command when needed:
|
|
370
|
+
|
|
371
|
+
```bash
|
|
372
|
+
set AGENTRAM_CLAUDE_COMMAND=claude
|
|
373
|
+
agentram bind-model claude-subagent agentram-reviewer --role reviewer
|
|
374
|
+
```
|
|
375
375
|
|
|
376
376
|
Build a dry-run orchestration plan:
|
|
377
377
|
|
|
@@ -396,12 +396,12 @@ agentram_run_coding_orchestration
|
|
|
396
396
|
|
|
397
397
|
TUI slash commands. Plain text only records/retrieves RAM; use `/ask` to call bound models:
|
|
398
398
|
|
|
399
|
-
```text
|
|
400
|
-
/bind-model claude-subagent agentram-reviewer role=reviewer
|
|
401
|
-
/bind-model claude claude-3-5-sonnet-latest role=reviewer api_key_env=ANTHROPIC_API_KEY
|
|
402
|
-
/models
|
|
403
|
-
/orchestrate review CLI orchestration
|
|
404
|
-
/ask xin
|
|
399
|
+
```text
|
|
400
|
+
/bind-model claude-subagent agentram-reviewer role=reviewer
|
|
401
|
+
/bind-model claude claude-3-5-sonnet-latest role=reviewer api_key_env=ANTHROPIC_API_KEY
|
|
402
|
+
/models
|
|
403
|
+
/orchestrate review CLI orchestration
|
|
404
|
+
/ask xin chà o
|
|
405
405
|
```
|
|
406
406
|
|
|
407
407
|
Storage:
|
|
@@ -876,7 +876,7 @@ Inside TUI:
|
|
|
876
876
|
|
|
877
877
|
```text
|
|
878
878
|
/bind-model openai-compatible Agentic --role coder --base-url http://localhost:8000/v1 --api-key-env OPENAI_API_KEY
|
|
879
|
-
/ask xin
|
|
879
|
+
/ask xin chà o
|
|
880
880
|
```
|
|
881
881
|
|
|
882
882
|
Do not paste raw API keys into `/bind-model`. `api_key_env` means environment variable name, e.g. `OPENAI_API_KEY`.
|
|
@@ -908,133 +908,146 @@ If `/ask` shows connection refused, the configured OpenAI-compatible server is n
|
|
|
908
908
|
|
|
909
909
|
```text
|
|
910
910
|
/bind-model openai-compatible Agentic --role coder --base-url http://localhost:8000/v1 --api-key-env OPENAI_API_KEY
|
|
911
|
-
/ask xin
|
|
911
|
+
/ask xin chà o
|
|
912
912
|
```
|
|
913
913
|
|
|
914
914
|
Start your local server first, or change `--base-url` to the provider URL.
|
|
915
|
-
|
|
916
|
-
## Prompt Router Model
|
|
917
|
-
|
|
918
|
-
AgentRAM can use a separate small router model before normal prompts. The router classifies each prompt, then sends it to the right path.
|
|
919
|
-
|
|
920
|
-
```text
|
|
921
|
-
coding -> bound coding endpoints / Claude subagents
|
|
922
|
-
planning -> Goal Stack and drift check
|
|
923
|
-
memory -> AgentRAM note ingest
|
|
924
|
-
chat -> RAM retrieve only
|
|
925
|
-
```
|
|
926
|
-
|
|
927
|
-
Bind a router model:
|
|
928
|
-
|
|
929
|
-
```text
|
|
930
|
-
/bind-router openai-compatible qwen2.5:1.5b base_url=http://localhost:8000/v1 api_key_env=OPENAI_API_KEY
|
|
931
|
-
/route on
|
|
932
|
-
```
|
|
933
|
-
|
|
934
|
-
Then prompt without slash:
|
|
935
|
-
|
|
936
|
-
```text
|
|
937
|
-
fix adapter.py
|
|
938
|
-
|
|
939
|
-
ghi
|
|
940
|
-
```
|
|
941
|
-
|
|
942
|
-
Disable auto routing:
|
|
943
|
-
|
|
944
|
-
```text
|
|
945
|
-
/route off
|
|
946
|
-
```
|
|
947
|
-
|
|
948
|
-
## Supervisor + Small Agent Workflow
|
|
949
|
-
|
|
950
|
-
AgentRAM can run as a two-flow coding agent system, not only as a flat multi-model router.
|
|
951
|
-
|
|
952
|
-
```text
|
|
953
|
-
agentram
|
|
954
|
-
|
|
|
955
|
-
v
|
|
956
|
-
Parse User Request
|
|
957
|
-
|
|
|
958
|
-
v
|
|
959
|
-
Supervisor Memory
|
|
960
|
-
|
|
|
961
|
-
v
|
|
962
|
-
Task Classifier / Supervisor Plan
|
|
963
|
-
|----------------------|
|
|
964
|
-
v v
|
|
965
|
-
Main Agent
|
|
966
|
-
(
|
|
967
|
-
planning/coding/fix
|
|
968
|
-
|
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
```
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
```
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
```
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
```
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
915
|
+
|
|
916
|
+
## Prompt Router Model
|
|
917
|
+
|
|
918
|
+
AgentRAM can use a separate small router model before normal prompts. The router classifies each prompt, then sends it to the right path.
|
|
919
|
+
|
|
920
|
+
```text
|
|
921
|
+
coding -> bound coding endpoints / Claude subagents
|
|
922
|
+
planning -> Goal Stack and drift check
|
|
923
|
+
memory -> AgentRAM note ingest
|
|
924
|
+
chat -> RAM retrieve only
|
|
925
|
+
```
|
|
926
|
+
|
|
927
|
+
Bind a router model:
|
|
928
|
+
|
|
929
|
+
```text
|
|
930
|
+
/bind-router openai-compatible qwen2.5:1.5b base_url=http://localhost:8000/v1 api_key_env=OPENAI_API_KEY
|
|
931
|
+
/route on
|
|
932
|
+
```
|
|
933
|
+
|
|
934
|
+
Then prompt without slash:
|
|
935
|
+
|
|
936
|
+
```text
|
|
937
|
+
fix adapter.py
|
|
938
|
+
cap nhat goal stack
|
|
939
|
+
ghi nho dung Claude subagent
|
|
940
|
+
```
|
|
941
|
+
|
|
942
|
+
Disable auto routing:
|
|
943
|
+
|
|
944
|
+
```text
|
|
945
|
+
/route off
|
|
946
|
+
```
|
|
947
|
+
|
|
948
|
+
## Supervisor + Small Agent Workflow
|
|
949
|
+
|
|
950
|
+
AgentRAM can run as a two-flow coding agent system, not only as a flat multi-model router.
|
|
951
|
+
|
|
952
|
+
```text
|
|
953
|
+
agentram
|
|
954
|
+
|
|
|
955
|
+
v
|
|
956
|
+
Parse User Request
|
|
957
|
+
|
|
|
958
|
+
v
|
|
959
|
+
Supervisor Memory
|
|
960
|
+
|
|
|
961
|
+
v
|
|
962
|
+
Task Classifier / Supervisor Plan
|
|
963
|
+
|----------------------|
|
|
964
|
+
v v
|
|
965
|
+
Main Agent
|
|
966
|
+
(Codex CLI / Claude Code / OpenAI-compatible)
|
|
967
|
+
planning/coding/fix, may edit files when bound to CLI provider
|
|
968
|
+
|
|
|
969
|
+
v
|
|
970
|
+
Small Agent
|
|
971
|
+
(Qwen/OpenAI-compatible/Anthropic)
|
|
972
|
+
notes/RAM/coding facts only
|
|
973
|
+
|
|
|
974
|
+
v
|
|
975
|
+
Merge + Update Memory
|
|
976
|
+
|
|
|
977
|
+
v
|
|
978
|
+
Return Result
|
|
979
|
+
```
|
|
980
|
+
|
|
981
|
+
Bind workflow agents:
|
|
982
|
+
|
|
983
|
+
```text
|
|
984
|
+
/bind-agent supervisor openai-compatible supervisor-model base_url=https://api.example.com/v1 api_key_env=SUPERVISOR_AGENT_KEY
|
|
985
|
+
/bind-agent main codex-cli current base_url="codex exec"
|
|
986
|
+
/bind-agent small openai-compatible qwen-codex base_url=http://localhost:8001/v1 api_key_env=SMALL_AGENT_KEY
|
|
987
|
+
/workflow
|
|
988
|
+
```
|
|
989
|
+
|
|
990
|
+
Then use normal prompts without slash:
|
|
991
|
+
|
|
992
|
+
```text
|
|
993
|
+
refactor orchestration workflow
|
|
994
|
+
fix bug in adapter.py
|
|
995
|
+
plan next milestone
|
|
996
|
+
```
|
|
997
|
+
|
|
998
|
+
Runtime behavior:
|
|
999
|
+
|
|
1000
|
+
```text
|
|
1001
|
+
Supervisor creates plan -> Main CLI coding agent edits/returns result -> Small agent reads plan + main result and records RAM notes -> AgentRAM merges result
|
|
1002
|
+
```
|
|
1003
|
+
|
|
1000
1004
|
Small agent should not own big direction. It records plans, decisions, files, risks, next tasks, and coding facts into RAM.
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1005
|
+
|
|
1006
|
+
CLI coding providers for file edits:
|
|
1007
|
+
|
|
1008
|
+
```text
|
|
1009
|
+
/bind-agent main codex-cli current base_url="codex exec"
|
|
1010
|
+
/bind-agent main claude-code claude base_url="claude"
|
|
1011
|
+
```
|
|
1012
|
+
|
|
1013
|
+
Use `codex-cli` or `claude-code` only for the main agent when you want a coding agent subprocess that can inspect and edit files. Keep the small agent on an LLM-only provider so it records notes but does not edit code.
|
|
1014
|
+
|
|
1015
|
+
## Textual TUI
|
|
1016
|
+
|
|
1017
|
+
Install rich terminal UI with native scrollable chat pane:
|
|
1018
|
+
|
|
1019
|
+
```bash
|
|
1020
|
+
pip install agentram[tui]
|
|
1021
|
+
agentram tui
|
|
1022
|
+
```
|
|
1023
|
+
|
|
1011
1024
|
When `textual` is installed, AgentRAM uses a real full-screen TUI with mouse wheel scrolling inside the chat frame. If `textual` is missing, it falls back to the basic print-based terminal UI.
|
|
1012
|
-
|
|
1013
|
-
## npm Python Dependencies
|
|
1014
|
-
|
|
1015
|
-
When installed through npm, AgentRAM runs a `postinstall` step that tries to install Python TUI dependencies for the Python interpreter used by `agentram`:
|
|
1016
|
-
|
|
1017
|
-
```text
|
|
1018
|
-
textual>=0.80
|
|
1019
|
-
prompt_toolkit>=3.0
|
|
1020
|
-
```
|
|
1021
|
-
|
|
1022
|
-
Set target Python before install when needed:
|
|
1023
|
-
|
|
1024
|
-
```powershell
|
|
1025
|
-
$env:PYTHON="C:\Users\admin\anaconda3\python.exe"
|
|
1026
|
-
npm install -g agentram@latest
|
|
1027
|
-
```
|
|
1028
|
-
|
|
1029
|
-
Skip automatic Python dependency install:
|
|
1030
|
-
|
|
1031
|
-
```powershell
|
|
1032
|
-
$env:AGENTRAM_SKIP_PY_DEPS="1"
|
|
1033
|
-
npm install -g agentram@latest
|
|
1034
|
-
```
|
|
1035
|
-
|
|
1036
|
-
If auto install fails, install manually:
|
|
1037
|
-
|
|
1038
|
-
```powershell
|
|
1039
|
-
python -m pip install textual prompt_toolkit
|
|
1025
|
+
|
|
1026
|
+
## npm Python Dependencies
|
|
1027
|
+
|
|
1028
|
+
When installed through npm, AgentRAM runs a `postinstall` step that tries to install Python TUI dependencies for the Python interpreter used by `agentram`:
|
|
1029
|
+
|
|
1030
|
+
```text
|
|
1031
|
+
textual>=0.80
|
|
1032
|
+
prompt_toolkit>=3.0
|
|
1033
|
+
```
|
|
1034
|
+
|
|
1035
|
+
Set target Python before install when needed:
|
|
1036
|
+
|
|
1037
|
+
```powershell
|
|
1038
|
+
$env:PYTHON="C:\Users\admin\anaconda3\python.exe"
|
|
1039
|
+
npm install -g agentram@latest
|
|
1040
|
+
```
|
|
1041
|
+
|
|
1042
|
+
Skip automatic Python dependency install:
|
|
1043
|
+
|
|
1044
|
+
```powershell
|
|
1045
|
+
$env:AGENTRAM_SKIP_PY_DEPS="1"
|
|
1046
|
+
npm install -g agentram@latest
|
|
1047
|
+
```
|
|
1048
|
+
|
|
1049
|
+
If auto install fails, install manually:
|
|
1050
|
+
|
|
1051
|
+
```powershell
|
|
1052
|
+
python -m pip install textual prompt_toolkit
|
|
1040
1053
|
```
|