Concepts
Agents as text files
Understand ChatMD: instructions, tools, and model configuration in one file.
View Markdown source ↗ChatMD is where you define an Ochat agent: what it should do, what tools it can call, and, optionally, how a script coordinates its work. It combines readable Markdown with a small set of tags. You can keep these files alongside your code, review changes in version control, and compose reusable pieces into new agents.
You do not need a server to get started. Write a prompt and open it in the local TUI; hosting it in a daemon is a separate choice later.
Start with instructions
Section titled “Start with instructions”A minimal prompt can be just a developer message. Save this as helper.chatmd:
<developer>Help me understand unfamiliar code. Explain the main idea first, then workthrough an example. Ask for missing context rather than inventing details.</developer>With Ochat installed and your provider configured, run:
chat-tui --no-config --local -file helper.chatmdThis prompt has no tools: paste the code you want to discuss. The local TUI walkthrough covers setup; the TUI guide covers editing and navigation.
Build up the agent as you need it
Section titled “Build up the agent as you need it”- Instructions and context: use messages and Markdown to describe the task, constraints, and information the agent needs.
- Tools: add declarations for the capabilities the model may call. Start with the tools introduction; declarations are not a reason to skip reviewing each tool’s access rules.
- Composition: import shared declarations or expose another ChatMD prompt as a specialist tool. Keep reusable roles in their own files.
- Orchestration: add an optional ChatML script when instructions alone are not enough to express your workflow.
The workspace supplies the ${workspace} location used by configured tools.
It is not a blanket filesystem sandbox or an automatic access grant. The
language reference explains the other path variables, including ${prompt_dir}
and ${source_dir}, and how imports affect resolution.
Choose how to run it
Section titled “Choose how to run it”Use the local TUI for interactive work, the completion CLI for a file-backed input/output workflow, or the agent server when you need independent session lifetimes and client connections. The prompt remains the agent definition; the host supplies execution and lifecycle behavior.
Go deeper
Section titled “Go deeper”- ChatMD language reference: supported tags, configuration, imports, embedded content, and path resolution.
- Examples and walkthroughs: starting points to adapt.
- Tool reference: declarations and built-in behavior.
- ChatML workflows: programmable orchestration.
- Documentation home.