Skip to main content

Atulya API

Memory System for AI Agents — Temporal + Semantic + Entity Memory Architecture using PostgreSQL with pgvector.

Atulya gives AI agents persistent memory that works like human memory: it stores facts, tracks entities and relationships, handles temporal reasoning ("what happened last spring?"), and forms opinions based on configurable disposition traits.

Installation

pip install atulya-api

Quick Start

Run the Server

# Set your LLM provider
export ATULYA_API_LLM_PROVIDER=openai
export ATULYA_API_LLM_API_KEY=sk-xxxxxxxxxxxx

# Start the server (uses embedded PostgreSQL by default)
atulya-api

The server starts at http://localhost:8888 with:

  • REST API for memory operations
  • MCP server at /mcp for tool-use integration

Use the Python API

from atulya_api import MemoryEngine

# Create and initialize the memory engine
memory = MemoryEngine()
await memory.initialize()

# Create a memory bank for user anurag, focused on benchmarking protocols
bank = await memory.create_memory_bank(
    name="anurag",
    background="An agent pondering new protocols for benchmarking machine intelligence."
)

# Store an initial thought or proposal relevant to benchmarking
await memory.retain(
    memory_bank_id=bank.id,
    content="Considering the design of an open protocol for more transparent, reproducible benchmarking of machine intelligence systems."
)

# Recall previous reflections on benchmarking protocols
results = await memory.recall(
    memory_bank_id=bank.id,
    query="What ideas has anurag had about benchmarking machine intelligence?"
)

# Reflect on potential standards or innovations in benchmarking MI
response = await memory.reflect(
    memory_bank_id=bank.id,
    query="What protocol features would ensure fairness and generalizability in benchmarking machine intelligence?"
)

CLI Options

atulya-api --help

# Common options
atulya-api --port 9000          # Custom port (default: 8888)
atulya-api --host 127.0.0.1     # Bind to localhost only
atulya-api --workers 4          # Multiple worker processes
atulya-api --log-level debug    # Verbose logging

Configuration

Configure via environment variables:

Variable Description Default
ATULYA_API_DATABASE_URL PostgreSQL connection string pg0 (embedded)
ATULYA_API_LLM_PROVIDER openai, anthropic, gemini, groq, ollama, lmstudio, llamacpp openai
ATULYA_API_LLM_API_KEY API key for LLM provider -
ATULYA_API_LLM_MODEL Model name gpt-4o-mini
ATULYA_API_HOST Server bind address 0.0.0.0
ATULYA_API_PORT Server port 8888

Example with External PostgreSQL

export ATULYA_API_DATABASE_URL=postgresql://user:pass@localhost:5432/atulya
export ATULYA_API_LLM_PROVIDER=groq
export ATULYA_API_LLM_API_KEY=gsk_xxxxxxxxxxxx

atulya-api

Example: Fully Offline with Built-in GGUF Provider

# Install extra dependency
pip install 'atulya-api[local-llm]'

# Run completely offline — auto-downloads default model on first run
export ATULYA_API_LLM_PROVIDER=llamacpp
atulya-api

# Or point to your own GGUF / fine-tuned model
export ATULYA_API_LLAMACPP_MODEL_PATH=~/.atulya/models/your-model.gguf
export ATULYA_API_LLAMACPP_GPU_LAYERS=-1       # full GPU offload (Metal/CUDA)
export ATULYA_API_LLAMACPP_LORA_PATH=~/.atulya/models/adapter.gguf  # optional LoRA
atulya-api

Docker

docker run --rm -it -p 8888:8888 \
  -e ATULYA_API_LLM_API_KEY=$OPENAI_API_KEY \
  -v $HOME/.atulya-docker:/home/atulya/.pg0 \
  ghcr.io/eight-atulya/atulya:latest

MCP Server

For local MCP integration without running the full API server:

atulya-local-mcp

This runs a stdio-based MCP server that can be used directly with MCP-compatible clients.

Key Features

  • Multi-Strategy Retrieval (TEMPR) — Semantic, keyword, graph, and temporal search combined with RRF fusion
  • Entity Graph — Automatic entity extraction and relationship tracking
  • Temporal Reasoning — Native support for time-based queries
  • Disposition Traits — Configurable skepticism, literalism, and empathy influence opinion formation
  • Three Memory Types — World facts, bank actions, and formed opinions with confidence scores

Documentation

Full documentation: Atulya Docs

License

This project is licensed under a custom Research-Only License.

Summary:

  • Free to use, modify, and distribute for non-commercial research and academic purposes.
  • Commercial use, including use in products or services for profit, is not permitted without explicit, written permission from the authors.

Atulya Brain Research Use License v1.0

Copyright (c) 2026 Anurag Atulya and EIGHT. All rights reserved.

  1. Grant of Use
    Permission is granted to use, copy, and modify this software solely for non-commercial research, evaluation, and educational purposes.

  2. Non-Commercial Restriction
    Commercial use is strictly prohibited. Commercial use includes, but is not limited to:

  • selling this software or derivative works;
  • offering paid services that depend on this software;
  • bundling this software in commercial products or SaaS platforms;
  • using this software directly to generate business revenue.
  1. Distribution
    Redistribution of source or binary forms is permitted only for non-commercial research purposes and must include this license text in full.

  2. No Trademark Grant
    This license does not grant any rights to use names, marks, or logos of Anurag Atulya, EIGHT, or Atulya except for accurate attribution.

  3. Disclaimer of Warranty
    THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT.

  4. Limitation of Liability
    IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES, OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT, OR OTHERWISE, ARISING FROM, OUT OF, OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

  5. Termination
    Any use in violation of this license immediately terminates all rights granted under this license.

Release files for atulya-api 0.8.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for atulya-api 0.8.7
File Size Uploaded
atulya_api-0.8.7.tar.gz 685.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for atulya-api 0.8.7
File Interpreter ABI Platform
atulya_api-0.8.7-py3-none-any.whl Python 3 none any Details

Total release size: 1.5 MB

Release files / atulya_api-0.8.7.tar.gz

Download URL atulya_api-0.8.7.tar.gz
Size 685.2 kB
Tags Source
SHA-256 checksum
How to use checksums
da1f6c1c6261c4eb0081a2625843404c80c63687923d48f4092619f93729e943
BLAKE2b-256 checksum
How to use checksums
c25b522671abe97c65d241ea98ef1e883ffcfa5b8b3c665d37ba7cb82e36fc78
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.12

Release files / atulya_api-0.8.7-py3-none-any.whl

Download URL atulya_api-0.8.7-py3-none-any.whl
Size 806.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bef445239c6fed42386e536a664cf2b5fd9fd1565165388cfae5241f302f110f
BLAKE2b-256 checksum
How to use checksums
72f9388f894e3bc08009f2b91e019a943829f04b41e4a7202394811593205406
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.12

Release history Release notifications | RSS feed

This release

0.8.7 This release

2 release files

0.8.6

2 release files

0.8.5

2 release files

0.8.4

2 release files

0.8.3

2 release files

0.8.2

2 release files

0.8.1

2 release files

0.8.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page