Agent APIPrompt Formats
DocsSystem PromptsPrompt Formats

Prompt File Formats

Use any text file format. ConnectOnion just reads the content.

Key Point

ConnectOnion doesn't parse formats — it just reads text and passes it to the LLM. Use whatever format your team prefers.

Supported Formats
# All of these work - ConnectOnion just reads the text content:

agent = Agent("bot", system_prompt="""You are helpful...""")     # Direct string
agent = Agent("bot", system_prompt="prompts/assistant.md")       # Markdown
agent = Agent("bot", system_prompt="prompts/assistant.txt")      # Plain text
agent = Agent("bot", system_prompt="prompts/assistant.yaml")     # YAML
agent = Agent("bot", system_prompt="prompts/assistant.json")     # JSON
agent = Agent("bot", system_prompt="prompts/assistant")          # No extension

Why This Matters

  • No lock-inUse any format your team already prefers
  • Future-proofNew formats work automatically without code changes
  • SimpleNo complex parsing, schemas, or converters needed

Format Details

.mdMarkdown — most readable, supports headers and lists
.txtPlain text — simple and universal
.yamlYAML — good for structured metadata alongside prompt text
.jsonJSON — machine-readable, easy to generate programmatically
(none)No extension — any text file works

Star us on GitHub

If ConnectOnion saves you time, a ⭐ goes a long way — and earns you a coffee chat with our founder.