Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions sdk/arch/agent-server.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,27 @@ conversation.close()

If the server was started without `OH_SESSION_API_KEYS_0`, remove the `api_key=...` argument.

## Customize Conversation Title Generation

When creating a conversation through `POST /api/conversations`, set
`prompt` to replace the default user prompt used for automatic
title generation. The value can contain these placeholders:

- `{conversation_content}` - The first user message, truncated to 1,000 characters.
- `{max_length}` - The maximum generated title length.

```json
{
"autotitle": true,
"prompt": "Create a title under {max_length} characters for: {conversation_content}"
}
```

If `{conversation_content}` is not present, the Agent Server appends the first
user message to the custom prompt. Empty or omitted values keep the default
title-generation behavior. Prompts can contain up to 2,000 characters and are
stored with the conversation in `meta.json`.

## Expose It Safely

If another service runs on the same machine, keep the server bound to `127.0.0.1` and let that service connect locally.
Expand Down
Loading