Dynamic Configuration (Metadata)
Dynamic Configuration (Metadata)
SIPHON supports configuring an agent per call.
This is useful when:
- You want one worker to handle multiple “personalities” (different prompts)
- You want to inject
llm/stt/ttsat call time - You want a worker to run with minimal defaults (or none), and rely on routing metadata
How it works
When a call job is dispatched, SIPHON reads job metadata JSON.
SIPHON forwards per-call overrides to the agent worker through call metadata.
Agent name must match
agent_name used in Dispatch(...) / Call(...) must match the name of the worker you run:
from siphon.agent import Agent
agent = Agent(agent_name="CustomerSupport")
agent.dev()
If the names don’t match, the call won’t be routed to your running worker.
What the worker expects
SIPHON forwards agent overrides under:
agent_config
Inside agent_config, SIPHON supports:
llmsttttssystem_instructionsgreeting_instructions
When these keys are present, the worker uses them for that call.
You typically do not construct agent_config yourself. Instead, you pass llm, stt, tts, and instructions into Dispatch(...) / Call(...) and SIPHON serializes them into metadata automatically.
Other metadata
In addition to agent_config, SIPHON may include call context fields in the metadata (for example, phone numbers). You can also attach your own custom metadata for tools or downstream integrations.
Inbound: Dispatch metadata
import os
from dotenv import load_dotenv
from siphon.telephony.inbound import Dispatch
from siphon.plugins import openai, cartesia, deepgram
load_dotenv() # Load environment variables from .env file
llm = openai.LLM()
tts = cartesia.TTS()
stt = deepgram.STT()
dispatch = Dispatch(
dispatch_name="customer-support",
agent_name="CustomerSupport",
sip_trunk_id=os.getenv("SIP_TRUNK_ID"),
llm=llm,
stt=stt,
tts=tts,
system_instructions="You are a helpful support agent.",
greeting_instructions="Thanks for calling. How can I help?",
)
# Synchronous wrapper
dispatch.agent()
Learn more about inbound calling:
Outbound: Call metadata
import os
from dotenv import load_dotenv
from siphon.telephony.outbound import Call
from siphon.plugins import openai, cartesia, deepgram
load_dotenv() # Load environment variables from .env file
llm = openai.LLM()
tts = cartesia.TTS()
stt = deepgram.STT()
call = Call(
agent_name="CustomerSupport",
sip_trunk_id=os.getenv("SIP_TRUNK_ID"),
number_to_call_from=os.getenv("FROM_NUMBER"),
number_to_call="+15550002",
llm=llm,
stt=stt,
tts=tts,
system_instructions="You are calling a customer to remind them of an appointment.",
)
call.start()
Learn more about outbound calling:
Important
A worker can be running with no default llm/stt/tts, and still work as long as the call metadata supplies them.