Add Context to Alchemyst AI
This guide shows you how to store context in Alchemyst AI and reuse it in your LLM or agent - step by step.What you’ll build
By the end of this guide, you will:- Store context (memory) in Alchemyst
- Reuse that context in future requests
- Retrieve relevant context and feed it to llms
Prerequisites
You’ll need:- An Alchemyst AI account - sign up
- Your
ALCHEMYST_AI_API_KEY - Python 3.9+ or Node.js 18+
Step 1: Install the SDK
Step 2: Initialize the client
Step 3 : Create documents array
Thedocuments array contains the raw content you want Alchemyst to store - documents, PDFs, and other sources must first be converted into text strings and then uploaded
Step 4: Add context (store memory)
This step adds documents into the context processor which are then turned into nodes.What just happened?
- The data was stored in Alchemyst’s context layer
- It can be used to search query and provide llm with relevant context
Step 5: Search through context
Retrieve the most relevant stored context before invoking the model.Step 6 : Ingest the retrieved context into llm prompts
Convert the resolved context into a structured prompt before sending it to the LLM.What Alchemyst does automatically
- Stores context securely
- Retrieves relevant memory
- keeps behavior consistent across sessions
You don’t need:
- Custom vector stores
- Manual Prompt stuffing
- Memory orchestration logic
Troubleshooting and Errors
Errors while adding or searching documents usually relate to payload structure, limits, or permissions. Refer to the Add Documents and Search Context sections above for correct usage.Next Steps: Go Deeper with the SDK & APIs
Get up and running with our dedicated SDKs or integrate directly via our API.Python SDK
Python
TypeScript SDK
TypeScript
AI Tools Setup
Use Alchemyst with AI Tools
API documentation
Read the API documentation.
Cookbooks & Community Examples
Step-by-step cookbooks and real projects from the community to help you build faster with Alchemyst.Sample Projects
Add sample code to demonstrate how to use your product.
Cookbook
Explore full fledged projects built on top of our platform.
Need Help?
If you get stuck or want to share feedback:- Browse the Guides and API docs on this site.
- Search the documentation for targeted answers.
- Join our Discord server for real-time help.

