Skip to content

feat(examples): add Honcho memory skill for Zo Computer#495

Merged
ajspig merged 9 commits intoplastic-labs:mainfrom
LubaKaper:feature/honcho-zo-skill
Apr 6, 2026
Merged

feat(examples): add Honcho memory skill for Zo Computer#495
ajspig merged 9 commits intoplastic-labs:mainfrom
LubaKaper:feature/honcho-zo-skill

Conversation

@LubaKaper
Copy link
Copy Markdown
Contributor

@LubaKaper LubaKaper commented Apr 5, 2026

What this PR does

Adds a new integration example at examples/zo/ that packages Honcho as a
persistent memory skill for Zo Computer — a cloud AI
platform where users build reusable workflows called skills.

Changes

  • SKILL.md — Zo-compatible skill manifest with YAML frontmatter (name,
    description, compatibility, license, metadata)
  • client.py — Honcho client initialization helper using environment variables
  • tools/save_memory.py — saves user/assistant messages to a Honcho session
  • tools/query_memory.py — queries peer memory via the Dialectic API
  • tools/get_context.py — retrieves conversation context in OpenAI message
    format for LLM prompt injection
  • README.md — setup instructions, tool reference, concept mapping, and
    Zo marketplace submission steps
  • tests/ — import tests and functional tests verified against the Honcho
    cloud API (14/14 passing)

Problem it solves

Honcho currently has integrations for CrewAI and LangGraph, but no example
for Zo Computer. This PR closes that gap by giving Zo users a ready-to-use
skill that adds persistent memory to any AI workflow — auto-saving
conversations, answering questions like "What do you remember about me?",
and injecting relevant context into LLM prompts.

It also serves as a reference for the Honcho concept mapping
(Workspaces → accounts, Peers → users, Sessions → conversations), making
it easier for new developers to understand the SDK.

Why I picked this issue

This was a good first issue that allowed me to learn the Honcho SDK end-to-end
while delivering something immediately useful — a new distribution channel for
Honcho through the Zo skill marketplace.

Testing

All 14 tests pass against the Honcho cloud API:
14 passed in 75.91s

Closes #406

@ajspig would love your feedback on this!

Summary by CodeRabbit

  • New Features

    • Honcho Memory Skill for Zo Computer: save conversation turns, query memory with natural language, and inject retrieved context into assistant prompts.
  • Documentation

    • Added comprehensive docs: setup, env vars (API key, optional workspace ID), usage examples, tooling signatures, and marketplace submission steps.
  • Tests

    • Added import, validation, and end-to-end integration tests (including optional live-run gating and rate-limit mitigation).
  • Chores

    • Project packaging/config added and new ignore pattern added to exclude worktree files.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 5, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

Adds a packaged Honcho Memory Skill for Zo Computer: three tools (save_memory, query_memory, get_context), a Honcho client factory, package metadata, docs, tests, and a .gitignore update to exclude .worktrees/.

Changes

Cohort / File(s) Summary
Version Control
\.gitignore
Added .worktrees/ ignore pattern.
Documentation
examples/zo/README.md, examples/zo/SKILL.md
New README and SKILL spec describing skill purpose, environment variables, tool APIs, examples, tests, marketplace submission, and license.
Project Configuration
examples/zo/pyproject.toml
New pyproject defining honcho-zo-skill metadata, runtime (Python >=3.9), dependencies (honcho-ai>=2.1.0, python-dotenv>=1.0.0), dev deps, and build settings.
Package Entry / Exports
examples/zo/tools/__init__.py
Exports get_context, query_memory, save_memory and sets __all__.
Client Factory
examples/zo/tools/client.py
Adds `get_client(workspace_id: str
Tool: Save
examples/zo/tools/save_memory.py
Adds save_memory(user_id, content, role, session_id, assistant_id="assistant") — validates non-empty content, resolves/creates peers and session, appends message, returns confirmation.
Tool: Query
examples/zo/tools/query_memory.py
Adds query_memory(user_id, query, session_id=None) — validates non-empty query, calls peer.chat(...), returns response or fallback string.
Tool: Context
examples/zo/tools/get_context.py
Adds get_context(user_id, session_id, assistant_id, tokens=4000) — resolves peers/session, calls session.context(tokens=...), converts to OpenAI-style messages.
Tests
examples/zo/tests/test_basic.py, examples/zo/tests/test_tools.py
New unit/import tests and integration tests (skipped without HONCHO_API_KEY) covering imports, validation errors, save/query/get_context behavior, token budgeting, and end-to-end flows. Note: test_tools.py exercises live Honcho API when env present.

Sequence Diagrams

sequenceDiagram
    actor User
    participant Zo as Zo Computer
    participant Save as save_memory
    participant Client as get_client
    participant Honcho as Honcho API

    User->>Zo: Send message
    Zo->>Save: save_memory(user_id, content, role, session_id)
    Save->>Client: get_client()
    Client->>Honcho: Init(api_key, workspace)
    Save->>Honcho: get/create peer(user)
    Save->>Honcho: get/create peer(assistant)
    Save->>Honcho: get/create session(session_id)
    Save->>Honcho: add_peers([...])
    Save->>Honcho: append_message(from peer, content)
    Honcho-->>Save: confirmation
    Save-->>Zo: saved confirmation
Loading
sequenceDiagram
    actor User
    participant Zo as Zo Computer
    participant Query as query_memory
    participant Client as get_client
    participant Dialectic as Honcho Dialectic API

    User->>Zo: "What do you remember about X?"
    Zo->>Query: query_memory(user_id, query, session_id)
    Query->>Client: get_client()
    Client->>Dialectic: Init(api_key, workspace)
    Query->>Dialectic: peer.chat(query, session)
    Dialectic-->>Query: response
    Query-->>Zo: formatted string
    Zo-->>User: display memory
Loading
sequenceDiagram
    actor User
    participant Zo as Zo Computer
    participant Context as get_context
    participant Client as get_client
    participant Honcho as Honcho API

    User->>Zo: Prepare LLM prompt
    Zo->>Context: get_context(user_id, session_id, assistant_id, tokens)
    Context->>Client: get_client()
    Client->>Honcho: Init(api_key, workspace)
    Context->>Honcho: get peers & session
    Context->>Honcho: session.context(tokens)
    Honcho-->>Context: recent context
    Context->>Context: to_openai(assistant)
    Context-->>Zo: list of message dicts
    Zo->>LLM: inject context into prompt
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Suggested reviewers

  • VVoruganti
  • Rajat-Ahuja1997

Poem

🐇 I nibble code and stash each line,
Honcho keeps the memories fine;
Queries hop back, context in tow,
Zo prompts brighter, thoughts in a row,
I thump and cheer — the logs all grow. 🥕

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title clearly and concisely summarizes the main change: adding a Honcho memory skill for Zo Computer, matching the primary objective.
Linked Issues check ✅ Passed The PR implements all core capabilities from issue #406: auto-memory (save_memory.py), query memory (query_memory.py), context injection (get_context.py), multi-workspace support (client.py), Zo skill format (SKILL.md), documentation (README.md), and includes comprehensive tests.
Out of Scope Changes check ✅ Passed All changes are directly aligned with issue #406 objectives. The .gitignore update is a minor housekeeping change supporting the new examples directory structure and is appropriate in scope.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 5

🧹 Nitpick comments (6)
examples/zo/tools/__init__.py (1)

7-7: Consider sorting __all__ alphabetically.

Static analysis (RUF022) flags that __all__ is not sorted. Sorting improves readability and consistency.

Proposed fix
-__all__ = ["save_memory", "query_memory", "get_context"]
+__all__ = ["get_context", "query_memory", "save_memory"]
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@examples/zo/tools/__init__.py` at line 7, The __all__ list is not
alphabetically sorted; update the module-level __all__ to an alphabetically
ordered sequence of export names (get_context, query_memory, save_memory) so
static analysis (RUF022) passes and readability improves; locate the __all__
assignment in examples/zo/tools/__init__.py and reorder the string entries
accordingly.
examples/zo/tests/test_basic.py (2)

54-69: Consider moving pytest import to module level.

pytest is imported inside test functions. While functional, moving it to the top with other imports is more idiomatic.

Proposed fix
 import sys
 import os
+
+import pytest
 
 # Add parent directory to path so tools/ can be imported
 sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))

Then remove the local imports from test_save_memory_raises_on_empty_content and test_query_memory_raises_on_empty_query.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@examples/zo/tests/test_basic.py` around lines 54 - 69, Move the pytest import
to module scope and remove the local imports inside the test functions: add
"import pytest" at the top of the tests file (examples/zo/tests/test_basic.py)
alongside other imports, then delete the in-function "import pytest" lines in
test_save_memory_raises_on_empty_content and
test_query_memory_raises_on_empty_query so the functions only call pytest.raises
and the tools.save_memory / tools.query_memory imports remain as-is.

7-8: Consider standard import ordering.

Per isort conventions, standard library imports should be sorted alphabetically. os should come before sys.

Proposed fix
-import sys
 import os
+import sys
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@examples/zo/tests/test_basic.py` around lines 7 - 8, The standard library
imports are not alphabetized: swap the two import statements so that os is
imported before sys (i.e., change "import sys\nimport os" to "import os\nimport
sys") to satisfy isort conventions and keep the import block for standard
libraries sorted.
examples/zo/SKILL.md (1)

19-27: Add blank lines around fenced code blocks.

Markdown lint (MD031) flags missing blank lines around code blocks. This improves readability and compatibility with some Markdown parsers.

Proposed fix
 2. Set environment variables:
+
    ```
    HONCHO_API_KEY=your-api-key
    HONCHO_WORKSPACE_ID=default   # optional, defaults to "default"
    ```
+
 3. Install dependencies:
+
    ```
    pip install honcho-ai python-dotenv
    ```
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@examples/zo/SKILL.md` around lines 19 - 27, Add blank lines before and after
each fenced code block in the SKILL.md snippet so the Markdown has an empty line
above the opening ``` and an empty line below the closing ```; specifically
update the environment variables block (the triple-backtick block containing
HONCHO_API_KEY/HONCHO_WORKSPACE_ID) and the dependencies block (the
triple-backtick block containing pip install honcho-ai python-dotenv) to include
a blank line separating the surrounding numbered list text and the fenced code
blocks.
examples/zo/tools/get_context.py (1)

5-5: Use explicit relative import for clarity.

The import from client import get_client relies on pythonpath=["."] in pyproject.toml. Consider using an explicit relative import for better clarity and to avoid confusion when the module is used in different contexts.

Proposed fix
-from client import get_client
+from .client import get_client

Note: This would require running from within the package context. Alternatively, keep the current import if the pythonpath configuration is intentional for Zo skill compatibility.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@examples/zo/tools/get_context.py` at line 5, Replace the top-level import in
examples/zo/tools/get_context.py that currently reads "from client import
get_client" with an explicit relative import referencing the local client module
(i.e., import the get_client symbol from the package-local client module) so the
module resolves correctly when run inside the package; update the import to use
the package-relative module path and verify get_client is referenced from that
import and that the module is executed in package context (run as a module)
after the change.
examples/zo/tests/test_tools.py (1)

1-18: Gate these as integration tests so default local runs fail less often.

Given Line 3-7 requires external server setup, add a marker/skip condition so developers can run unit tests without accidental network failures.

✅ Suggested gating snippet
 import sys
 import os
+import pytest
@@
+pytestmark = pytest.mark.skipif(
+    not os.getenv("HONCHO_API_KEY"),
+    reason="Integration tests require HONCHO_API_KEY and a running Honcho server",
+)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@examples/zo/tests/test_tools.py` around lines 1 - 18, Add a pytest gate so
these external-server tests are skipped by default: import pytest and set a
module-level pytestmark using pytest.mark.skipif checking an env var (e.g.,
RUN_INTEGRATION != "1") with a clear reason so local unit test runs won't
attempt the Honcho server; add this in the tests/test_tools.py module near the
top (next to existing imports) using the pytestmark symbol to control skipping.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@examples/zo/pyproject.toml`:
- Line 8: The dependency versions are inconsistent: update the dependency string
"honcho-ai>=2.1.0" to match the SKILL.md requirement "honcho-ai>=2.1.1" (or vice
versa if you prefer 2.1.0) so both sources use the same version; locate and
change the literal "honcho-ai>=2.1.0" in pyproject.toml (or update the SKILL.md
line containing "honcho-ai>=2.1.1") so the two files match exactly.
- Around line 21-22: The wheel build currently only packages the "tools" package
so the top-level module client.py won't be included and imports from tools that
reference client will fail; fix by either (A) adding the module to the hatch
wheel packages (e.g., ensure pyproject.toml's [tool.hatch.build.targets.wheel]
packages includes "client" or the correct hatch syntax for single-file modules)
or (B) move client.py into the tools package (rename to tools/client.py) and
update any imports that reference client.py to import from tools.client; update
pyproject.toml only if you choose option A.

In `@examples/zo/README.md`:
- Around line 122-134: Add blank lines before and after the fenced code blocks
inside the numbered list to satisfy markdownlint MD031: insert a blank line
before and after the directory-tree fenced block containing "Community/ └──
honcho-memory/ ├── SKILL.md ..." and likewise add a blank line before and after
the bash fenced block containing "bun validate"; update the README.md so each
fenced block is separated from the surrounding list items by an empty line (also
ensure a blank line follows each closing ``` fence).

In `@examples/zo/tests/test_tools.py`:
- Around line 25-174: Tests use hardcoded user_id/session_id values which cause
state leakage across runs; update all tests that call save_memory, query_memory,
and get_context (e.g., in TestQueryMemory, TestGetContext,
TestToolsWorkTogether) to generate unique IDs per test (for example append a
uuid4()/timestamp/random suffix or use a pytest fixture that returns unique
user/session IDs) and use those generated IDs for both save_memory and
subsequent query/get_context calls so each test runs in isolation and won’t be
affected by persistent Honcho storage.

In `@examples/zo/tools/save_memory.py`:
- Line 30: The code in save_memory.py hardcodes the assistant peer via
assistant_peer = honcho.peer("assistant"), which breaks role mapping when
get_context callers pass a different assistant_id; change save_memory to accept
or use the same assistant_id parameter as get_context (or propagate assistant_id
into save_memory) and construct the peer with honcho.peer(assistant_id) so the
to_openai() mapping correctly identifies assistant messages; update any callers
of save_memory to pass the assistant_id argument accordingly and ensure variable
names (assistant_peer, assistant_id) match across save_memory and get_context.

---

Nitpick comments:
In `@examples/zo/SKILL.md`:
- Around line 19-27: Add blank lines before and after each fenced code block in
the SKILL.md snippet so the Markdown has an empty line above the opening ``` and
an empty line below the closing ```; specifically update the environment
variables block (the triple-backtick block containing
HONCHO_API_KEY/HONCHO_WORKSPACE_ID) and the dependencies block (the
triple-backtick block containing pip install honcho-ai python-dotenv) to include
a blank line separating the surrounding numbered list text and the fenced code
blocks.

In `@examples/zo/tests/test_basic.py`:
- Around line 54-69: Move the pytest import to module scope and remove the local
imports inside the test functions: add "import pytest" at the top of the tests
file (examples/zo/tests/test_basic.py) alongside other imports, then delete the
in-function "import pytest" lines in test_save_memory_raises_on_empty_content
and test_query_memory_raises_on_empty_query so the functions only call
pytest.raises and the tools.save_memory / tools.query_memory imports remain
as-is.
- Around line 7-8: The standard library imports are not alphabetized: swap the
two import statements so that os is imported before sys (i.e., change "import
sys\nimport os" to "import os\nimport sys") to satisfy isort conventions and
keep the import block for standard libraries sorted.

In `@examples/zo/tests/test_tools.py`:
- Around line 1-18: Add a pytest gate so these external-server tests are skipped
by default: import pytest and set a module-level pytestmark using
pytest.mark.skipif checking an env var (e.g., RUN_INTEGRATION != "1") with a
clear reason so local unit test runs won't attempt the Honcho server; add this
in the tests/test_tools.py module near the top (next to existing imports) using
the pytestmark symbol to control skipping.

In `@examples/zo/tools/__init__.py`:
- Line 7: The __all__ list is not alphabetically sorted; update the module-level
__all__ to an alphabetically ordered sequence of export names (get_context,
query_memory, save_memory) so static analysis (RUF022) passes and readability
improves; locate the __all__ assignment in examples/zo/tools/__init__.py and
reorder the string entries accordingly.

In `@examples/zo/tools/get_context.py`:
- Line 5: Replace the top-level import in examples/zo/tools/get_context.py that
currently reads "from client import get_client" with an explicit relative import
referencing the local client module (i.e., import the get_client symbol from the
package-local client module) so the module resolves correctly when run inside
the package; update the import to use the package-relative module path and
verify get_client is referenced from that import and that the module is executed
in package context (run as a module) after the change.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 30112961-2d1b-46aa-9e96-ec863eaa147f

📥 Commits

Reviewing files that changed from the base of the PR and between e487358 and 00a4917.

⛔ Files ignored due to path filters (1)
  • examples/zo/uv.lock is excluded by !**/*.lock
📒 Files selected for processing (11)
  • .gitignore
  • examples/zo/README.md
  • examples/zo/SKILL.md
  • examples/zo/client.py
  • examples/zo/pyproject.toml
  • examples/zo/tests/test_basic.py
  • examples/zo/tests/test_tools.py
  • examples/zo/tools/__init__.py
  • examples/zo/tools/get_context.py
  • examples/zo/tools/query_memory.py
  • examples/zo/tools/save_memory.py

readme = "README.md"
requires-python = ">=3.9"
dependencies = [
"honcho-ai>=2.1.0",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Version inconsistency with SKILL.md.

pyproject.toml specifies honcho-ai>=2.1.0 but SKILL.md line 5 states the skill requires honcho-ai>=2.1.1. Align these versions to avoid confusion.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@examples/zo/pyproject.toml` at line 8, The dependency versions are
inconsistent: update the dependency string "honcho-ai>=2.1.0" to match the
SKILL.md requirement "honcho-ai>=2.1.1" (or vice versa if you prefer 2.1.0) so
both sources use the same version; locate and change the literal
"honcho-ai>=2.1.0" in pyproject.toml (or update the SKILL.md line containing
"honcho-ai>=2.1.1") so the two files match exactly.

Comment on lines +21 to +22
[tool.hatch.build.targets.wheel]
packages = ["tools"]
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

client.py is not included in the wheel package.

The wheel configuration only includes the tools directory. The client.py module at the package root won't be packaged, but the tools import from it. Either add client to the packages list or move client.py into the tools directory.

Option 1: Include client module in wheel
 [tool.hatch.build.targets.wheel]
-packages = ["tools"]
+packages = ["tools", "client.py"]

Note: Hatch may require a different syntax for single-file modules. Alternatively, restructure as shown in Option 2.

Option 2: Move client.py into tools/

Move client.py to tools/client.py and update imports in the tool files:

-from client import get_client
+from .client import get_client
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@examples/zo/pyproject.toml` around lines 21 - 22, The wheel build currently
only packages the "tools" package so the top-level module client.py won't be
included and imports from tools that reference client will fail; fix by either
(A) adding the module to the hatch wheel packages (e.g., ensure pyproject.toml's
[tool.hatch.build.targets.wheel] packages includes "client" or the correct hatch
syntax for single-file modules) or (B) move client.py into the tools package
(rename to tools/client.py) and update any imports that reference client.py to
import from tools.client; update pyproject.toml only if you choose option A.

Comment thread examples/zo/README.md
Comment thread examples/zo/tests/test_tools.py Outdated
Comment thread examples/zo/tools/save_memory.py Outdated
  - Fix version inconsistency: SKILL.md matches pyproject.toml (>=2.1.0)
  - Move client.py into tools/ package and use relative imports
  - Add assistant_id parameter to save_memory() for consistency with get_context()
  - Use UUID-based IDs in tests to prevent state leakage between runs
  - Add pytest.mark.skipif guard on integration tests (requires HONCHO_API_KEY)
  - Fix import ordering, move pytest to module level, sort __all__ alphabetically
  - Fix markdown blank lines around fenced code blocks (MD031)
  - Add rate limit delay fixture to avoid hitting Honcho free tier limits
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@examples/zo/tools/client.py`:
- Around line 24-25: Before constructing the Honcho client, explicitly validate
required env vars: read HONCHO_API_KEY with os.getenv and treat empty strings as
unset (e.g., key = os.getenv("HONCHO_API_KEY") and if not key: raise
ValueError("HONCHO_API_KEY is required")); similarly, compute resolved_workspace
by treating an empty workspace_id or an empty HONCHO_WORKSPACE_ID env value as
unset (e.g., env_ws = os.getenv("HONCHO_WORKSPACE_ID"); resolved_workspace =
workspace_id or env_ws or "default"). After these checks, pass
resolved_workspace to the Honcho(...) constructor.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 8d7b4991-be89-4347-abb9-e9a4d00cd52f

📥 Commits

Reviewing files that changed from the base of the PR and between 00a4917 and 6d06f55.

📒 Files selected for processing (9)
  • examples/zo/README.md
  • examples/zo/SKILL.md
  • examples/zo/tests/test_basic.py
  • examples/zo/tests/test_tools.py
  • examples/zo/tools/__init__.py
  • examples/zo/tools/client.py
  • examples/zo/tools/get_context.py
  • examples/zo/tools/query_memory.py
  • examples/zo/tools/save_memory.py
✅ Files skipped from review due to trivial changes (5)
  • examples/zo/tools/init.py
  • examples/zo/tools/get_context.py
  • examples/zo/README.md
  • examples/zo/SKILL.md
  • examples/zo/tests/test_tools.py
🚧 Files skipped from review as they are similar to previous changes (3)
  • examples/zo/tools/query_memory.py
  • examples/zo/tools/save_memory.py
  • examples/zo/tests/test_basic.py

Comment thread examples/zo/tools/client.py Outdated
@LubaKaper
Copy link
Copy Markdown
Contributor Author

Hi @ajspig! I've implemented the Honcho Memory Skill for Zo Computer as described in
#406.

What's included

  • SKILL.md following Zo's skill format (YAML frontmatter with name, description,
    compatibility, license, metadata)
  • Three tools: save_memory, query_memory, get_context
  • Full test suite — 15/15 passing against the Honcho cloud API
  • Setup documentation and Zo marketplace submission instructions in README.md

Question on acceptance criteria

The issue lists "Submitted to Zo skill hub/marketplace" as an acceptance
criterion. I have the submission ready — would you prefer I submit to the Zo Skills
Registry now, or wait until this PR is merged first?

Happy to do either — just want to make sure I'm doing it in the right order!

@vintrocode
Copy link
Copy Markdown
Collaborator

woah nice!

@LubaKaper
Copy link
Copy Markdown
Contributor Author

End-to-end testing in Zo Computer ✅

After the PR was submitted I tested the skill live inside Zo Computer by
creating the skill manually and running all three tools:

  • save_memory — stored a user message ✅
  • query_memory — correctly retrieved "The user enjoys hiking and mountains" ✅
  • get_context — returned correct OpenAI-format messages with both user and assistant
    roles ✅

Finding: cross-peer memory in shared workspaces

During testing I discovered that query_memory may return data from other
peers when the queried user has no stored memory. This appears to be
workspace-level Dialectic API behavior rather than a skill bug — the API
falls back to workspace context when a peer has no memory of their own.

I've documented this in the README with a note recommending unique
HONCHO_WORKSPACE_ID values per user group in production.

This may be worth a separate issue to discuss whether the Dialectic API
should return an empty response instead of falling back to workspace context.

cc @ajspig @VVoruganti @vintrocode

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

♻️ Duplicate comments (1)
examples/zo/README.md (1)

136-139: ⚠️ Potential issue | 🟡 Minor

Add a blank line after the fenced block to satisfy MD031.

The closing fence is immediately followed by the next list item. Add one empty line between them.

🛠️ Suggested lint fix
    ```bash
    bun validate
    ```
+
 4. **Submit a pull request** to the upstream registry repository.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@examples/zo/README.md` around lines 136 - 139, MD031 lint error: the closing
fenced code block (```bash) in README.md is immediately followed by the next
list item; insert a single blank line between the closing fence and the
subsequent list item to satisfy MD031. Edit the fenced block that starts with
"```bash" and ensure there is one empty line after the closing "```" before the
"4. **Submit a pull request**" list item.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@examples/zo/README.md`:
- Around line 72-80: The docs for query_memory currently list session_id as
`str` but the implementation uses `session_id: str | None = None`; update the
README table row for `session_id` to indicate it is optional/nullable (e.g.,
`str | None` or `Optional[str]`) and mention the default is None to match the
function signature in query_memory.
- Around line 57-67: Update the README entry for save_memory to match the actual
signature in examples/zo/tools/save_memory.py: add the optional assistant_id
parameter (default "assistant") to the function signature line and to the params
table, describing it as the assistant peer identifier used when
role="assistant"; ensure the table shows its type as `str` and notes the default
value and purpose so consumers know they can supply a custom assistant_id.

---

Duplicate comments:
In `@examples/zo/README.md`:
- Around line 136-139: MD031 lint error: the closing fenced code block (```bash)
in README.md is immediately followed by the next list item; insert a single
blank line between the closing fence and the subsequent list item to satisfy
MD031. Edit the fenced block that starts with "```bash" and ensure there is one
empty line after the closing "```" before the "4. **Submit a pull request**"
list item.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 67cf6814-9fd3-42e3-a057-8cfb5a1e2e3b

📥 Commits

Reviewing files that changed from the base of the PR and between 883bd3b and db0e84e.

📒 Files selected for processing (1)
  • examples/zo/README.md

Comment thread examples/zo/README.md Outdated
Comment thread examples/zo/README.md Outdated
@ajspig
Copy link
Copy Markdown
Contributor

ajspig commented Apr 6, 2026

@LubaKaper thanks for your work! Go ahead and post to Zo! Have a couple of nits but no need to block that getting published on Zo

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

♻️ Duplicate comments (1)
examples/zo/README.md (1)

126-133: ⚠️ Potential issue | 🟡 Minor

The directory tree is missing client.py.

The actual skill structure includes client.py (the Honcho client initialization helper), but it's not shown in the marketplace submission directory tree. This could mislead users preparing their submission package.

📁 Proposed fix
    ```
    Community/
    └── honcho-memory/
        ├── SKILL.md
        ├── README.md
+       ├── client.py
        ├── pyproject.toml
        └── tools/
    ```
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@examples/zo/README.md` around lines 126 - 133, The README's example directory
tree for the honcho-memory skill omits the required client.py file; update
examples/zo/README.md so the tree under honcho-memory includes "client.py"
(place it between README.md and pyproject.toml) to accurately reflect the actual
skill structure and avoid misleading submitters about the presence of the Honcho
client initialization helper (client.py).
🧹 Nitpick comments (1)
examples/zo/README.md (1)

81-81: Optional: Escape the pipe character in the type column to avoid markdown parser warnings.

The type str | None contains a pipe that triggers a markdownlint table column count warning. While the table renders correctly, you can silence the warning by escaping the pipe.

📝 Optional markdown fix
-| `session_id` | `str | None` | Optional: scope to a specific session. Defaults to `None` (global memory) |
+| `session_id` | `str \| None` | Optional: scope to a specific session. Defaults to `None` (global memory) |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@examples/zo/README.md` at line 81, The table row for the parameter session_id
shows the type as `str | None`, which triggers markdown table pipe warnings;
update the type cell used for session_id to escape the pipe character (e.g.,
change the type text to `str \| None` or otherwise escape the '|' inside the
code span) so the markdown linter no longer reports an extra column while
keeping the displayed text identical.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@examples/zo/README.md`:
- Around line 139-140: Add a blank line after the closing fenced code block (the
trailing ``` that ends the bash snippet) so that there is an empty line before
the next paragraph starting with "4. **Submit a pull request**"; edit the
README.md markdown to insert a single blank line between the code fence and that
step to satisfy MD031.

---

Duplicate comments:
In `@examples/zo/README.md`:
- Around line 126-133: The README's example directory tree for the honcho-memory
skill omits the required client.py file; update examples/zo/README.md so the
tree under honcho-memory includes "client.py" (place it between README.md and
pyproject.toml) to accurately reflect the actual skill structure and avoid
misleading submitters about the presence of the Honcho client initialization
helper (client.py).

---

Nitpick comments:
In `@examples/zo/README.md`:
- Line 81: The table row for the parameter session_id shows the type as `str |
None`, which triggers markdown table pipe warnings; update the type cell used
for session_id to escape the pipe character (e.g., change the type text to `str
\| None` or otherwise escape the '|' inside the code span) so the markdown
linter no longer reports an extra column while keeping the displayed text
identical.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 4d82155f-5ec2-41db-87fb-e8f5ac0dd295

📥 Commits

Reviewing files that changed from the base of the PR and between db0e84e and 3dcb5d6.

📒 Files selected for processing (1)
  • examples/zo/README.md

Comment thread examples/zo/README.md
@ajspig
Copy link
Copy Markdown
Contributor

ajspig commented Apr 6, 2026

I can see you're still making some changes. This PR looks good to me, and happy to merge it in unless you have more changes you'd like to make @LubaKaper

@LubaKaper
Copy link
Copy Markdown
Contributor Author

@ajspig Thank you so much! No more changes from my side , the CI failure looks like a pre-existing issue with secrets not being passed to fork PR workflows? so it's unrelated to this PR's changes? If so feel free to merge whenever you're ready! Once it's in, I'll move on to submitting the skill to the Zo marketplace.

@ajspig ajspig merged commit fa8f0b1 into plastic-labs:main Apr 6, 2026
2 of 4 checks passed
@ajspig
Copy link
Copy Markdown
Contributor

ajspig commented Apr 6, 2026

Merged! Feel free to submit the skill to the zo marketplace.

@LubaKaper
Copy link
Copy Markdown
Contributor Author

Done @ajspig! Just submitted it to the Zo marketplace: zocomputer/skills#61

jooray added a commit to jooray/honcho that referenced this pull request Apr 8, 2026
…embedding-dimensions

* origin/main:
  Self-hosting docs overhaul: single-provider default, restructured config guide (plastic-labs#510)
  docs: add Zo Computer integration page (plastic-labs#504)
  feat(examples): add Honcho memory skill for Zo Computer (plastic-labs#495)
ranc1 pushed a commit to ranc1/honcho that referenced this pull request Apr 16, 2026
…#495)

* chore: add .worktrees/ to .gitignore

* feat(examples): add Zo Computer memory skill integration

* feat(examples): add Zo Computer memory skill integration

* fix(examples): address CodeRabbit review on Zo skill integration

  - Fix version inconsistency: SKILL.md matches pyproject.toml (>=2.1.0)
  - Move client.py into tools/ package and use relative imports
  - Add assistant_id parameter to save_memory() for consistency with get_context()
  - Use UUID-based IDs in tests to prevent state leakage between runs
  - Add pytest.mark.skipif guard on integration tests (requires HONCHO_API_KEY)
  - Fix import ordering, move pytest to module level, sort __all__ alphabetically
  - Fix markdown blank lines around fenced code blocks (MD031)
  - Add rate limit delay fixture to avoid hitting Honcho free tier limits

* fix(examples): validate HONCHO_API_KEY early in client initialization

* docs(examples): note cross-peer memory behavior in shared workspaces

* docs(examples): fix save_memory and query_memory signatures in README

* docs(examples): fix markdown linting issues in README

* docs(examples): add assistant_id parameter to save_memory example in
  SKILL.md

---------

Co-authored-by: Luba Kaper <lubakaper@lubas-air.mynetworksettings.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] Create Honcho Memory Skill for Zo Computer

3 participants