write_document_type
Create a document type, or rewrite the one id names, passing the version last read.
writesnot idempotentdestructiveCLI onlyAgent
Calling it#
curl -X POST http://127.0.0.1:8787/komrad.agent.v1.AgentService/WriteDocumentType \
-H 'Content-Type: application/json' \
-d '{
"name": "<name>",
"context": "<context>"
}'komrad rpc write-document-type \
--name '<string>' \
--context '<string>'Request#
WriteDocumentTypeRequest#
| Field | Type | Description |
|---|---|---|
id | uuid | The document type to rewrite, by id. Unset creates a document type. |
name | string* at most 100 characters must not contain control characters | The document type's name. Renaming a type renames it on its documents too. |
context | string* at most 1048576 bytes | The markdown an agent reads before writing a document of this type. |
version | int32 more than 0 | The document type's |
Response#
WriteDocumentTypeResponse#
| Field | Type | Description |
|---|---|---|
document_type | DocumentType | The document type as written. |
Types#
DocumentType#
DocumentType is one kind of document, with the context an agent reads before writing one.
| Field | Type | Description |
|---|---|---|
id | uuid* | The document type's id. |
name | string | The document type's name, which each document of the type carries as |
context | string | The markdown an agent reads before writing a document of this type. |
version | int32 | How many times the document type has been written. |
updated_at | timestamp | When the document type was last written. |