Parlant — Prompts
Parlant's "prompts" are its behavioral primitives — Guidelines, Observations, and Journeys defined in Python code. The framework explicitly moves away from prose system prompts toward structured, matchable behavioral rules.
SDK API as Prompt Language
import parlant.sdk as p
async with p.Server():
agent = await server.create_agent(
name="Customer Support",
description="Handles customer inquiries for an airline",
)
# Evaluate and call tools only under the right conditions
expert_customer = await agent.create_observation(
condition="customer uses financial terminology like DTI or amortization",
tools=[research_deep_answer],
)
# When the expert observation holds, always respond with depth
expert_answers = await agent.create_guideline(
matcher=p.MATCH_ALWAYS,
action="respond with technical depth",
dependencies=[expert_customer],
)
beginner_answers = await agent.create_guideline(
condition="customer seems new to the topic",
action="simplify and use concrete examples",
)
# When both match, beginners wins
await beginner_answers.exclude(expert_customer)
Prompting technique: Code-as-behavior-specification. Each guideline is a discrete, independently matchable unit with explicit dependencies and exclusions. This is "prompt engineering as software engineering" — behavioral rules compose, override, and depend on each other like objects.
CLAUDE.md (Developer Instructions)
# Parlant Developer Guide
## Repository Structure
The repository uses a develop branch as the main integration branch.
All pull requests should target develop.
## Testing
- Unit tests: pytest
- Stochastic behavioral tests: pytest --stochastics pytest_stochastics.json
(Tests probabilistic behavior with configurable pass thresholds)
- Integration tests require a running parlant-server
## Contribution
Follow the DCO (Developer Certificate of Origin) — sign off commits:
git commit -s -m "..."
Prompting technique: Minimal developer instructions focused on process (DCO, stochastic testing). Not prescriptive about code style — trusts the framework's own test infrastructure.
ARQ Research Foundation
From the README and code imports, Parlant uses "Attentive Reasoning Queries (ARQs)" — domain-specialized reasoning blueprints based on an arXiv paper (2503.03669). These are internal prompt patterns that the engine uses to improve model accuracy in conversational contexts. The ARQ mechanism is not directly exposed in the SDK but runs inside engines/alpha/.
Prompting technique: Research-derived structured reasoning queries that decompose complex conversational decisions into smaller, more reliably answered sub-questions — reducing model attention failures.