Skip to content

24greyhat/agent-recall

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

Antonlytics Agent — Demo

A quick demo showing how to use the antonlytics Python SDK to give any AI model long-term, queryable memory backed by a knowledge graph.

What it does

  1. Ingest natural language — the agent extracts entities and relationships automatically.
  2. Chat — ask questions; the agent retrieves relevant context and responds.
  3. Get memory — pull raw graph data to inject into your own model.

Quickstart

1. Install dependencies

pip install antonlytics django-environ

2. Set up environment variables

Create a .env file in the project root:

ANTONLYTICS_API=your_api_key_here
ANTONLYTICS_PROJECT=your_project_id_here

3. Run the notebook

Open notebook.ipynb and run all cells.

Example

from antonlytics import Agent
import environ

env = environ.Env()
environ.Env.read_env(".env")

agent = Agent(
    api_key=env("ANTONLYTICS_API"),
    project_id=env("ANTONLYTICS_PROJECT")
)

# Teach the agent something
agent.ingest("""
Customer Alice from USA purchased Laptop Pro for $999.
She's interested in our Enterprise plan.
""")

# Set a system prompt
agent.set_system_prompt(
    "You are a helpful assistant to the store's owner. "
    "Respond directly and efficiently."
)

# Ask a question — the agent uses its memory
response = agent.chat("Who purchased laptops?")
print(response["response"])
# => "Alice from USA purchased a Laptop Pro for $999"

# Or pull raw memory for use with your own model
memory = agent.get_memory("laptop purchases")
print(memory)

Sample get_memory response

{
  "entities": [
    { "type": "Person", "properties": { "name": "Alice", "country": "USA" } },
    { "type": "Product", "properties": { "name": "Laptop Pro", "price": "$999" } },
    { "type": "Product", "properties": { "name": "Enterprise plan" } }
  ],
  "relationships": [
    { "type": "PURCHASED", "source": "Alice", "target": "Laptop Pro" },
    { "type": "INTERESTED_IN", "source": "Alice", "target": "Enterprise plan" }
  ]
}

How it works

  • Ingest parses free-form text into graph nodes (entities) and edges (relationships).
  • Chat retrieves the most relevant subgraph and passes it as context to the underlying model.
  • Get memory exposes the raw graph so you can use it with any AI model of your choice.

About

Antonlytics demo (Agent Memory Provider)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors