Skip to main content

Atulya: A living algorithm for machine intelligence (MI)

Project description

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.

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

atulya_api-0.8.4.tar.gz (620.1 kB view details)

Uploaded Source

Built Distribution

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

atulya_api-0.8.4-py3-none-any.whl (714.7 kB view details)

Uploaded Python 3

File details

Details for the file atulya_api-0.8.4.tar.gz.

File metadata

  • Download URL: atulya_api-0.8.4.tar.gz
  • Upload date:
  • Size: 620.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for atulya_api-0.8.4.tar.gz
Algorithm Hash digest
SHA256 930c19677b4f375533e420fd1645e6afc6cd8c5220bfddd21da333fb481b963f
MD5 1bd63b5c0053ca526ff35996b181c692
BLAKE2b-256 7f5a48ee185c5fe2945b3c814ee5c3b227256ba4d9cd727f9a134df4e9eac735

See more details on using hashes here.

File details

Details for the file atulya_api-0.8.4-py3-none-any.whl.

File metadata

  • Download URL: atulya_api-0.8.4-py3-none-any.whl
  • Upload date:
  • Size: 714.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for atulya_api-0.8.4-py3-none-any.whl
Algorithm Hash digest
SHA256 00b8627807b1d32a81994ce5cd2e4a119ab778f8b0bcf12120d2a8099ff8a832
MD5 16dc4870138f6413322055691e6ae655
BLAKE2b-256 6652c2b09830708b595e00ef14b14d3839a480f4e6db58319338b972767f6a40

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