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.

1from signalwire import AgentBase
2
3class MyAgent(AgentBase):
4 def __init__(self):
5 super().__init__(name="assistant", route="/assistant")
6 self.set_prompt_text("You are a helpful assistant.")
7 # Two independent question sets on one agent
8 self.add_skill("info_gatherer", {
9 "prefix": "contact",
10 "questions": [
11 {"key_name": "name", "question_text": "What is your name?"},
12 {"key_name": "email", "question_text": "What is your email?", "confirm": True}
13 ]
14 })
15
16 self.add_skill("info_gatherer", {
17 "prefix": "feedback",
18 "questions": [
19 {"key_name": "rating", "question_text": "How would you rate our service?"},
20 {"key_name": "comments", "question_text": "Any additional comments?"}
21 ]
22 })
23
24agent = MyAgent()
25agent.serve()