Skip to content

Docs

What is an AI Agent?

An AI agent is an assistant that can decide which tools to call, call them, observe the result, and pick a next step, in a loop, until the task is done. Less "answer my question." More "go do this and come back when you're finished."

Definition

"AI agent" is one of those terms that means slightly different things to different people. The useful working definition is the one most builders converge on:

An AI agent is a system in which a language model decides which tools to use, calls them, sees what comes back, and decides what to do next, until the task is finished or it asks for help.

Three ingredients: a model, a set of tools the model can call, and a loop that lets the model react to results instead of stopping after one reply.

How agents actually work

An agent's life is a loop. Every cycle looks roughly the same.

1. Plan

The model reads the task, the conversation so far, and the list of tools it can call. It picks a next action: call a tool, ask a question, or finish.

2. Act

If it chose a tool, the runtime executes the call. Search Hjarni. Run a shell command. Hit an API. Edit a file. Whatever the tool does.

3. Observe

The tool's result is pasted back into the conversation. The agent now knows something it didn't a second ago.

4. Repeat

Back to the top. Plan the next move with the new information. Stop when the goal is reached, when it gets stuck, or when it hits a budget you set.

This loop is the entire trick. Everything else (multi-agent setups, sub-agents, "deep research" modes) is some flavour of this pattern at a different scale.

Agent vs chatbot vs assistant

The terms blur, but the useful distinction is what the AI is allowed to do.

Reads context Calls tools Runs in a loop
ChatbotJust the promptNoNo
Assistant (eg. plain ChatGPT)Conversation historySometimes (one-shot)Not really
AgentConversation + tool resultsYes, repeatedlyYes, until done

The line isn't perfectly sharp. Modern ChatGPT with connectors enabled is somewhere between assistant and agent. But the question "does this thing run in a loop and take actions on my behalf?" is usually the one that matters.

Examples in the wild

  • Claude Code. A coding agent that runs in your terminal. It reads files, edits them, runs tests, and keeps going until the task is done.
  • Cursor agent mode. Same idea inside the editor. The model can search the repo, make multi-file edits, and run commands.
  • Windsurf Cascade, Cline, Aider, OpenClaw. Variations on the same coding-agent theme.
  • "Deep research" features. When ChatGPT or Claude goes off to browse the web for ten minutes and comes back with a report, that's an agent loop with browsing tools.
  • Computer use. Agents that operate a real computer (clicking, typing, taking screenshots) to complete tasks the way a person would.

Outside engineering, "agent" sometimes gets used for any chatbot. That's marketing. The technical sense (model + tools + loop) is the one worth keeping.

Agents and MCP

Agents need tools. Tools have to come from somewhere. MCP is the standard way to give an agent tools without writing custom integration code for every client.

An MCP server exposes tools. An agent's model reads the tool list, decides which to call, and the runtime makes the call over the protocol. Same wiring whether the agent is Claude Code, Cursor, ChatGPT with connectors, or something you wrote yourself.

If you've ever built an agent from scratch, you know the painful part is plumbing: auth, schemas, error handling for ten different services. MCP collapses that into one connector per server.

Where agents break

  • Context grows fast. Every tool call adds output to the conversation. Long agent runs hit the context window limit. Most agents have some form of compaction or summarisation to cope.
  • They forget between runs. Close the session and the agent starts the next task with no memory of what it just did. External memory (your notes, a knowledge base, a project file) is what bridges runs.
  • Loops can spiral. An agent that misreads an error can fix the wrong thing repeatedly. Budgets, step limits, and human checkpoints exist for this.
  • Tools are a permission surface. An agent that can edit your files, run shell commands, or send emails can do real damage if you give it the wrong scope. Treat the tool list as a privilege grant.

Agents and Hjarni

Hjarni is not an agent. Hjarni is the place an agent reads from and writes to.

In practice that looks like:

  • Claude Code searches Hjarni for the architecture note before editing a file
  • Cursor's agent reads the deployment runbook on its way to fixing a bug
  • A Claude Code Stop hook writes the session back to Hjarni as a growing note, so the next agent run has the previous one's notes available. See auto-capture Claude Code sessions

That last move is the one most teams miss. Agents that can read and write to a shared knowledge base get better between runs, not just within a single conversation.

Give your AI a memory

Common questions

FAQ

Is ChatGPT an AI agent?

Sometimes. A plain ChatGPT chat is closer to an assistant. ChatGPT with connectors enabled, deep research, or code interpreter looks more agentic: it calls tools and reacts to results. The line isn't sharp, but the loop-and-tools test is the useful one.

Is Claude Code an AI agent?

Yes. Claude Code is the canonical example: a coding agent that runs in a loop, reads and edits files, runs commands, and decides what to do next.

Are AI agents safe to let loose?

Treat the list of tools you give an agent as a privilege grant. An agent that can edit files, run shell commands, or send emails can cause real damage if scoped wrong. Most teams keep humans in the loop for irreversible actions.

Do agents have memory?

Within a single run, yes: the conversation and tool results are their working memory. Across runs, not by default. Persistent memory comes from an external store like a project file, a database, or a knowledge base such as Hjarni.

How is an agent different from an LLM?

An LLM is the underlying language model. An agent is the wrapper around the model: it gives the model tools, runs the loop, and decides when to stop. The same LLM can power a chatbot, an assistant, or an agent depending on what's wrapped around it.

Write once. You both remember.

Free to start. No credit card required.

Give your AI a memory

Works with Claude and ChatGPT today. Gemini coming soon.