AI Agents in Practice • Henrik Kniberg • GOTO 2025

Henrik Kniberg shares practical experiences from over two years of AI agent development, defining agents as autonomous entities with missions, tools, and an LLM brain. He covers effective design patterns, architectural insights, and safety considerations, emphasizing the importance of human-in-the-loop collaboration and iterative development to build agents that are not just powerful, but genuinely useful in real-world scenarios.

5 min read
AI Agents in Practice • Henrik Kniberg • GOTO 2025
source: https://www.youtube.com/watch?v=R7Dv2h3tYCU

The future of work is rapidly moving towards a world where AI agents are colleagues, collaborating with humans to accomplish tasks. An AI agent can be defined as an autonomous digital entity that uses a Large Language Model (LLM) as its brain, has a specific mission beyond just responding to a chat, and is equipped with tools to interact with the world and perform its job. This includes the ability to act on its own accord, such as reacting to events or running on a schedule. The guiding metaphor for understanding them is to think of them as an “intern with superpowers and some very strange limitations”.

The Core Components of an Agent Platform

An effective agent platform requires several key components:

  • An “Office”: A place for the agents to live and operate.
  • Instructions: A clear definition of the agent’s job and mission. In modern platforms, this can be collaboratively defined through a conversation with the agent itself, which then writes its own instructions for human review.
  • Capabilities & Tools: Integrations with other systems (like GitHub, Slack, email, or databases) that allow the agent to perceive and act upon the world.
  • Memory & Knowledge: Access to documents and data to inform its decisions.
  • Autonomy Triggers: Mechanisms for the agent to act proactively, such as schedulers (e.g., “run every Friday at noon”) or event listeners (e.g., “act upon receiving an email”).
  • Logging: A transparent record of the agent’s actions and reasoning, which is crucial for debugging and monitoring.

Identifying the Right Use Cases for Agents

Agents are not a one-size-fits-all solution. They occupy a unique space between predictable, fast, but unintelligent code, and intelligent, but slower and less predictable humans.

Agents are slower than code but faster than humans. They are less predictable than code but usually more predictable than humans. They are more intelligent than code but generally less intelligent than humans, except for some tasks where they greatly outperform us.

The ideal tasks for agents are those that are:

  1. Time-consuming.
  2. Perceived as not a good use of a human’s time.
  3. Require only a moderate level of intelligence and are not overly complex.

This is the sweet spot where automation provides the most value. On a predictability scale, if a task is 100% predictable, you should write code. If it’s highly unpredictable and requires deep human intuition (like coaching a team), it’s a human’s job. Agents excel in the “mostly predictable” and “somewhat predictable” space, either driving the work with human oversight or supporting a human who is driving the work.

A powerful real-world example is an agent built for an investment company to screen thousands of potential investment targets. The agent was tasked with researching companies, analyzing their financials and web presence, and bucketing them into “Yes,” “Maybe,” or “No” categories. The initial goal was to save time, but surprisingly, the agent produced better and more reliable results than the human analysts. This wasn’t because it was “smarter,” but because it was more patient, thorough, and consistent, free from human biases like fatigue on a Friday afternoon.

Architectural Pattern: Content and Tools are King

A critical lesson in building scalable and effective agents is to move away from feeding large, unstructured context directly to the LLM. This approach is expensive, slow, and unreliable at scale.

A much better pattern involves:

  1. Structuring the Data: Convert unstructured data (like a large spreadsheet or CSV) into a structured format like JSON, stored in a database that the agent can access.
  2. Providing Tools, Not Data: Instead of passing the entire dataset in the prompt, give the agent tools (e.g., CRUD functions) to query the database.
  3. Agent-Driven Data Retrieval: The agent, guided by the user’s request, uses the tools to retrieve only the specific slice of data it needs to reason about.

For a complex scheduling agent, this meant instead of passing a 1400-cell spreadsheet to the LLM, the agent was given functions like find_person_by_shift. This approach resulted in agents that were smarter, faster, and cheaper, using a fraction of the tokens while performing more complex analysis.

A fascinating extension of this is allowing the agent to write its own tools and apps. For instance, an agent can write a script to import and transform data from a spreadsheet into its structured database, or create a simple web app to allow a human collaborator to view and edit the data it manages.

Agent Design, Safety, and Collaboration

Building a robust agent is an iterative, collaborative process.

  • Human in the Loop: The most successful agents work with humans, not just for them. They share a workspace (like Slack or a custom app) and a common goal, with a clear division of labor. The agent does the heavy lifting, but a human provides oversight, feedback, and final approval.
  • Iterate Like Agile: You won’t get the agent right on the first try. Start simple and iterate continuously, refining the prompts, tools, and knowledge base based on real-world performance.
  • Safety is Paramount: The power of an agent is determined by its job scope and its toolset. A simple agent with a narrow task and few tools is low-risk. A highly autonomous agent with many powerful tools (e.g., can edit databases and send emails) is high-risk and requires more guardrails, better models, extensive testing, and close monitoring.
  • Consider Agent Teams: Instead of building one monolithic agent that does everything, consider a team of specialized agents that collaborate. Each agent can be an expert at a specific task, making the overall system easier to test, manage, and debug.

The Future: Agents That Build Their Own Tools

We are entering a phase where agents can dynamically create their own tools to solve novel problems. By providing an agent with a general-purpose tool like an HTTPRequest function, it can learn to interact with virtually any API on the fly. In one example, an agent, asked to display a map, used the HTTP tool to:

  1. Find the address of the location using a search API.
  2. Call the OpenStreetMap API to get coordinates.
  3. Write JavaScript code using the Leaflet.js library to render the map with tiles.

This demonstrates a future where agents are not limited by their pre-programmed tools but can actively extend their own capabilities to meet the demands of the task at hand.

Share post

Stay In The Loop! Subscribe to Our Newsletter.

Get updates straight to your inbox. No spam, just useful content.

Recommended for You

When Agents Learn to Feel: Multi-Modal Affective Computing in Production // Chenyu Zhang

When Agents Learn to Feel: Multi-Modal Affective Computing in Production // Chenyu Zhang

This talk explores the frontier of affective computing in AI agents, proposing a new architecture where emotion is a first-class component. It covers the technical challenges of deploying multi-modal, emotion-aware systems in production—from memory and learning to multi-agent orchestration—and delves into the critical ethical considerations of privacy, manipulation, and scientific validity.

Lessons from 25 Trillion Tokens — Scaling AI-Assisted Development at Kilo

Lessons from 25 Trillion Tokens — Scaling AI-Assisted Development at Kilo

Scott Breitenother, CEO of Kilo, discusses the evolution of software development, where engineers are shifting from writing code to orchestrating AI agents. He shares lessons from processing 25 trillion tokens, emphasizing the critical role of trust, the importance of end-to-end ownership, and how this new paradigm leads to a 10x increase in shipping velocity.