# What's in a thread

Source: https://www.hyperagent.com/docs/concepts/threads/whats-in-a-thread

> For AI agents: the documentation index is at https://www.hyperagent.com/llms.txt and the complete documentation in one file at https://www.hyperagent.com/llms-full.txt. Any docs page is also served as Markdown by appending `.md` to its URL.

How a thread brings context, tools, connected apps, controls, and finished outputs together so an agent can complete a piece of work.

Ask an agent to turn customer notes into a renewal brief. It reads the files you attach, recalls the account context it already knows, checks the CRM, researches anything missing, analyzes the numbers, and drafts the finished document. You review the work, correct a date, and approve an action without leaving the conversation.

It gives the agent the context to understand the work, the capabilities to
act, and a place to return the finished output. It gives you the controls to
guide, approve, and inspect that work as it happens.

Bring in the request, files, agent instructions, saved knowledge, and live
data the work needs.

Research, browse, use connected apps, run code, and create with Hyperagent's
built-in tools.

Return documents, tables, webpages, slides, media, apps, and files with the
record of how they were made.

## Get the right context into the work [#get-the-right-context-into-the-work]

The thread starts with the request and gathers more context as the work develops. Some context arrives immediately; other material surfaces or gets fetched only when it becomes relevant.

Messages, uploaded files, and anything you @mention enter directly from the
composer.

A named agent brings the role and instructions that frame the job, plus the
boundary that determines which saved knowledge it can retrieve.

The conversation and [Thread Context
Document](https://www.hyperagent.com/docs/concepts/threads/thread-context) keep the current facts,
corrections, decisions, and plan connected to this job.

Search results, integration records, browser activity, documents, tables,
and tool output join the thread when the agent retrieves them.

The agent can reach more than it carries in the model's context window. See
[How context gets into a thread](https://www.hyperagent.com/docs/concepts/threads/loading-context) for
what arrives up front, what surfaces when relevant, and what is fetched on
demand.

## Take action with tools and connected apps [#take-action-with-tools-and-connected-apps]

Once the agent understands the job, it can act through built-in tools and the integrations available to the thread. Code execution is one part of that capability set, alongside research, browser work, connected apps, and creation tools.

Search the web, search past threads, and control a live browser on sites
that require navigation or an authenticated session.

Read and act in services such as Slack, a CRM, or a spreadsheet through the
integrations, credentials, and permissions available to the run.

Use Python, Node.js, and standard command-line tools in a private run
environment. Files written there persist across turns in this thread.

Build Documents, Tables, Slides, Webpages, HyperApps, Images, Video, Audio,
Avatar clips, Transcriptions, Maps, and files.

For every built-in capability, when to use it, and how tools differ from
integrations, see [Tools and integrations](https://www.hyperagent.com/docs/tools).

## Stay in control while the agent works [#stay-in-control-while-the-agent-works]

A thread remains interactive while the run is active. You can add information, handle protected actions, change direction, or adjust this conversation without changing the agent everywhere else.

**Bring the right material into the thread**

Upload files, @mention a document, table, skill, or memory, and point the
agent at exactly what it should read. You can also highlight text in a reply
or output and reference that passage in your next message. See [how context
gets into a thread](https://www.hyperagent.com/docs/concepts/threads/loading-context).



**Change direction without waiting for the turn to finish**

Send another message while the agent is working. Leave it in the queue, edit
it before it sends, or steer it into the active turn when it should change
what the agent is doing now.



**Keep protected actions in your hands**

Protected actions pause for your approval. A live browser session can also
be handed to you for a login or anything you would rather do yourself.
Built-in search and browser tools can reach the web as part of their job;
code asks before reaching a new domain.



A network grant applies only to this thread. Later requests to the same
domain can continue without asking again; another thread starts with its own
grants.

**End the run or branch from a decision point**

Correct the agent mid-run, Stop an active turn, or
Fork from here on any message to try a different direction.
See [run, stop, and fork](https://www.hyperagent.com/docs/concepts/threads/running).



**Tune this conversation without changing the agent**

Change the model, tools, or timeout for this conversation without touching
the agent's defaults, from [Thread
settings](https://www.hyperagent.com/docs/concepts/threads/thread-settings).



## Keep the output and the record behind it [#keep-the-output-and-the-record-behind-it]

The result does not disappear into the last message. The finished work, the visible history of the run, and the context needed to continue all remain attached to the thread.

Documents, tables, webpages, slides, images, media, apps, and saved files
appear as cards in the transcript and entries in the Library.

Messages, tool activity, approvals, corrections, and output cards remain in
order so you can inspect how the result was reached.

Working files persist across turns, and the Thread Context Document keeps
the facts and plan the agent needs to continue this thread.

A finished run may suggest a memory, skill, prompt improvement, or
configuration change. A suggestion is not lasting knowledge until its learning
mode allows it to be saved or you approve it. See [Suggestions and
auto-learning](https://www.hyperagent.com/docs/learning/manage-suggestions).



## Know the boundaries of a run [#know-the-boundaries-of-a-run]

60 minutes by default, adjustable from 10 minutes to 4 hours on the agent,
the thread, or per turn from the composer. The most specific choice wins.

By default a long thread compacts older messages when the context window is
nearly full; you can move the threshold as low as 50% or compact on demand.

100 MB in total. A larger source set needs to be split, compressed, or
shared by link.

The runtime latches on the thread's first run; after that the model picker
offers only compatible models for this conversation.

The controls for all four live in [Thread settings](https://www.hyperagent.com/docs/concepts/threads/thread-settings), with the full preset tables. Changes there apply to this conversation without changing the named agent's standing defaults.

## Go deeper [#go-deeper]







## FAQs [#faqs]

Because running code is part of how the agent works, not an optional add-on. It writes and runs code in the thread to analyze data, transform files, and assemble results, so execution is always available and has no on/off switch. The other tool groups are toggleable; this one isn't.

No. Network grants are per thread, so a domain you allowed here still prompts in a different thread. Within this thread, later requests to an allowed domain go through without asking again.

No. A run environment that has been sitting idle sleeps and takes a moment to wake on your next message, so the first reply can be a little slower than usual. Nothing is lost while it sleeps: your files and the run's state are still there once it's awake.

A working file stays in the thread's run environment so the agent can keep using it across turns. A saved output appears as a card in the transcript and in the Library, where you can find and reuse it later.
