Skip to main content

Provenance-first memory core for long-running agents.

Project description

Vexic

Memory your agents can trust.

PyPI License: Apache 2.0 CI Python 3.13+

Vexic is a local-first memory core for long-running AI agents. It stores cleaned conversation history, stages candidate memories for review, and promotes durable facts — every one traceable to the messages it came from.

Status: v0.1.1 — initial public release. The current package is a Python 3.13 core with a SQLite reference service, public contract models, retrieval primitives, and conformance tests. It runs entirely on your machine: it reads and writes a local database and never exfiltrates data.

Local MCP works today. A hosted service is coming — see vexic.dev to learn more and join the waitlist. Hosted surfaces in this repository are internal-alpha adapter code, not a public service contract.

Install

pip install vexic

Or with uv:

uv add vexic

Quick Start

Installing the package puts the vexic command on your PATH. Run the local read-only MCP server against a Vexic database:

# POSIX shells (bash/zsh)
vexic mcp-stdio --db-path ./memory.db --tenant-id local --session-id default
# PowerShell
vexic mcp-stdio --db-path .\memory.db --tenant-id local --session-id default

The server exposes two read-only tools to the agent: recall_conversation_history (this session's transcript) and recall_user_memory (durable facts and preferences). recall_user_memory embeds the query locally; install the optional extra with pip install "vexic[local-embed]" to enable it. See docs/usage.md for MCP client setup, the transcript recorder, and smoke-test examples.

From a source checkout (no install), run the same server through uv:

uv run python scripts/vexic-mcp-stdio.py --db-path ./memory.db --tenant-id local --session-id default

Python Quickstart

Use the library directly from Python — append to a session transcript, then search it back:

import asyncio
from pydantic_ai.messages import ModelRequest, UserPromptPart
from vexic import (
    AppendTranscriptRequest, LocalMemoryService, MemoryCapability, MemoryScope,
    Principal, PrincipalType, RedactionContext, SearchTranscriptRequest, TrustBoundary,
)
from vexic.storage import single_message_adapter

scope = MemoryScope(
    tenant_id="local", session_id="session-1",
    principal=Principal(principal_id="me", principal_type=PrincipalType.HUMAN),
    trust_boundary=TrustBoundary.LOCAL_TRUSTED,
    capabilities={MemoryCapability.WRITE, MemoryCapability.SEARCH},
)

async def main() -> None:
    service = LocalMemoryService(db_path="memory.db", tenant_id="local")
    service.init_schema()
    message = ModelRequest(parts=[UserPromptPart(content="I prefer tabs over spaces.")])
    await service.append_transcript(AppendTranscriptRequest(
        scope=scope,
        messages_json=[single_message_adapter.dump_json(message).decode()],
        redaction=RedactionContext(forbidden_values=()),
    ))
    result = await service.search_transcript(SearchTranscriptRequest(scope=scope, query="tabs"))
    print(result.hits[0].body)

asyncio.run(main())

Output: User: I prefer tabs over spaces. All environment variables the package and its adapters read are listed in docs/configuration.md.

Repository Map

  • src/vexic/ - memory contract, local service, storage, retrieval, and hosted adapter code.
  • tests/ - executable conformance and reliability coverage.
  • docs/usage.md - setup, MCP, recorder, hosted-alpha, and smoke-test examples.
  • docs/architecture.md and docs/memory-service-contract.md - architecture and contract references.
  • docs/adr/ - accepted architecture decision records.
  • AGENTS.md - contributor and maintainer workflow rules for coding agents (repo-root source of truth); docs/ai/README.md indexes the supporting notes.

Vexic Console and the marketing website live in the private PyroDonkey/vexic-website repository (open-core boundary) — see ADR 0012's addendum.

Package Boundary

The repository root remains uv-managed; do not add Node package files at the root. Console and website ownership moved out of this repository entirely (see Repository Map above) — there is no in-repo Node package surface to isolate anymore.

Contributing

Working from a source checkout? Clone the repository and run the test suite with uv:

uv run pytest

See CONTRIBUTING.md for setup and the branch workflow, SECURITY.md for reporting vulnerabilities, and CODE_OF_CONDUCT.md for community expectations.

License

Apache-2.0. See LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vexic-0.1.1.tar.gz (161.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

vexic-0.1.1-py3-none-any.whl (192.7 kB view details)

Uploaded Python 3

File details

Details for the file vexic-0.1.1.tar.gz.

File metadata

  • Download URL: vexic-0.1.1.tar.gz
  • Upload date:
  • Size: 161.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.28 {"installer":{"name":"uv","version":"0.11.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for vexic-0.1.1.tar.gz
Algorithm Hash digest
SHA256 2f84036ea8b1d3f90668c8ac40a106ea00b742a4d6083d50b61a84f326412237
MD5 5d58ac0beb4fe0e1138253198294fdfd
BLAKE2b-256 711f4768c90bcac61c7bff731f5ff0ce96c80ea2ec699c564f9b5ead69097346

See more details on using hashes here.

File details

Details for the file vexic-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: vexic-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 192.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.28 {"installer":{"name":"uv","version":"0.11.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for vexic-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 23078a45501bb12cd238c4bf5fb6d1faa5beae89eebbf10eff54a51345a42d39
MD5 2eb4d0e051a471961bba87105b02c69a
BLAKE2b-256 e439a1b505e1a1242e786d101ac656bfa75a33aad4dc7a465986fd5380c0f904

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page