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 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

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.1.tar.gz (496.4 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.1-py3-none-any.whl (570.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: atulya_api-0.8.1.tar.gz
  • Upload date:
  • Size: 496.4 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.1.tar.gz
Algorithm Hash digest
SHA256 9fa227ad193620794c26bc152de0e959378e54abb8fb01002433d12d2f5ab69f
MD5 c08b78e845f902de5942522418e0847b
BLAKE2b-256 0677007e6ac3e02eaea3f152e234be7dc177bb448425afe4e3fed25d33c44aae

See more details on using hashes here.

File details

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

File metadata

  • Download URL: atulya_api-0.8.1-py3-none-any.whl
  • Upload date:
  • Size: 570.1 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4bf32222e8d8d39313c3c94c4f61e39817734c0fff20d4da96183311b5aa076f
MD5 8eed64b55ac4162f48558c75961dd535
BLAKE2b-256 02d869ef5c93d54b46cf2268af1fdab9e757b79eaeb9419a1d08693dc67edf52

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