All fields are required
Every prompt tweak is a live experiment on real callers. Declarative agents are state machines you can test, diff, version, and deploy through CI/CD.
A 2,000-word prompt blob has no defined interface, no isolation boundary, and no deterministic behavior. Every deployment is a bet.
Someone changed the prompt. The diff shows 47 lines of modified prose. What behavior changed? Nobody knows until a caller reports it.
The agent broke after the last update. The old version is somewhere in a dashboard, a Slack message, or a Google Doc. Good luck.
A regulated industry auditor asks: which instructions were active during this call? With a monolithic prompt, the answer is all of them. Or none. Depends on the model's mood.
from signalwire_agents import AgentBase
from signalwire_agents.core.function_result import SwaigFunctionResult
class SupportAgent(AgentBase):
def __init__(self):
super().__init__(name="Support Agent", route="/support")
self.prompt_add_section("Instructions",
body="You are a customer support agent. "
"Greet the caller and resolve their issue.")
self.add_language("English", "en-US", "rime.spore:mistv2")
@AgentBase.tool(name="check_order")
def check_order(self, order_id: str):
"""Check the status of a customer order.
Args:
order_id: The order ID to look up
"""
return SwaigFunctionResult(f"Order {order_id}: shipped, ETA April 2nd")
agent = SupportAgent()
agent.run()
| Capability | Prompt Blob | Declarative Agent |
|---|---|---|
| Version control | Blob in a dashboard | Structured artifact in git |
| Diff between versions | Manual prose comparison | git diff |
| Code review | Read a 2,000-word prompt | Review a step change |
| Unit testing | Not possible (probabilistic) | Step-level isolation |
| Integration testing | Manual QA calls | Automated conversation simulation |
| Regression testing | Hope nothing broke | CI/CD pipeline on every push |
| Rollback | Find the old prompt somewhere | git revert |
| Audit trail | What was the prompt on March 3rd? | git log |
| A/B testing | Two prompt blobs, no metrics | Two versioned configs, metrics per version |
The change is clear: a new tool was added to the authenticated step. Reviewers evaluate whether the tool belongs in this step and whether transitions still make sense.
- name: authenticated
prompt: "Help the customer with their account."
- tools: [check_balance, update_address]
+ tools: [check_balance, update_address, schedule_service]
transitions:
farewell: "Issue resolved"
Write agent definitions in YAML or generate them from the Python SDK. Both produce structured, versionable artifacts.
Test tool availability, transition rules, and conversation flows. Each step is an isolated unit with deterministic boundaries.
Agent changes go through code review. Structured diffs make it clear what behavior changed and why.
Validate, test, and deploy through your existing pipeline. No manual dashboard updates. No copy-paste into a web form.
Yes. Agent definitions are files in your repository. They go through the same pipeline as application code: commit, review, test, merge, deploy.
You test the structure, not the prose. Each step has defined tools and transitions. The model handles natural language within bounded constraints that your tests verify.
Deploy two versioned configurations. Route a percentage of calls to each version. Compare metrics per version: resolution rate, handle time, transfer rate, customer satisfaction.
YAML agents validate schema and structure. SDK agents add Python testing tools: IDE support, debuggers, mock frameworks. Both produce testable, diffable artifacts.
Trusted by 2,000+ companies
Version control, CI/CD, and automated testing for every AI agent you deploy.