Skip to main content

LlamaIndex Tools Integration: past dev

past dev is a memory API for AI agents. This package gives a LlamaIndex agent two tools over past dev:

  • recall: a past dev Recall. The agent asks a question and gets the ranked memory of the current user, with the date, the kind and the quoted evidence of each entry.
  • ingest: a past dev Ingest. The agent keeps one piece of information as a data point, so that a later recall can find it.

Install

pip install llama-index-tools-pastdotdev

Get a key

  1. Sign up at past.dev and open a project.
  2. Make a project API key. It starts with past_sk_.
  3. Set it in the environment as PAST_API_KEY, or give it to the spec as api_key.

Use

from llama_index.core.agent.workflow import FunctionAgent
from llama_index.llms.openai import OpenAI
from llama_index.tools.pastdotdev import PastDevToolSpec

past_dev = PastDevToolSpec(
    identity=current_user.id,  # your id for the end user, from your own user record
)

agent = FunctionAgent(
    tools=past_dev.to_tool_list(),
    llm=OpenAI(model="gpt-4.1-mini"),
    system_prompt="Recall what you know about the user before you answer.",
)
response = await agent.run("What did I decide about the launch date?")

The identity

past dev keeps memory per identity: your id for the end user. Recall needs an identity, and the first ingest for an identity creates it.

Set identity in the PastDevToolSpec constructor, from your trigger or your user record. It is not a tool argument: the model cannot see it or change it. The same applies to audience and to the recall budget. Make one spec for each user.

The tools

Tool Arguments the model gives API call
recall query (required), occurredFrom, occurredTo, sort (relevance or chronological) POST /api/v1/recall
ingest content (required), timestamp POST /api/v1/ingest

The argument names are the API's own field names.

Parameters

Parameter Default Description
identity (required) Your id for the end user.
api_key PAST_API_KEY A past dev project API key (past_sk_...).
api_host PAST_API_HOST, else https://api.past.dev The API base URL. Change it only if you run past dev in your own cloud.
audience none The audience slug for ingested memory. Without it, the memory is visible to the project.
level low (on the server) The recall evidence budget: low, medium, high or extra-high.
max_tokens none An explicit recall evidence budget in tokens. Use level or max_tokens, not both.
limit 100 (on the server) The maximum number of recalled documents.
label Saved by a LlamaIndex agent The label of each data point that the model ingests.
timeout 30 The HTTP timeout in seconds.
http_client none An httpx.Client to use, for example with a proxy.

Credits

Each recall and each ingest spends credits on your past dev plan. The agent decides when to call the tools, so tell it in the system prompt when to use them.

Errors

An API error raises PastDevError, with the error code, the HTTP status, the message and the X-Request-Id of the request. The LlamaIndex agent gives the error to the model as the tool output. The spec retries a 429 once, after its Retry-After delay. It does not retry other errors, for example 402 out-of-credits or a 400.

License

MIT. See LICENSE.

Metadata

Release files for llama-index-tools-pastdotdev 0.1.0

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

Source distribution (sdist)

Source distribution for llama-index-tools-pastdotdev 0.1.0
File Size Uploaded Provenance
llama_index_tools_pastdotdev-0.1.0.tar.gz 10.8 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for llama-index-tools-pastdotdev 0.1.0
File Interpreter ABI Platform
llama_index_tools_pastdotdev-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 20.3 kB

Release files / llama_index_tools_pastdotdev-0.1.0.tar.gz

Download URL llama_index_tools_pastdotdev-0.1.0.tar.gz
Size 10.8 kB
Tags Source
SHA-256 checksum
How to use checksums
c616c6a97527831560c295133d508f573dcd26036760db9e3aa529f8da94fce0
BLAKE2b-256 checksum
How to use checksums
c908e108f6ecf34ee1cb8d1fd854b23976815861e8986643e945810266ec9b14
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 22, 2026.

Transparency log

Release files / llama_index_tools_pastdotdev-0.1.0-py3-none-any.whl

Download URL llama_index_tools_pastdotdev-0.1.0-py3-none-any.whl
Size 9.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
29c528bfeeb859a26d8f2350491aa545247e5d57c3c7c746a19fa56520605621
BLAKE2b-256 checksum
How to use checksums
e0fca04cda642ea66b083e7631246be781a8ab03bebfde9f00a0b3b1990a0df7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 22, 2026.

Transparency log

Security for llama-index-tools-pastdotdev 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for llama_index_tools_pastdotdev-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 22, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

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