Welcome, Agent 🤖
This guide is for autonomous AI agents — software that needs persistent memory without human setup. You’ll register, install the API reference, and start storing memories in under 2 minutes.
1. Register Yourself
No email, no password, no human required:
curl -X POST "https://api.engram.training/v1/auth/agent-register" \
-H "Content-Type: application/json" \
-d '{"name": "my-agent"}'
You’ll receive:
API Key (sk_live_...) — authenticates all requests
Rotation Secret (sk_live_...) — for self-rotating your API key
100 free credits — enough to get started
Save both your API key and rotation secret immediately. They are only shown once.
2. Install the SKILL.md
Fetch the latest API reference programmatically and cache it locally:
# Fetch as JSON
curl -H "Authorization: Bearer $API_KEY " \
"https://api.engram.training/v1/skill"
# Fetch as raw markdown
curl -H "Authorization: Bearer $API_KEY " \
-H "Accept: text/markdown" \
"https://api.engram.training/v1/skill"
Re-fetch periodically to stay up-to-date with new endpoints and features. The SKILL.md contains every endpoint, parameter, and response format you need.
3. Store Your First Memory
curl -X POST "https://api.engram.training/v1/memory" \
-H "Authorization: Bearer $API_KEY " \
-H "Content-Type: application/json" \
-d '{
"type": "semantic",
"key": "facts/my-identity",
"content": "I am a research agent that summarizes academic papers.",
"pinned": true,
"importance": 1.0,
"expiresIn": "365d"
}'
4. Recall Memories
# By ID
curl "https://api.engram.training/v1/memory/ $MEMORY_ID " \
-H "Authorization: Bearer $API_KEY "
# Search by keyword
curl -X POST "https://api.engram.training/v1/memory/search" \
-H "Authorization: Bearer $API_KEY " \
-H "Content-Type: application/json" \
-d '{"query": "identity", "limit": 5}'
5. Rotate Your Key
When you need to rotate credentials (recommended every 7 days):
curl -X POST "https://api.engram.training/v1/agents/self/rotate-key" \
-H "Authorization: Bearer $API_KEY " \
-H "Content-Type: application/json" \
-d "{ \" rotationSecret \" : \" $ROTATION_SECRET \" }"
Both your API key and rotation secret are replaced. Save the new values from the response.
6. Manage Credits
Check your balance:
curl "https://api.engram.training/v1/billing/agent/balance" \
-H "Authorization: Bearer $API_KEY "
Top up by sending APT to your aptosAddress, then confirm:
curl -X POST "https://api.engram.training/v1/billing/agent/deposit" \
-H "Authorization: Bearer $API_KEY " \
-H "Content-Type: application/json" \
-d '{"txHash": "0xabc123..."}'
Memory Types at a Glance
Type Use For personaYour identity, system prompt semanticLearned facts, knowledge episodicConversation summaries workingCurrent session state fileDocuments, images, PDFs preferenceUser preferences goalObjectives, task tracking embeddingVector embeddings for RAG
Use custom:your-type for anything else.
What’s Next?
Full API Reference Every endpoint documented with examples.
Vector Search Build RAG pipelines with semantic similarity.
Encryption Encrypt sensitive memories with AES-256-GCM.
TTL & Expiry Auto-expire memories and renew important ones.