API pipeline: Write an agenda for your oracles

Index: API pipelines — index

Goal: write an agenda — the instructions and persona your oracles and campaigns run on — and read a public agenda.

An agenda is a card that bundles instruction articles, API endpoints and secrets. Two kinds:

Steps

1. Write the instructions as articles (Private is fine): API pipeline: Write articles and posts

2. Create the agenda.

POST /v0/my/agendas
Idempotency-Key: ag-93e0…
{"title": "Bakery front desk", "description": "Answers customers of Green Bakery.",
 "kind": "fwag", "project": "470000000000000001",
 "instructions": ["470000000000000042"], "api_endpoints": ["470000000000000420"], "secrets": ["470000000000000410"]}
→ {"app": {"nonce": "470000000000000500", "card_type": "agenda", "kind": "fwag",
           "lists": {"instructions": [{…tile…}], "api_endpoints": [{…}], "secrets": [{…}], "swag": []}, …}}

3. Tune the model.

PATCH /v0/my/agendas/470000000000000500
{"llm": {"model": "<model id>", "reasoning": "low"}}

4. Check the assembled prompt.

GET /v0/graph/agendas/470000000000000500/prompt
→ 200 text/plain (ETag)       send If-None-Match: <etag> → 304 when unchanged

Needs write on the agenda.

5. Use it. Assign the agenda to an oracle or a campaign (agenda field on those cards).

6. Read, share, delete. Yours: GET /v0/my/agendas, GET /v0/my/agendas/{nonce|@handle}. A public agenda: GET /v0/graph/agendas/{nonce|@handle} (its lists are shown only to writers). DELETE /v0/my/agendas/{ident}. An agenda can claim an access link shared with it: POST /v0/my/agendas/{ident}/claim {"token": "<token>"} (see sharing by links in the index).

7. Who can run your agenda. Whoever runs an agenda uses AI paid by its owner, so only you run your agendas, plus the people and agendas you share one with for running: an access link with execute that they claim, or a grant from you (API pipeline: Share cards through access links). The execute permission on the agenda card itself lets no one else run it, at any visibility. Reading follows the card's visibility as usual.

8. See what your agenda holds.

GET /v0/my/agendas/470000000000000500/access
→ {"agenda": "470000000000000500", "total": 1,
   "access": [{"tile": {"card_type": "room", "nonce": "470000000000000300", …},
               "active": true, "private": false,
               "rights": {"read": true, "write": false, "execute": false},
               "grants": [{"kind": "link", "issuer": "<card owner>", "active": true,
                           "rights": {"read": true, "write": false, "execute": false},
                           "created_at": "…", "expires_at": null, "ended": null}]}]}

9. Rubrics your agenda marks with. When an oracle running your agenda tags a card or a conversation, it adds only rubrics the agenda itself may mark with: rubrics open for marking, or a rubric of yours (Unlisted or wider) you shared with the agenda with execute on that rubric itself. Your own right to mark is not lent to the agenda. Removing a rubric needs no such right. Rules: API pipeline: Tag cards with rubrics, section B3.

Behind

Rules (400)

API surface

Endpoint Purpose FE AI / oracle
POST /v0/my/agendas Create yes yes
PATCH/DELETE /v0/my/agendas/{ident} Edit, model, lists, delete yes yes
GET /v0/my/agendas (+ /{ident}) Yours yes yes
GET /v0/graph/agendas/{ident} A public agenda yes yes
GET /v0/graph/agendas/{ident}/prompt Assembled prompt no yes
POST /v0/my/agendas/{ident}/claim Claim a link for the agenda yes yes
GET /v0/my/agendas/{ident}/access What the agenda holds no your token

Mentioned