AgentsSkills

info_gatherer

View as MarkdownOpen in Claude

Skill version of the InfoGathererAgent prefab. Collects answers to a configurable list of questions. Designed to be embedded within larger agents as a reusable capability.

Tools: start_questions, submit_answer (prefixed when using prefix parameter)

Requirements: None

Multi-instance: Yes (use prefix for unique tool names and state namespacing)

questions
list[dict]Required

List of question dictionaries with key_name, question_text, and optional confirm.

prefix
str

Prefix for tool names and state namespace. With prefix="intake", tools become intake_start_questions and intake_submit_answer, and state is stored under skill:intake in global_data.

completion_message
str

Message returned after all questions have been answered. Defaults to a built-in message prompting the agent to summarize the collected information.

from signalwire import AgentBase
class MyAgent(AgentBase):
def __init__(self):
super().__init__(name="assistant", route="/assistant")
self.set_prompt_text("You are a helpful assistant.")
# Two independent question sets on one agent
self.add_skill("info_gatherer", {
"prefix": "contact",
"questions": [
{"key_name": "name", "question_text": "What is your name?"},
{"key_name": "email", "question_text": "What is your email?", "confirm": True}
]
})
self.add_skill("info_gatherer", {
"prefix": "feedback",
"questions": [
{"key_name": "rating", "question_text": "How would you rate our service?"},
{"key_name": "comments", "question_text": "Any additional comments?"}
]
})
agent = MyAgent()
agent.serve()