Add a method
const url = 'https://api.pensievelabs.co/v1/methods';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"slug":"curriculum","markdown":"# Curriculum fine-tuning\n\nFine-tune on easy cases first, then hard ones.\n"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.pensievelabs.co/v1/methods \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "slug": "curriculum", "markdown": "# Curriculum fine-tuning\n\nFine-tune on easy cases first, then hard ones.\n" }'A post-training method of your own, as a markdown file. From then on the agents can choose it for an experiment, and you can name it when you suggest one. A slug is used only once: the slug of a removed method can’t be taken again.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Header Parameters
Section titled “Header Parameters”Any unique string. Sending it again within 24 hours returns the first response.
Request Bodyrequired
Section titled “Request Bodyrequired”object
A post-training method’s slug, such as fine-tuning. See List methods for what your workspace has.
The method, in plain markdown. It must start with a # title, then a paragraph.
Example
{ "slug": "curriculum", "markdown": "# Curriculum fine-tuning\n\nFine-tune on easy cases first, then hard ones.\n"}Responses
Section titled “Responses”The method.
A post-training method, written as a plain markdown file. It starts with a # title and a paragraph
saying what the method does and when to try it; the rest is up to its author. Pensieve’s own files have
Needs, Steps, Settings (what an experiment can change) and Checks. Agents read the file to design
experiments with the method and follow it as written.
object
A post-training method’s slug, such as fine-tuning. See List methods for what your workspace has.
The file’s title.
The file’s first paragraph.
The whole file.
Goes up by one with every change. Each experiment records the version it ran.
Shipped by Pensieve. Built-in methods can’t be changed or removed.
Example
{ "id": "fine-tuning", "object": "method", "name": "Fine-tuning"}default
Section titled “default”Something went wrong; error.type says what.
object
object
The request field the error is about.
Example
{ "error": { "type": "invalid_request" }}