# Find everything an agent did

An agent ran a task overnight and something changed that should not have, or
you just want to know what it touched. Every call an agent makes through
swarmvia is logged with its [session](/docs/sessions), so you can follow one
task across every source from one page.

## 1. Find the session

1. Open **Sessions**.
2. Narrow the list: pick the **Agent**, the **Source** it used, or the day it
   **Started**. If the agent gave its task a purpose, search for a word from
   it.
3. Look at the **Calls** column, where shown: how many calls each session
   made, and how many were refused or wrote data.

Sessions that read **No purpose given** start with a call to a proxied MCP
server's own tool (such as `linear_create_issue`), or to `get_query_result`,
which can't take a purpose. The agent's other calls in the next 30 minutes join that session.
Each covers one stretch of work with no more than 30 minutes between calls.

If you started from a log line instead, open it on the source's **Logs** tab
and click **View agent session**.

## 2. Read what it did

The session's page shows:

- **Sources:** each source it used, with its calls, refused calls, errors and
  writes where call counts are shown. Start with the sources that have
  writes or refusals.
- **Timeline:** every call on every source, newest first. A refused call reads
  *blocked IP*, *auth failed*, *denied by source policy* or *denied by
  database*, or shows `deny` under **Policy**. A write is any method other
  than `GET`, `HEAD` or `OPTIONS`.

Click **Logs** next to a source for its full entries, filtered to the
session: caller IP, the key, and the statement of a database query.

## 3. Stop it if it is still running

If the session is still open and should not be, click **Revoke session**.
Every key it holds stops working on every source at once, and it cannot get
new ones. The agent can start a new session only if it still has access, so
to cut it off for good, disconnect it under **Settings → Connected agents**
(for an MCP agent) or revoke its token under **Organization settings → API
tokens** (for a script).

To narrow what it can do instead, see
[Narrow a source to the calls it needs](/docs/knowledge-base/narrow-source-policy).

## Make the next one easier to read

Ask agents to start each task with a purpose. Add this to the project's
`AGENTS.md` or `CLAUDE.md`:

```text
Before a task, call start_session with its purpose in one sentence, and pass
the session_id to the swarmvia source tools. Call end_session when it is done.
```

## What you will not find

- Calls older than your plan's log retention. The session stays listed, but
  its timeline only goes back as far as your logs.
- Calls on sources you cannot see. They are counted, not shown. Ask an owner
  or admin.
- Anything the agent did outside swarmvia, with credentials of its own.
