-
Notifications
You must be signed in to change notification settings - Fork 10
Feat/native agent harness #55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 3 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
fcea9f9
feat(agent): add harness diagnostics and docs
laxmanclo 98743dd
feat: fix the cli issues
laxmanclo 0b144a0
feat(harness): add tool calling (Phase 4), window persistence (Phase …
laxmanclo 3977b56
fix: default to litellm provider for chat and extraction
laxmanclo ae0ece4
feat: add Gemini examples, Hermes/OpenClaw integrations, and new exam…
laxmanclo a534ce4
chore: merge main into feat/native-agent-harness, resolve conflicts
laxmanclo 126e711
fix: ruff lint errors from merge
laxmanclo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,134 @@ | ||
| #!/usr/bin/env bash | ||
| # vektori demo script — for screen recording | ||
| # run: bash demo.sh | ||
| # tip: use a terminal with big font, dark theme, ~100 cols wide | ||
|
|
||
| set -euo pipefail | ||
|
|
||
| BOLD="\033[1m" | ||
| DIM="\033[2m" | ||
| GREEN="\033[32m" | ||
| CYAN="\033[36m" | ||
| YELLOW="\033[33m" | ||
| RED="\033[31m" | ||
| RESET="\033[0m" | ||
|
|
||
| # ── helpers ────────────────────────────────────────────────────────────────── | ||
|
|
||
| hr() { printf "${DIM}%0.s─${RESET}" $(seq 1 60); echo; } | ||
|
|
||
| type_cmd() { | ||
| # prints a "typed" prompt then runs the command | ||
| local cmd="$1" | ||
| printf "\n${GREEN}❯${RESET} " | ||
| for ((i=0; i<${#cmd}; i++)); do | ||
| printf "%s" "${cmd:$i:1}" | ||
| sleep 0.03 | ||
| done | ||
| echo | ||
| sleep 0.6 | ||
| eval "$cmd" | ||
| } | ||
|
|
||
| pause() { sleep "${1:-2}"; } | ||
|
|
||
| section() { | ||
| echo | ||
| hr | ||
| printf "${BOLD}${CYAN} $1${RESET}\n" | ||
| hr | ||
| pause 1 | ||
| } | ||
|
|
||
| # ── env ────────────────────────────────────────────────────────────────────── | ||
|
|
||
| export VEKTORI_USER_ID="${VEKTORI_USER_ID:-dev}" | ||
| export VEKTORI_EXTRACTION_MODEL="${VEKTORI_EXTRACTION_MODEL:-litellm:groq/llama-3.3-70b-versatile}" | ||
| export VEKTORI_EMBEDDING_MODEL="${VEKTORI_EMBEDDING_MODEL:-sentence-transformers:all-MiniLM-L6-v2}" | ||
|
|
||
| # ── SCENE 1: the hook ───────────────────────────────────────────────────────── | ||
|
|
||
| clear | ||
| pause 1 | ||
|
|
||
| echo | ||
| printf "${BOLD} your AI assistant forgets everything after every session.${RESET}\n" | ||
| pause 2 | ||
| printf "${DIM} every project. every decision. every bug. gone.${RESET}\n" | ||
| pause 2 | ||
| printf "${DIM} mem0 charges you \$50/month to fix this.${RESET}\n" | ||
| pause 2 | ||
| printf "${YELLOW}${BOLD} we just read ~/.claude${RESET}\n" | ||
| pause 3 | ||
|
|
||
| # ── SCENE 2: detect ────────────────────────────────────────────────────────── | ||
|
|
||
| section "STEP 1 — vektori detects your sessions" | ||
|
|
||
| type_cmd "vektori inject -u dev --list" | ||
| pause 3 | ||
|
|
||
| # ── SCENE 3: inject ────────────────────────────────────────────────────────── | ||
|
|
||
| section "STEP 2 — inject everything. one command." | ||
|
|
||
| type_cmd "vektori inject -u dev --since 30 --yes" | ||
| pause 2 | ||
|
|
||
| type_cmd "vektori stats -u dev" | ||
| pause 3 | ||
|
|
||
| # ── SCENE 4: recall across sessions ────────────────────────────────────────── | ||
|
|
||
| section "STEP 3 — now ask anything. across every session." | ||
|
|
||
| echo | ||
| printf "${DIM} (claude code and codex sessions. all projects. past 30 days.)${RESET}\n" | ||
| pause 2 | ||
|
|
||
| type_cmd "vektori recall \"what was the engram project about?\" -u dev" | ||
| pause 3 | ||
|
|
||
| type_cmd "vektori recall \"what did we build at the hackathon?\" -u dev" | ||
| pause 3 | ||
|
|
||
| type_cmd "vektori recall \"what storage backends did we add to vektori?\" -u dev" | ||
| pause 3 | ||
|
|
||
| # ── SCENE 5: L2 — the full story ───────────────────────────────────────────── | ||
|
|
||
| section "STEP 4 — L2: reconstruct the full conversation" | ||
|
|
||
| echo | ||
| printf "${DIM} L0 = just facts. L1 = facts + source sentences. L2 = full story.${RESET}\n" | ||
| pause 2 | ||
|
|
||
| type_cmd "vektori search \"vektori storage decisions\" -u dev --depth l2" | ||
| pause 4 | ||
|
|
||
| # ── SCENE 6: cross-project ──────────────────────────────────────────────────── | ||
|
|
||
| section "STEP 5 — cross-project memory" | ||
|
|
||
| type_cmd "vektori search \"what projects have we shipped\" -u dev --depth l1 --top-k 6" | ||
| pause 3 | ||
|
|
||
| type_cmd "vektori search \"what bugs did codex fix on vektori\" -u dev --expand" | ||
| pause 3 | ||
|
|
||
| # ── SCENE 7: the closer ─────────────────────────────────────────────────────── | ||
|
|
||
| echo | ||
| hr | ||
| echo | ||
| printf "${BOLD} every claude code session. every codex session.${RESET}\n" | ||
| pause 1 | ||
| printf "${BOLD} across every project. fully searchable.${RESET}\n" | ||
| pause 1 | ||
| printf "${BOLD} L0 / L1 / L2 depth. semantic search. zero cloud.${RESET}\n" | ||
| pause 2 | ||
| echo | ||
| printf "${GREEN}${BOLD} pip install vektori${RESET}\n" | ||
| echo | ||
| hr | ||
| echo | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| # Agent Harness Checklist | ||
|
|
||
| This tracks the current implementation status against `docs/AGENT_HARNESS_SPEC.md`. | ||
|
|
||
| ## Implemented | ||
|
|
||
| - `VektoriAgent`, `AgentConfig`, and `AgentTurnResult` | ||
| - Separate `ChatModelProvider` / `ChatCompletionResult` | ||
| - `AgentContextLoader` for `agents.md` and `vektori.yaml` | ||
| - `MessageWindow` with local compaction | ||
| - `ProfilePatch` lane with in-memory and SQLite-backed stores | ||
| - Explicit profile learning (name, verbosity, units patterns) | ||
| - Deterministic prompt assembly with token budgeting and trimming | ||
| - Retrieval decision diagnostics on each turn | ||
| - Native CLI chat entrypoint via `vektori agent chat` | ||
| - **Phase 4 — Tool calling**: `vektori/tools/memory.py` with `search_memory`, `get_profile`, `update_profile` schemas + multi-round-trip tool loop in `VektoriAgent` | ||
| - **Phase 5 — Window persistence**: `SQLiteWindowStore` with `save_window()` / `resume_window()` on agent; sessions resumable across process restarts | ||
| - E2E integration test script: `scripts/test_agent_e2e.py` | ||
|
|
||
| ## Partial | ||
|
|
||
| - Profile learning rules are explicit but still heuristic-driven (regex patterns only) | ||
| - Theory-of-Mind isolation exists in profile storage, not yet a broader runtime concept | ||
| - Context parsing is forgiving; not fully normalized for complex YAML | ||
| - Cold-path pipeline is `asyncio.create_task`, not a dedicated worker queue | ||
|
|
||
| ## Missing / Next | ||
|
|
||
| - Anthropic `AnthropicChatModel` and Ollama registration in `CHAT_REGISTRY` | ||
| - Richer prompt budgeting with exact tokenization (tiktoken / provider tokenizers) | ||
| - Tool calling for Anthropic API (uses different tool_use schema) | ||
| - Compaction summaries optionally persisted as tagged episodic memory (Phase 5b) | ||
| - Cross-session planning / multi-agent shared windows |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The script ignores caller-supplied
VEKTORI_USER_ID.Every command still passes
-u dev, so the exportedVEKTORI_USER_IDnever actually takes effect. That makes the demo silently read/write the wrong memory namespace for anyone who sets a different user in the environment.Also applies to: 68-116
🤖 Prompt for AI Agents