Skip to content

x402agent/SolanaOS / .agents/skills/honcho-integration

honcho-integration

Verified

Integrate Honcho memory and social cognition into existing Python or TypeScript codebases. Use when adding Honcho SDK, setting up peers, configuring sessions, implementing the dialectic chat endpoint for AI agents, or wiring Honcho into bot frameworks (nanobot, openclaw, picoclaw, etc).

references/bot-frameworks/nanobot/honcho_tool.py

View on GitHub
"""Honcho tool for querying user context."""

from typing import Any

from nanobot.agent.tools.base import Tool


class HonchoTool(Tool):
    """
    Tool for querying Honcho's AI-native memory.

    Allows the agent to retrieve relevant context about users
    based on their history and learned preferences.
    """

    def __init__(self, session_manager: "HonchoSessionManager"):
        """
        Initialize the Honcho tool.

        Args:
            session_manager: The HonchoSessionManager instance.
        """
        self._session_manager = session_manager
        self._current_session_key: str | None = None

    @property
    def name(self) -> str:
        return "query_user_context"

    @property
    def description(self) -> str:
        return (
            "Query Honcho to retrieve relevant context about the user based on their "
            "history and preferences. Use this when you need to understand the user's "
            "background, preferences, past interactions, or goals. This helps you "
            "personalize your responses and provide more relevant assistance."
        )

    @property
    def parameters(self) -> dict[str, Any]:
        return {
            "type": "object",
            "properties": {
                "query": {
                    "type": "string",
                    "description": (
                        "A natural language question about the user. Examples: "
                        "'What are this user's main goals?', "
                        "'What communication style does this user prefer?', "
                        "'What topics has this user discussed recently?', "
                        "'What is this user's technical expertise level?'"
                    ),
                }
            },
            "required": ["query"],
        }

    def set_context(self, session_key: str) -> None:
        """
        Set the current session context.

        Args:
            session_key: The session key (channel:chat_id).
        """
        self._current_session_key = session_key

    async def execute(self, query: str) -> str:
        """
        Execute the Honcho context query.

        Args:
            query: Natural language question about the user.

        Returns:
            Honcho's response about the user.
        """
        if not self._current_session_key:
            return "Error: No session context set. Unable to query user information."

        try:
            result = self._session_manager.get_user_context(
                self._current_session_key, query
            )
            return result
        except Exception as e:
            return f"Error querying user context: {str(e)}"
reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis.Stars: 471kUpdated Claude CodeCodexVerifiedInstall
diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness.Stars: 322kUpdated Claude CodeCodexVerifiedInstall
dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependenciesStars: 322kUpdated Claude CodeCodexVerifiedInstall
executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is availableStars: 322kUpdated Claude CodeCodexVerifiedInstall