team-plain/example-internal-agents holds two working agents.
Both answer users in discussions, receive webhooks on a local endpoint, and gate the one action a customer would see behind an approval. They differ in how much of the agent loop they hand to a framework.
The tools
Both agents give the model the same 5 tools, each a call on Plain’s API:list_thread_queueandsearch_threads: find a thread when the discussion wasn’t opened on oneread_customer_thread: paginatestimelineEntriesand concatenatesllmText, as in read the threadsearch_knowledge: callssearchKnowledgeSources, as in using knowledgereply_to_customer: reports the tool call, asks for approval, waits for the decision, then callsreplyToThread

