DEV Community

Cover image for How to bring your Claude Code or Cursor agent into team chat
Pachca
Pachca

Posted on AI-assisted

How to bring your Claude Code or Cursor agent into team chat

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.

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.

Why a CLI and not a pile of docs

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.

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.

Step 1. Install the CLI

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

bash
npx -y @pachca/cli api ls --token YOUR_ACCESS_TOKEN

Or install it globally for everyday use:

bash
npm install -g @pachca/cli

Step 2. Sign in

On your own machine, sign in through the browser:

bash
pachca auth login

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.

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.

To check what access you have, run:

bash
pachca auth status

Step 3. Let the agent explore

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

bash
pachca api ls # list of endpoints
pachca api POST /messages --describe # parameters and body
pachca api POST /messages --docs # full reference

Typical first tasks:

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

For the last one, the agent might run something like:

bash
pachca messages create --entity-id 123 --content "Release 2.4 is live"

Step 4 (optional). Add skills

If you want your agent to know common workflows without exploring, add Agent Skills:

bash
npx skills add pachca/openapi

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.

Running the agent without you: CI and headless mode

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:

bash
PACHCA_TOKEN=$PACHCA_SECRET pachca messages create --entity-id 123 --content "Deploy finished" --no-input

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

Three habits that make this work well

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.

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.

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.

Where to go next

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.

Pachca is the messenger where people and AI agents get work done together.

Top comments (0)