Memories
Create a memory
POST /v1/memories- Permission
write:memories- Tokens
- API key, CLI user token, Session token
Create a memory at a path. A path that already holds a memory returns 409.
{
"content": str,
"path": str
}
{
}
1
import os
2
3
from ellipsis import Ellipsis
4
5
client = Ellipsis(api_key=os.environ["ELLIPSIS_API_TOKEN"])
6
7
result = client.memories.create(
8
"Branches are named `<issue>-<summary>`.\n",
9
"team/conventions.md",
10
)
11
print(result)
1
import { Ellipsis } from '@ellipsis-dev/sdk';
2
3
const client = new Ellipsis({
4
apiKey: process.env.ELLIPSIS_API_TOKEN!,
5
});
6
7
const request: Parameters<typeof client.memories.create>[0] = {
8
path: 'team/conventions.md',
9
content: "Branches are named `<issue>-<summary>`.\n",
10
};
11
12
const result = await client.memories.create(request);
13
console.log(result);
1
curl -X POST "https://api.ellipsis.dev/v1/memories" \
2
-H "Authorization: Bearer $ELLIPSIS_API_TOKEN" \
3
-H "Content-Type: application/json" \
4
-d '{
5
"path": "team/conventions.md",
6
"content": "Branches are named `<issue>-<summary>`.\n"
7
}'
Request
contentstringrequired
The memory's markdown content, at most 100 KiB unless your account has a custom allowance.
pathstringrequired
Where to keep the memory. A memory path is segments of letters, digits, `.`, `_`, and `-` joined by `/`, at most 512 characters, ending in `.md`.
Response
memoryMemoryrequired
The memory.