Agent harness · Long jobs

Agents that finish whole office jobs. Up to an hour per job.

One agent, one folder, up to an hour. It reads 150 emails and comes back with the renewal list, checking its own work as it goes. Built for operators who want agents to finish real office work.

1 hour
of work in one session
100
model calls in one session
Your folder
files in, finished files out

What long mode is

Long mode is the setting that lets a Harny agent finish a whole job, not answer one request.

A standard agent run is built for a question or an action: a few steps and about a minute and a half. Long mode keeps the same agent and gives it a folder to work in, a to-do list, and up to an hour a session. It reads the material, writes its results to files and carries on until the list is done.

Today6 steps or 90 secondsThen the run stops, finished or not.
Long modeUp to an hour on the whole jobUp to 100 steps a session, resumed until done.

Jobs it finishes

Real office work, sized by what goes in and what comes back.

150 tenant emails

Renewal list

Reads every email from the quarter and works out who is renewing, who is at risk and what each tenant is waiting on.

ReturnsA renewal list and a one-page summary.

120 emails

Lease reminders

Finds the leases that end within 45 days in a mailbox of 120 emails and writes the reminder each one needs.

ReturnsThe 38 leases ending soon, and a reminder for each.

120 maintenance requests

Maintenance triage

Reads every request, sorts it by kind and urgency, and picks out the emergencies that cannot wait.

ReturnsA sorted worklist, emergencies first and flagged to book.

25 leases

Clause audit

Reads every lease end to end and pulls out the three clauses you care about.

ReturnsThe pet rule, the late fee and the notice period, quoted from each lease.

180 invoices

Invoice matching

Matches 180 invoices to 150 payments, including part payments and wrong references.

ReturnsEach invoice marked paid, partly paid, unpaid or overpaid, with duplicates flagged.

Your job here

If it is a pile of files and the answer is a file, it fits. Describe the job in one message.

Get API key

How it works

  1. 1

    Hand it the job

    Say the job in one sentence and give the agent a folder with the material: the emails, the leases, the ledger.

  2. 2

    It works in the background

    It keeps its own to-do list and reads and writes files in your folder, for up to an hour a session. Old results are squeezed as the context grows.

  3. 3

    It checks its own work

    A job is not finished until every item on that to-do list is done. If something is left open, the next session picks it up from the notes and files.

  4. 4

    It returns the finished files

    The result is a file you can open, not a chat reply: a list, a table, a set of drafts. A hand-over note says what was done.

Default settingStandard runLong mode
Model calls in one run6100
Time in one run90 seconds1 hour
Room for one reply4,096 tokens16,384 tokens
Token cap for one run100,0005,000,000
Works inChatA folder you provide
Picks up where it stoppedNoYes, from its saved notes
Old results as the context growsKept as they areSqueezed
If the model failsThe run failsA backup model takes over
Model and keyYour own keyYour own key
Hands backA replyFinished files

When to use it

A good fit

  • The job is a pile: dozens to hundreds of emails, leases, requests or invoices.
  • The answer is a file: a report, a table, a set of drafts.
  • Every item needs the same care, and nobody has to watch it happen.
  • You would hand it to a new hire with a folder and a clear brief.

Use a standard run instead

  • One question, one lookup or one action. A standard run answers in seconds.
  • A person has to approve every step as it happens.
  • The material is not written down anywhere the agent can read.

Turn it on

Add LongTaskConfig to your agent, then call run_task with one message. The folder holds the material, the notes and the finished files.

Documentation

from harny import HarnyClient
from harny.agent import Agent, AgentConfig
from harny.agent.long_task import LongTaskConfig

async with HarnyClient(api_key="fsa_...") as harny:
    agent = await Agent.create(
        harny=harny,
        preset="cost_first",
        config=AgentConfig(
            instructions="You work through office jobs and return finished files.",
            long_task=LongTaskConfig(
                workspace="./jobs/renewals",   # the folder it works in
                max_steps=100,                 # model calls in one run
                turn_timeout_s=3600,           # one hour
            ),
        ),
    )
    task = await agent.run_task(
        user="user-123",
        message="Read the 150 emails in emails/ and write a renewal report.",
    )
    print(task.finished, task.answer)

Frequently asked questions

01What model runs it?

The one on your own key, from the preset you pick. Harny chooses none. If a provider fails, the run moves to the next model of that preset you hold a key for.

02What may it do without asking?

Read and write files in its own folder. Anything beyond that, such as sending a message or acting in another system, goes through the actions you allow it. An action you have not allowed waits for your yes.

03When is a person needed?

When the agent reaches an action that needs your yes, that action waits for you and the rest of the job carries on. Material it cannot read, or a choice only you can make, goes in its hand-over note.

04What does it cost?

Your model's bill. Harny meters your users, not your model calls. Each run has a token cap you set, and when it is reached the agent stops and writes a hand-over note of what is done and what is left.

05How do I turn it on?

Add a long-task setting to your agent and call run_task with one message. It is off until you set it. The code is above.

06Where is the record?

In the folder. Each session leaves a note of what was done and what is left, and the finished files are listed as delivered. Call run_task again with the same message to resume.

Hand it the whole job.

The first 500 monthly-active end users are free for good. Create an app key and give your agent its first folder.