Integrations

Ten lines to give an agent verifiable memory

Every recipe uses the same four tools: p7_remember, p7_recall, p7_attest and p7_evidence. Recalled claims come back with their trust status and injection warnings, and the tool descriptions tell the model to treat them as data.

Install first: pip install "ostivane[mcp]", then ostivane init and ostivane key-new agent --vouch-by root. For a hosted workspace use ostivane agent init and add --cloud / P7_MODE=cloud.

Claude Desktop

Add to claude_desktop_config.json and restart the app.

{
  "mcpServers": {
    "ostivane": {
      "command": "ostivane",
      "args": ["mcp"],
      "env": { "OSTIVANE_HOME": "/Users/you/.present-day", "P7_IDENTITY": "agent" }
    }
  }
}

Cursor

Create .cursor/mcp.json in the project (or the global file) with the same block. For a hosted workspace use "args": ["mcp", "--cloud"].

LangChain / LangGraph: check every tool call

Your tools stay as they are. guard_tools checks each call before it runs and records it; a refused call returns a refusal to the model instead of running, and the refused attempt is recorded. Output of the tools named in untrusted counts as outside content: if it tries to give the agent orders, the session is marked untrusted and risky calls after it are refused. The callback handler only records (model calls, retrievals); it never stops the run.

pip install "ostivane[langchain]"

from ostivane.recorder import AgentRecorder
from ostivane.integrations.soc_langchain import guard_tools, SocCallbackHandler

rec = AgentRecorder("https://your-host", os.environ["P7_API_KEY"], "WORKSPACE_ID", agent="support-bot")
tools = guard_tools(tools, rec, untrusted={"web_search"})
agent = create_react_agent(model, tools)
agent.invoke(inputs, config={"callbacks": [SocCallbackHandler(rec)]})

A call rated review is refused by default; pass on_review="ask" to wait for a person in the cabinet instead, or "allow" to let it run and only record it.

LangChain / LangGraph: memory tools

from ostivane.integrations import Memory
from ostivane.integrations.langchain import tools     # pip install "ostivane[langchain]"

agent = create_react_agent(model, tools(Memory.from_env()))

LlamaIndex

from ostivane.integrations import Memory
from ostivane.integrations.llamaindex import tools    # pip install "ostivane[llamaindex]"

agent = FunctionAgent(tools=tools(Memory.from_env()), llm=llm)

OpenAI Agents SDK

from agents import Agent
from ostivane.integrations import Memory
from ostivane.integrations.openai_agents import tools # pip install "ostivane[openai-agents]"

agent = Agent(name="support", tools=tools(Memory.from_env()))

Go

The agent SOC client for Go: standard library only, safe for concurrent use. Guard returns *ostivane.ActionBlocked when an action must not run, and the refused attempt is recorded.

go get github.com/WaiperOK/present-day/clients/go/ostivane

rec, err := ostivane.New(ostivane.Config{URL: url, Token: os.Getenv("P7_API_KEY"), Workspace: ws, Agent: "support-bot"})
defer rec.Close(ctx)
if err := rec.Guard(ctx, "bash", cmd, ""); err != nil {
    return err
}
page, err := rec.Tool(ctx, "web_fetch", u, true, fetch)   // untrusted: orders in it taint the session

JavaScript / TypeScript

Zero dependencies, Node 20+, Deno, Bun and browsers. Typings are included. Signing happens on your side; the server only sees signed entries.

import { CloudClient, Identity, verifyEvidence } from "ostivane";

const identity = await Identity.generate();
const p7 = new CloudClient({ url, token, workspace, identity });
await p7.register("js-agent");                       // an admin vouches for the key once
const claim = await p7.claim("shop", "refund_window_days", "30");
const proof = await p7.evidence("shop", "refund_window_days");
console.log((await verifyEvidence(proof, { anchor: rootKeyId })).ok);

Plain HTTP

See the API reference. Entries are canonical JSON signed with Ed25519, so any language with an Ed25519 library can write to a workspace.