### Run quick start example Source: https://github.com/major7apps/pensyve/blob/main/integrations/langchain-ts/README.md Execute the provided example agent script. ```bash cd integrations/langchain-ts bun run examples/pensyve-agent.ts ``` -------------------------------- ### Run Quick Start Example Source: https://github.com/major7apps/pensyve/blob/main/integrations/autogen/README.md Execute the provided AutoGen integration example. ```bash cd integrations/autogen python examples/pensyve_agent.py ``` -------------------------------- ### Run Quick Start Example Source: https://github.com/major7apps/pensyve/blob/main/integrations/langchain/README.md Execute the provided LangGraph ReAct agent example. ```bash cd integrations/langchain python examples/pensyve_agent.py ``` -------------------------------- ### Run Quick Start Example Source: https://github.com/major7apps/pensyve/blob/main/integrations/crewai/README.md Execute the provided example script to initialize a CrewAI agent with Pensyve tools. ```bash cd integrations/crewai python examples/pensyve_crew.py ``` -------------------------------- ### Install Pensyve Go SDK Source: https://github.com/major7apps/pensyve/blob/main/pensyve-go/README.md Use `go get` to install the latest version of the Pensyve Go SDK. ```bash go get github.com/major7apps/pensyve/pensyve-go@latest ``` -------------------------------- ### First-Time Python Setup Source: https://github.com/major7apps/pensyve/blob/main/README.md Install dependencies and build the native Python module. This must be done before importing or running any Python code related to Pensyve. ```bash # Install dependencies (creates .venv automatically) uv sync --extra dev ``` ```bash # Build the native Python module (required before running any Python code) uv run maturin develop --release -m pensyve-python/Cargo.toml ``` ```bash # Verify the module loads uv run python -c "import pensyve; print(pensyve.__version__)" ``` -------------------------------- ### Run Pensyve ADK Example Source: https://github.com/major7apps/pensyve/blob/main/integrations/google-adk/README.md Navigate to the integrations directory and run the example Python script to start a Pensyve-integrated ADK agent. ```bash cd integrations/google-adk python examples/pensyve_agent.py ``` -------------------------------- ### Install dependencies Source: https://github.com/major7apps/pensyve/blob/main/integrations/langchain-ts/README.md Install the required LangChain and Pensyve packages using bun. ```bash bun add @langchain/anthropic @langchain/langgraph @langchain/mcp-adapters # Memory store backend (optional — separate from the substrate) bun add @pensyve/langchain ``` -------------------------------- ### Python Environment Setup Source: https://github.com/major7apps/pensyve/blob/main/AGENTS.md Sets up the Python development environment using 'uv' and installs the project in editable mode with Maturin. ```bash uv sync --extra dev && uv run maturin develop --manifest-path pensyve-python/Cargo.toml ``` -------------------------------- ### Example Output for `pensyve_episode_start` Source: https://github.com/major7apps/pensyve/blob/main/pensyve-mcp/README.md This is an example of the output returned by `pensyve_episode_start`, including the generated `episode_id` and `started_at` timestamp. ```json { "episode_id": "d1e2f3...", "participants": ["alice", "assistant"], "started_at": "2026-03-23T10:00:00Z" } ``` -------------------------------- ### Install Native Plugin Source: https://github.com/major7apps/pensyve/blob/main/integrations/opencode-plugin/README.md Install the native plugin via file system copy or npm, then register it in opencode.json. ```bash # Project-level cp -r /path/to/pensyve/integrations/opencode-plugin .opencode/plugins/pensyve # Or user-level (applies to all projects) cp -r /path/to/pensyve/integrations/opencode-plugin ~/.config/opencode/plugins/pensyve ``` ```bash npm install opencode-pensyve ``` ```json { "plugin": ["opencode-pensyve"] } ``` -------------------------------- ### Install Pensyve SDKs Source: https://github.com/major7apps/pensyve/blob/main/pensyve-python/README.md Install the Pensyve SDK for your preferred language using the respective package manager. ```bash pip install pensyve # Python (PyPI) ``` ```bash npm install pensyve # TypeScript (npm) ``` ```bash go get github.com/major7apps/pensyve/pensyve-go@latest # Go ``` -------------------------------- ### Build and Install Pensyve MCP Source: https://github.com/major7apps/pensyve/blob/main/pensyve-mcp/README.md Commands to compile the server from source or install it to the system PATH. ```bash # From the workspace root cargo build --release -p pensyve-mcp # The binary lands at: ./target/release/pensyve-mcp ``` ```bash cargo install --path pensyve-mcp ``` -------------------------------- ### Run Pensyve Pydantic AI Example Source: https://github.com/major7apps/pensyve/blob/main/integrations/pydantic-ai/README.md Navigate to the integration directory and run the example script to see Pensyve agent in action. ```bash cd integrations/pydantic-ai python examples/pensyve_agent.py ``` -------------------------------- ### Install Pensyve SDK Source: https://github.com/major7apps/pensyve/blob/main/pensyve-ts/README.md Install the Pensyve SDK using npm or bun. Ensure you have Node.js 18+ or Bun 1.0+. ```bash npm install @pensyve/sdk # or bun add @pensyve/sdk ``` -------------------------------- ### Install Dependencies Source: https://github.com/major7apps/pensyve/blob/main/integrations/autogen/README.md Install the required AutoGen packages. ```bash pip install autogen-agentchat autogen-ext[mcp] ``` -------------------------------- ### Install Instructions File Source: https://github.com/major7apps/pensyve/blob/main/integrations/opencode-plugin/README.md Copy the AGENTS.md file to the project root to enable memory reflex rules. ```bash cp /path/to/pensyve/integrations/opencode-plugin/AGENTS.md . ``` -------------------------------- ### Install Development Dependencies Source: https://github.com/major7apps/pensyve/blob/main/pensyve-python/README.md Installs all necessary development dependencies for the project, automatically creating a virtual environment. ```bash uv sync --extra dev ``` -------------------------------- ### Install Pensyve Dependencies Source: https://github.com/major7apps/pensyve/blob/main/integrations/langchain/README.md Install the required LangChain adapters and the optional Pensyve memory store backend. ```bash pip install langchain-anthropic langchain-mcp-adapters langgraph # Memory store backend (optional — separate from the substrate) pip install pensyve-langchain ``` -------------------------------- ### Install Google ADK Source: https://github.com/major7apps/pensyve/blob/main/integrations/google-adk/README.md Install the Google ADK library using pip. Ensure you have Python and pip installed. ```bash pip install google-adk ``` -------------------------------- ### Install Steering Files Source: https://github.com/major7apps/pensyve/blob/main/integrations/kiro/README.md Commands to create the steering directory and copy the necessary markdown files for Kiro integration. ```bash mkdir -p .kiro/steering cp /path/to/pensyve/integrations/kiro/.kiro/steering/*.md .kiro/steering/ ``` -------------------------------- ### Build and Start Pensyve MCP Gateway Source: https://github.com/major7apps/pensyve/blob/main/docs/GETTING_STARTED.md Build the release version of the Rust/Axum gateway and start it. It listens on port 3000 by default. ```bash cargo build --release --bin pensyve-mcp-gateway ./target/release/pensyve-mcp-gateway # listens on 0.0.0.0:3000 ``` -------------------------------- ### Manual MCP Setup for Pensyve Source: https://github.com/major7apps/pensyve/blob/main/integrations/README.md Use these configuration details for manual MCP setup in any tool that supports it. Ensure you have a valid Pensyve API key. ```bash # Endpoint https://mcp.pensyve.com/mcp # Auth PENSYVE_API_KEY=psy_your_key ``` -------------------------------- ### Install Pensyve Python SDK Source: https://github.com/major7apps/pensyve/blob/main/docs/GETTING_STARTED.md Install the Python SDK using pip. This is the first step to using Pensyve in your Python applications. ```bash pip install pensyve ``` -------------------------------- ### Pensyve Command Examples Source: https://github.com/major7apps/pensyve/blob/main/integrations/codex-plugin/commands/pensyve.md Examples demonstrating how to use the /pensyve command for various memory operations. These map to the underlying MCP commands. ```text /pensyve recall decisions about release workflow ``` ```text /pensyve remember that npm provenance needs id-token: write ``` ```text /pensyve status ``` ```text /pensyve mention help ``` ```text @pensyve recall Codex plugin install decisions ``` -------------------------------- ### Install Pensyve Gemini Extension from GitHub Source: https://github.com/major7apps/pensyve/blob/main/integrations/gemini-extension/README.md Use this command to install the Pensyve extension for Gemini CLI directly from its GitHub repository. ```bash gemini extensions install github:major7apps/pensyve --path integrations/gemini-extension ``` -------------------------------- ### Start Pensyve Server Source: https://github.com/major7apps/pensyve/blob/main/integrations/vscode/README.md Navigate to the directory containing the Pensyve REST API server to initiate the service. ```bash cd /path/to/pensyve ``` -------------------------------- ### Install Pensyve for Python, TypeScript, and Go Source: https://github.com/major7apps/pensyve/blob/main/README.md Install the Pensyve SDK using package managers for Python (pip), TypeScript (npm), or Go. ```bash pip install pensyve # Python (PyPI) ``` ```bash npm install @pensyve/sdk # TypeScript (npm) ``` ```bash go get github.com/major7apps/pensyve/pensyve-go@latest # Go ``` -------------------------------- ### Add Pensyve Plugin Marketplace and Install Source: https://github.com/major7apps/pensyve/blob/main/integrations/codex-plugin/README.md Add the Pensyve marketplace and install the plugin for Codex. For local development, provide the path to your Pensyve checkout. ```bash codex plugin marketplace add major7apps/pensyve codex plugin add pensyve@pensyve-codex ``` ```bash codex plugin marketplace add /path/to/pensyve/integrations/codex-plugin codex plugin add pensyve@pensyve-codex ``` -------------------------------- ### Example Pensyve Commands Source: https://github.com/major7apps/pensyve/blob/main/integrations/codex-plugin/docs/ARCHITECTURE.md Illustrates common user interactions with the Pensyve plugin within Codex. ```text $pensyve what do you remember about this repo? ``` ```text /pensyve remember that release publish needs npm provenance permissions ``` ```text @pensyve recall Codex plugin install decisions ``` ```text /pensyve status ``` -------------------------------- ### Quick Start Go SDK Source: https://github.com/major7apps/pensyve/blob/main/docs/GETTING_STARTED.md Initialize the Pensyve client and use Remember and Recall functions. Configure with BaseURL for local or cloud deployment. ```go package main import ( "context" "fmt" "log" pensyve "github.com/major7apps/pensyve/pensyve-go" ) func main() { client := pensyve.NewClient(pensyve.Config{ BaseURL: "http://localhost:3000", // Or Pensyve Cloud: // BaseURL: "https://api.pensyve.com", // APIKey: "psy_your_key", }) ctx := context.Background() // Remember _, err := client.Remember(ctx, "user", "Prefers Go and dark mode", 0.9) if err != nil { log.Fatal(err) } // Recall memories, err := client.Recall(ctx, "What does the user prefer?", nil) if err != nil { log.Fatal(err) } for _, m := range memories { fmt.Printf("[%.2f] %s\n", m.Confidence, m.Content) } } ``` -------------------------------- ### Codex Plugin Installation and Configuration Source: https://github.com/major7apps/pensyve/blob/main/README.md Instructions for installing and configuring the Pensyve plugin for OpenAI Codex, including API key setup and usage of commands and skills. ```APIDOC ## Codex Plugin ### Description First-class working memory for OpenAI Codex with a plugin manifest, bundled MCP server config, hooks, skills, `/pensyve`, and `$pensyve` skill invocation. ### Installation Add this repo as a Codex plugin marketplace, then install Pensyve: ```bash codex plugin marketplace add major7apps/pensyve codex plugin add pensyve@pensyve-codex ``` For local development from a checkout, use `codex plugin marketplace add /path/to/pensyve/integrations/codex-plugin` instead. ### API Key Setup Set your API key for the bundled MCP server: ```bash export PENSYVE_API_KEY="psy_your_key_here" ``` ### Usage The plugin bundles `integrations/codex-plugin/.mcp.json`, so Codex can load the Pensyve MCP server without copying a project config file. Use `/skills`, `$pensyve`, or `/pensyve` for explicit memory work, or let the bundled hooks and instructions prompt Codex to recall before substantive project decisions. `@pensyve` is documented as a text-level compatibility convention; true native Codex @-mention dispatch still needs platform support. See [`integrations/codex-plugin/README.md`](integrations/codex-plugin/README.md) for the manual fallback and local-stdio setup. ``` -------------------------------- ### Initialize and Use Pensyve Go SDK Source: https://github.com/major7apps/pensyve/blob/main/README.md Initialize the Pensyve Go SDK with a base URL and demonstrate remembering and recalling facts using a background context. ```go import pensyve "github.com/major7apps/pensyve/pensyve-go" client := pensyve.NewClient(pensyve.Config{BaseURL: "http://localhost:3000"}) ctx := context.Background() client.Remember(ctx, "seth", "Likes Go", 0.9) memories, _ := client.Recall(ctx, "programming", nil) ``` -------------------------------- ### Quick Start: Pensyve Go SDK Usage Source: https://github.com/major7apps/pensyve/blob/main/pensyve-go/README.md Initialize the client, remember facts, recall memories, and manage conversation episodes using the Pensyve Go SDK. ```go package main import ( "context" "fmt" "log" pensyve "github.com/major7apps/pensyve/pensyve-go" ) func main() { client := pensyve.NewClient(pensyve.Config{ BaseURL: "http://localhost:8000", // Or use Pensyve Cloud: // BaseURL: "https://api.pensyve.com", // APIKey: "psy_...", }) ctx := context.Background() // Remember a fact _, err := client.Remember(ctx, "user", "Prefers Go and dark mode", 0.9) if err != nil { log.Fatal(err) } // Recall relevant memories memories, err := client.Recall(ctx, "What does the user prefer?", nil) if err != nil { log.Fatal(err) } for _, m := range memories { fmt.Printf("[%.2f] %s\n", m.Confidence, m.Content) } // Track a conversation episode episode, _ := client.StartEpisode(ctx, []string{"user", "assistant"}) // ... your agent logic ... _ = episode.End(ctx, "Discussed deployment strategy") } ``` -------------------------------- ### Install Dependencies Source: https://github.com/major7apps/pensyve/blob/main/integrations/crewai/README.md Install the required packages for CrewAI and Pensyve integration. ```bash pip install crewai crewai-tools langchain-anthropic ``` -------------------------------- ### Install Pensyve LangChain/LangGraph Source: https://github.com/major7apps/pensyve/blob/main/docs/GETTING_STARTED.md Install the Pensyve LangChain integration using pip. ```bash pip install pensyve-langchain ``` -------------------------------- ### Install Pensyve AutoGen Source: https://github.com/major7apps/pensyve/blob/main/docs/GETTING_STARTED.md Install the AutoGen integration package for Pensyve using pip. ```bash pip install pensyve-autogen ``` -------------------------------- ### Go SDK Client Initialization and Usage Source: https://github.com/major7apps/pensyve/blob/main/llms.txt Create a new Pensyve client with configuration, remember a user preference, and recall memories. Requires 'pensyve-go' package. ```go import pensyve "github.com/major7apps/pensyve/pensyve-go" client := pensyve.NewClient(pensyve.Config{BaseURL: "http://localhost:3000", APIKey: "psy_..."}) client.Remember(ctx, "user", "Prefers Go", 0.9) memories, _ := client.Recall(ctx, "preferences", nil) ``` -------------------------------- ### Initialize Pensyve Go SDK Client Source: https://github.com/major7apps/pensyve/blob/main/pensyve-python/README.md Create a new Pensyve client using the provided configuration, including the base URL. This client is context-aware and handles structured errors. ```go import pensyve "github.com/major7apps/pensyve/pensyve-go" client := pensyve.NewClient(pensyve.Config{BaseURL: "http://localhost:3000"}) ``` -------------------------------- ### Combined Provenance Tag Example Source: https://github.com/major7apps/pensyve/blob/main/integrations/codex-plugin/AGENTS.md When a capture is both procedural and in-flight, combine the tags as shown in the example. ```text [procedural] [proactive/in-flight/tier-1] trigger=..., action=..., outcome=... ``` -------------------------------- ### Build Pensyve Python SDK from Source Source: https://github.com/major7apps/pensyve/blob/main/pensyve-python/README.md Set up a Python environment with uv, install dependencies, and build the Python SDK by compiling the Rust core. ```bash git clone https://github.com/major7apps/pensyve.git && cd pensyve # Set up Python environment and install deps uv sync --extra dev # Build the Python SDK (compiles Rust → native Python module) uv run maturin develop --release -m pensyve-python/Cargo.toml # Verify uv run python -c "import pensyve; print(pensyve.__version__)" ``` -------------------------------- ### Configure ADK Agent with Pensyve Substrate Source: https://github.com/major7apps/pensyve/blob/main/integrations/google-adk/README.md Load the Pensyve substrate prompt and initialize the MCPToolset with connection parameters. Then, create an LlmAgent with the substrate instruction and the Pensyve toolset. ```python from pathlib import Path from google.adk.agents import LlmAgent from google.adk.tools.mcp_tool.mcp_toolset import MCPToolset, StreamableHTTPConnectionParams import os substrate = Path("SUBSTRATE_PROMPT.md").read_text() pensyve_toolset = MCPToolset( connection_params=StreamableHTTPConnectionParams( url="https://mcp.pensyve.com/mcp", headers={"Authorization": f"Bearer {os.environ['PENSYVE_API_KEY']}"}, ) ) agent = LlmAgent( name="pensyve_agent", model="gemini-2.0-flash", instruction=substrate, tools=[pensyve_toolset], ) ``` -------------------------------- ### Example Output for `pensyve_episode_end` Source: https://github.com/major7apps/pensyve/blob/main/pensyve-mcp/README.md This is an example of the output returned by `pensyve_episode_end`, showing the `episode_id`, `memories_created` count, and `outcome`. ```json { "episode_id": "d1e2f3...", "memories_created": 0, "outcome": "success", "ended_at": "2026-03-23T10:45:00Z" } ``` -------------------------------- ### Quick Start LangChain/LangGraph Source: https://github.com/major7apps/pensyve/blob/main/docs/GETTING_STARTED.md Initialize PensyveStore and use its put and search methods. It auto-detects local or cloud based on the PENSYVE_API_KEY environment variable. ```python from pensyve_langchain import PensyveStore store = PensyveStore() # Store store.put(("user_123", "memories"), "pref-1", {"text": "likes dark mode"}) # Search items = store.search(("user_123", "memories"), query="color preferences") # Use with LangGraph graph = builder.compile(store=store) ``` -------------------------------- ### Initialize and Compile Pensyve Extension Source: https://github.com/major7apps/pensyve/blob/main/integrations/vscode/README.md Use these commands to prepare the development environment and build the extension from source. ```bash cd pensyve-vscode npm install npm run compile # Press F5 in VS Code to launch Extension Development Host ``` -------------------------------- ### Example Output for `pensyve_forget` Source: https://github.com/major7apps/pensyve/blob/main/pensyve-mcp/README.md This is an example of the output returned by `pensyve_forget` when an entity is found, including the `entity`, `entity_id`, and `forgotten_count`. ```json { "entity": "alice", "entity_id": "abc123...", "forgotten_count": 12 } ``` -------------------------------- ### Install Pensyve Plugin Source: https://github.com/major7apps/pensyve/blob/main/integrations/claude-code/README.md Use these commands to add the Pensyve marketplace, install the plugin, and reload your Claude Code plugins. ```bash /plugin marketplace add major7apps/pensyve /plugin install pensyve@major7apps-pensyve /reload-plugins ``` -------------------------------- ### Install Continue Rules Source: https://github.com/major7apps/pensyve/blob/main/integrations/continue/README.md Copy the Pensyve rule files into the Continue project's .continue/rules/ directory. Continue automatically loads rules from this directory. ```bash mkdir -p .continue/rules cp /path/to/pensyve/integrations/continue/.continue/rules/*.md .continue/rules/ ``` -------------------------------- ### Quick Start with Pensyve Memory in AutoGen Source: https://github.com/major7apps/pensyve/blob/main/docs/GETTING_STARTED.md Demonstrates how to initialize and use PensyveMemory with an AutoGen AssistantAgent. Requires importing necessary classes. ```python from pensyve_autogen import PensyveMemory, MemoryContent, MemoryMimeType memory = PensyveMemory(namespace="my-team", entity="assistant") # Store await memory.add(MemoryContent( content="User prefers TypeScript", mime_type=MemoryMimeType.TEXT, )) # Query result = await memory.query("language preferences") # Use with AutoGen agent agent = AssistantAgent( name="assistant", model_client=OpenAIChatCompletionClient(model="gpt-4o"), memory=[memory], ) ``` -------------------------------- ### Pensyve 5-Line Demo Source: https://github.com/major7apps/pensyve/blob/main/pensyve-python/README.md A concise demonstration of initializing Pensyve, recording a user preference within an episode, and recalling that information. ```python import pensyve p = pensyve.Pensyve() with p.episode(p.entity("agent", kind="agent"), p.entity("user")) as ep: ep.message("user", "I prefer dark mode and use vim keybindings") print(p.recall("what editor setup does the user prefer?")) ``` -------------------------------- ### Quick Start with Pensyve Python SDK Source: https://github.com/major7apps/pensyve/blob/main/docs/GETTING_STARTED.md Initialize the Pensyve client, remember facts with confidence, recall memories based on queries, and track conversations using episodes. Consolidate memories to promote facts and decay stale ones. ```python import pensyve p = pensyve.Pensyve(namespace="my-agent") entity = p.entity("user", kind="user") # Remember a fact p.remember(entity=entity, fact="User prefers Python", confidence=0.95) # Recall memories results = p.recall("programming language", entity=entity) for r in results: print(f"[{r.score:.2f}] {r.content}") # Track a conversation with p.episode(entity) as ep: ep.message("user", "Can you fix the login bug?") ep.message("agent", "Fixed — session token was expiring early") ep.outcome("success") # Consolidate (promote repeated facts, decay stale memories) p.consolidate() ``` -------------------------------- ### Configure Pensyve Local Server (Lua) Source: https://github.com/major7apps/pensyve/blob/main/integrations/neovim/README.md Configure MCPHub.nvim for local Pensyve execution. This requires building the `pensyve-mcp` binary from source. ```lua require("mcphub").setup({ servers = { pensyve = { command = "pensyve-mcp", args = { "--stdio" }, env = { PENSYVE_PATH = "~/.pensyve/", PENSYVE_NAMESPACE = "default", }, }, }, }) ``` -------------------------------- ### Install Pydantic AI Source: https://github.com/major7apps/pensyve/blob/main/integrations/pydantic-ai/README.md Install the pydantic-ai library using pip. Ensure you have a Pydantic AI API key set as an environment variable. ```bash pip install pydantic-ai ``` ```bash export PENSYVE_API_KEY="psy_your_key_here" ``` -------------------------------- ### Example Output for `pensyve_inspect` Source: https://github.com/major7apps/pensyve/blob/main/pensyve-mcp/README.md This is an example of the output returned by `pensyve_inspect` when memories are found for an entity, detailing the `entity`, `entity_id`, `memory_count`, and a list of `memories`. ```json { "entity": "alice", "entity_id": "abc123...", "memory_count": 2, "memories": [ { "_type": "semantic", "id": "7c4d2f...", "predicate": "prefers", "object": "TypeScript over JavaScript", "confidence": 0.95, "created_at": "2026-03-23T10:00:00Z" }, { "_type": "semantic", "id": "9a1b3c...", "predicate": "works", "object": "on the Pensyve project", "confidence": 1.0, "created_at": "2026-03-22T08:15:00Z" } ] } ``` -------------------------------- ### Install Claude Code Plugin Source: https://github.com/major7apps/pensyve/blob/main/README.md Commands to install the Pensyve plugin for Claude Code from the marketplace. Ensure you have the necessary permissions and that the plugin marketplace is accessible. ```bash /plugin marketplace add major7apps/pensyve /plugin install pensyve@major7apps-pensyve /reload-plugins ``` -------------------------------- ### Add Pensyve Codex Plugin Marketplace Source: https://github.com/major7apps/pensyve/blob/main/docs/GETTING_STARTED.md Add the upstream repository as a Codex marketplace to install the Pensyve plugin. This is the first step for cloud-based installations. ```bash codex plugin marketplace add major7apps/pensyve codex plugin add pensyve@pensyve-codex ``` -------------------------------- ### Run Pensyve MCP Gateway Locally Source: https://github.com/major7apps/pensyve/blob/main/pensyve-mcp-gateway/README.md Use this command to start the gateway in standalone mode. Ensure you set the `PENSYVE_API_KEYS` environment variable with your development key. Clients can then connect to `http://localhost:3000/mcp`. ```bash PENSYVE_API_KEYS=psy_dev_key cargo run -p pensyve-mcp-gateway ``` -------------------------------- ### Load Substrate Prompt Source: https://github.com/major7apps/pensyve/blob/main/integrations/langchain/README.md Read the substrate prompt file and inject it into the LangGraph agent. ```python from pathlib import Path from langgraph.prebuilt import create_react_agent substrate = Path("SUBSTRATE_PROMPT.md").read_text() agent = create_react_agent(llm, tools, prompt=substrate) ``` -------------------------------- ### Starting a New Episode Source: https://github.com/major7apps/pensyve/blob/main/integrations/jetbrains/instructions/memory-reflex.md If no working `episode_id` is tracked, start a new episode using `pensyve_episode_start` with the participants. Record the returned `episode_id` for subsequent observations. ```python pensyve_episode_start(participants: ["jetbrains", ""]) ``` -------------------------------- ### Configure Pensyve Local (Self-Hosted) Source: https://github.com/major7apps/pensyve/blob/main/integrations/claude-code/README.md Build the pensyve-mcp binary and configure the MCP server in your settings.json to use the local command with stdio arguments. No API key is needed as data stays on your machine. ```bash git clone https://github.com/major7apps/pensyve cd pensyve cargo build --release -p pensyve-mcp # Copy target/release/pensyve-mcp into your PATH ``` ```json { "mcpServers": { "pensyve": { "command": "pensyve-mcp", "args": ["--stdio"] } } } ``` -------------------------------- ### Get Gateway Statistics via REST API Source: https://github.com/major7apps/pensyve/blob/main/docs/GETTING_STARTED.md Use `curl` to send a GET request to the `/v1/stats` endpoint to retrieve memory statistics from the gateway. ```bash # Stats curl http://localhost:3000/v1/stats ```