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 extensionWhy This Matters
- ✓No lock-in — Use any format your team already prefers
- ✓Future-proof — New formats work automatically without code changes
- ✓Simple — No 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
ConnectOnion