<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Pachca</title>
    <description>The latest articles on DEV Community by Pachca (@pachcamessenger).</description>
    <link>https://dev.to/pachcamessenger</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4194256%2F44bc1eb9-5302-4ebd-bf2c-731aefa7291f.png</url>
      <title>DEV Community: Pachca</title>
      <link>https://dev.to/pachcamessenger</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/pachcamessenger"/>
    <language>en</language>
    <item>
      <title>Our AI agent lives in team chat. These 4 guardrails keep it from running wild</title>
      <dc:creator>Pachca</dc:creator>
      <pubDate>Tue, 20 Oct 2026 15:53:43 +0000</pubDate>
      <link>https://dev.to/pachcamessenger/our-ai-agent-lives-in-team-chat-these-4-guardrails-keep-it-from-running-wild-1ldh</link>
      <guid>https://dev.to/pachcamessenger/our-ai-agent-lives-in-team-chat-these-4-guardrails-keep-it-from-running-wild-1ldh</guid>
      <description>&lt;p&gt;Most AI agents live in their own window. You open it, explain the context, copy in the bug report, paste the answer back somewhere else.&lt;/p&gt;

&lt;p&gt;At Pachca we build a team chat app, so we tried the opposite: an agent that lives where the work is already being discussed. Someone @mentions it in a thread, and it reads the conversation, picks the tools it needs, does the work and replies in the same thread.&lt;/p&gt;

&lt;p&gt;Here's how it's put together, and the guardrails we added so that a program with tools and API tokens can be trusted in a room full of people.&lt;/p&gt;

&lt;h2&gt;
  
  
  What it actually does
&lt;/h2&gt;

&lt;p&gt;A normal chatbot answers. This agent chooses tools and runs a chain of actions before replying. The jobs it gets most:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;A task from a discussion.&lt;/strong&gt; It reads the thread, writes a title, description and priority, creates the task in the tracker and links back to the thread.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;"Why did the build fail?"&lt;/strong&gt; Asked in a PR thread, it checks the CI status, reads the logs and may suggest a fix.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;File analysis.&lt;/strong&gt; It fetches a file from the repository or a web page, explains the code, points out problems and suggests improvements.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Company research for sales.&lt;/strong&gt; Given a company name, it finds the website, estimates the team size and posts a structured report in the thread.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Each of these used to take a handful of manual steps. Now it's one mention in the conversation where the question came up.&lt;/p&gt;

&lt;h2&gt;
  
  
  Threads are the unit of work
&lt;/h2&gt;

&lt;p&gt;Every thread is a separate conversation for the agent. It doesn't mix up a bug discussion with a release discussion, several agent conversations can run in one channel at the same time, and the main channel stays clean.&lt;/p&gt;

&lt;p&gt;Threads also handle the hand-off to people. In Pachca you can @mention someone in a thread even if they aren't in the original chat, and they see the full history. So when the agent finds that failing tests trace back to a change in the auth module, it can tag the developer from another team, and that person gets the whole context from one notification.&lt;/p&gt;

&lt;h2&gt;
  
  
  The loop
&lt;/h2&gt;

&lt;p&gt;The architecture is deliberately simple:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Webhook in.&lt;/strong&gt; Pachca sends an event for every message. The agent checks the HMAC-SHA256 signature and acts only when it's mentioned or someone replies to it. Everything else is skipped silently.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Prompt assembled per call.&lt;/strong&gt; System instructions and tool descriptions, the relevant skills, the last 20 messages of the thread, the message the thread started from, and the user's personal settings such as language or default tags.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Tool loop.&lt;/strong&gt; The model calls tools it chooses itself: the messenger API, the task tracker, version control (read files, commit, open pull requests) and web search. It isn't a fixed pipeline.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Replies through the API.&lt;/strong&gt; The agent posts its messages itself instead of returning them in the webhook response. That lets it send more than one message, pick a thread, and put an animated "thinking" reaction on the message while it works.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Behavior lives in Markdown, not code
&lt;/h2&gt;

&lt;p&gt;What the agent knows how to do is described in skill files: plain Markdown with the available actions, required fields, naming rules and example requests. A tracker skill, for example, tells it how tasks should be titled and which fields can't be empty.&lt;/p&gt;

&lt;p&gt;It keeps iteration cheap. A new skill needs no code change. Each organization can have its own skills. And when the agent does something wrong, fixing the text of the skill is often enough.&lt;/p&gt;

&lt;h2&gt;
  
  
  The 4 guardrails
&lt;/h2&gt;

&lt;p&gt;An agent with tools and tokens can also do the wrong thing very fast, or the same thing forever. These limits are what keep it predictable:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Guardrail&lt;/th&gt;
&lt;th&gt;Limit&lt;/th&gt;
&lt;th&gt;What it prevents&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Cooldown&lt;/td&gt;
&lt;td&gt;No new run in a thread within 5 seconds of the last one&lt;/td&gt;
&lt;td&gt;Double triggers and ping-pong between messages&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Step limit&lt;/td&gt;
&lt;td&gt;15 tool calls, then it stops and reports an error&lt;/td&gt;
&lt;td&gt;Endless tool loops&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Timeout&lt;/td&gt;
&lt;td&gt;5 minutes for the whole run&lt;/td&gt;
&lt;td&gt;Runs that hang and hold resources&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;No monologues&lt;/td&gt;
&lt;td&gt;At most two messages in a row without a human reply&lt;/td&gt;
&lt;td&gt;An agent talking to itself in a channel people read&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;And two boundaries on access:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;It sees only where it was called.&lt;/strong&gt; The agent sees the thread or chat it was mentioned in, not other channels. Confidential discussions elsewhere stay out of its view.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Each organization decides what it can reach.&lt;/strong&gt; The tracker and Git are connected through API tokens per organization. One agent instance can serve several organizations, each with its own token, webhook signing secret and integrations, with no data overlap.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What we'd tell anyone building something similar
&lt;/h2&gt;

&lt;p&gt;Put the agent where the context already is, make the thread its unit of work, keep behavior in editable text, and decide the limits before the first run, not after the first incident. The model matters, but in our experience what goes into the prompt decides most of the quality.&lt;/p&gt;

&lt;p&gt;Next on our list are proactive features: weekly digests of key decisions, warnings about risks in open tasks, and reminders about forgotten pull requests and pending reviews.&lt;/p&gt;

&lt;p&gt;I'm curious how others handle this: &lt;strong&gt;what limits do you put on an agent that can act inside a shared space?&lt;/strong&gt; Step caps, timeouts, human approval, something else?&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Pachca is the messenger where people and AI agents get work done together. Developer docs for agents are at &lt;a href="https://dev.pachca.com/guides/ai-agents/overview" rel="noopener noreferrer"&gt;dev.pachca.com&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>agents</category>
      <category>security</category>
      <category>discuss</category>
    </item>
    <item>
      <title>How to bring your Claude Code or Cursor agent into team chat</title>
      <dc:creator>Pachca</dc:creator>
      <pubDate>Mon, 19 Oct 2026 13:48:05 +0000</pubDate>
      <link>https://dev.to/pachcamessenger/how-to-bring-your-claude-code-or-cursor-agent-into-team-chat-2j4f</link>
      <guid>https://dev.to/pachcamessenger/how-to-bring-your-claude-code-or-cursor-agent-into-team-chat-2j4f</guid>
      <description>&lt;p&gt;Coding agents have become good at reading code, running commands and opening pull requests. But most of the context they need doesn't live in the repository. It lives in team chat: the bug report from support, the decision in a thread last Tuesday, the release checklist pinned in a channel.&lt;/p&gt;

&lt;p&gt;This guide shows how to give a coding agent on your machine (Claude Code, Cursor, Codex or any agent with shell access) access to team chat, using Pachca as the example. The whole setup takes a few minutes.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why a CLI and not a pile of docs
&lt;/h2&gt;

&lt;p&gt;There are two ways to teach an agent a new API. You can load the documentation into its context, or you can give it a tool it can explore on its own.&lt;/p&gt;

&lt;p&gt;The first approach is quick for one-off tasks. Pachca, for example, publishes an llms.txt file, so you can drop one link into a prompt and the agent will figure out the API. For regular work, though, documentation eats the context window. A CLI solves this: the agent discovers commands through --help and loads only what the current task needs. That's why Pachca's docs recommend the CLI as the main path for agents.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 1. Install the CLI&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The Pachca CLI needs Node.js 20 or later. You can run it without installing, which works well for agents with temporary environments:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;bash&lt;br&gt;
npx -y @pachca/cli api ls --token YOUR_ACCESS_TOKEN&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Or install it globally for everyday use:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;bash&lt;br&gt;
npm install -g @pachca/cli&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 2. Sign in&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;On your own machine, sign in through the browser:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;bash&lt;br&gt;
pachca auth login&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;The CLI shows a confirmation code, copies it to the clipboard and opens the browser. You confirm access in Pachca, and the terminal shows who you're signed in as. The token from this login lasts an hour and renews itself before each command. If several agent processes run in parallel, only one of them refreshes the token while the others wait.&lt;/p&gt;

&lt;p&gt;The token goes into your operating system's keychain, not a plain file. That matters with agents: code running under your account (postinstall scripts, editor extensions, other agents) can read files in your home folder.&lt;/p&gt;

&lt;p&gt;To check what access you have, run:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;bash&lt;br&gt;
pachca auth status&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 3. Let the agent explore&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Now ask your agent to do something real. It doesn't need instructions on the API, because it can look things up itself:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;bash&lt;br&gt;
pachca api ls                         # list of endpoints&lt;br&gt;
pachca api POST /messages --describe  # parameters and body&lt;br&gt;
pachca api POST /messages --docs      # full reference&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Typical first tasks:&lt;/p&gt;

&lt;p&gt;"Read the last 50 messages in the bug reports chat and group them by feature."&lt;br&gt;
"Find the thread about the payment timeout and summarize what we decided."&lt;br&gt;
"Post a short release note to the releases channel when the tests pass."&lt;/p&gt;

&lt;p&gt;For the last one, the agent might run something like:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;bash&lt;br&gt;
pachca messages create --entity-id 123 --content "Release 2.4 is live"&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 4 (optional). Add skills&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If you want your agent to know common workflows without exploring, add Agent Skills:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;bash&lt;br&gt;
npx skills add pachca/openapi&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;The command detects installed agents and connects the skills. Each skill covers one area of the API (messages, chats, tasks, search, bots, forms) with a quick start, step-by-step workflows with CLI commands, and the area's limits. They work with 40+ AI agents.&lt;/p&gt;

&lt;p&gt;Running the agent without you: CI and headless mode&lt;/p&gt;

&lt;p&gt;Browser login needs a person at the terminal. For CI pipelines, scripts and agents that run on their own, create a token in Pachca in advance and pass it through an environment variable from your secrets:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;bash&lt;br&gt;
PACHCA_TOKEN=$PACHCA_SECRET pachca messages create --entity-id 123 --content "Deploy finished" --no-input&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Nothing is written to disk this way. For agents that act without an employee, the docs suggest a bot token with minimal permissions.&lt;/p&gt;

&lt;p&gt;Three habits that make this work well&lt;/p&gt;

&lt;p&gt;Let the agent draft, not send, when the stakes are high. In Pachca, an agent can put a message into your input field as a draft, and you review and send it yourself. Drafts work with a personal token.&lt;/p&gt;

&lt;p&gt;Ask for reports as Markdown files. Pachca renders .md attachments as formatted cards with tables, checklists, code highlighting and Mermaid diagrams, so a long code review or incident summary stays readable in chat.&lt;/p&gt;

&lt;p&gt;Keep the agent's work in threads. A thread gives the agent the full context of one discussion and keeps its replies out of the main channel. Teammates can follow along and correct course early.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where to go next
&lt;/h2&gt;

&lt;p&gt;Once your personal agent works with chat, the next step is often a team agent: one that lives in a channel, is @mentioned by anyone, and replies in the thread. In Pachca, that's a bot that receives messages through an outgoing webhook and answers with its own token. The developer docs at dev.pachca.com walk through it step by step.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Pachca is the messenger where people and AI agents get work done together.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>cli</category>
      <category>tutorial</category>
    </item>
  </channel>
</rss>
