← All articles
    Engineering7 min read

    How AI agents use tools, memory, and context to get work done

    Agents don't know anything unless you give them tools, memory, and context. Here's how those three pieces work together.

    How AI agents use tools, memory, and context to get work done

    An AI agent sitting alone with nothing to interact with is useless. It can think but can't act. It can't change data, send messages, or make decisions based on information it needs to look up.

    Three things make an agent functional: tools, memory, and context.

    Tools are how the agent affects the world. Memory is how it remembers what it learned. Context is what it knows about the current situation.

    Tools: what the agent can do

    A tool is an interface to a system. A database API. An email service. A calendar. A payment processor. Anything the agent needs to interact with.

    When you build an agent, you teach it what tools it has. "You can look up a customer record. You can send an email. You can update the billing system. You can check inventory."

    The agent learns which tool fits which job. A request comes in about an address change. The agent knows it needs to use the customer database tool to look up the record, then update the address, then the email tool to send a confirmation.

    This is different from RPA, which is scripted step-by-step. The agent evaluates the request and picks the tool. If a new tool becomes available, the agent can learn to use it without rewriting everything.

    Tools have constraints. Some require authorization. Some have rate limits. Some are slow. A smart agent knows these constraints and plans accordingly.

    An agent without tools is trapped in the conversation. With tools, it can actually change things.

    Memory: what the agent remembers

    An agent needs to remember things across conversations. It needs to know what happened with a customer in the past. It needs to recall decisions it made yesterday and why.

    Memory comes in layers.

    Session memory is what the agent knows during a single conversation. "In this call, the customer said they moved last month." The agent remembers that for the duration of the call.

    Long-term memory is what the agent knows across conversations. "This customer has called three times with billing issues. The last issue wasn't resolved." The agent uses that history to make better decisions about the current request.

    Organizational memory is what the agent knows about patterns and rules. "Customers who have three billing issues usually need to be escalated to a manager." The agent learns these patterns and uses them.

    Without memory, the agent would repeat the same mistakes. It would ask the customer for information they already provided yesterday. It would escalate a problem that it solved for this customer before. It would be tedious.

    Building memory means logging what the agent learns and making it searchable. The agent needs to be able to query "Has this customer had problems like this before?" or "What happened last time this type of request came in?"

    Context: what the agent knows right now

    Context is the information the agent has about the current situation. The customer's account. The request. The relevant history. The applicable policies.

    Before the agent makes a decision, you give it context. "Here's what the customer asked for. Here's their account. Here's the policy that applies. What should we do?"

    Good systems pre-load context so the agent doesn't have to ask. Slow context loading wastes time. The agent is waiting for information it needs to decide.

    Different decisions need different context. An agent handling an appointment only needs the calendar and the customer's availability. An agent handling a refund needs the transaction history, the refund policy, and any past disputes with that customer.

    Smart agent design means loading context intelligently. Load what you know the agent will need. Let the agent request additional context if it gets stuck.

    How they work together

    Imagine a customer calls with a billing issue. Here's how tools, memory, and context interact.

    The agent gets context: the customer's account, their recent transactions, the current billing policies. The agent searches its memory: Has this customer had similar issues? What happened last time? The agent has a tool to look up additional details about the transaction.

    Using that combination, the agent decides: "This looks like a duplicate charge from a failed retry. I can refund it directly. I'll also add a note to the memory that this customer has had two failed retries, so if it happens again, we know it's a pattern."

    The agent uses the refund tool. It updates the memory with the resolution. Done in seconds instead of five minutes of a human digging through systems.

    Common mistakes in building agents

    Agents without enough tools fail to be useful. They want to help but can't access the systems they need. The agent wants to update the billing system but doesn't have access, so it escalates a decision a human has to make instead.

    Agents without good memory repeat work or miss context. They don't know this is the third time the customer has asked the same question. They re-explain things the customer already knows.

    Agents with too much context get confused. You load every piece of information about the customer, and the agent gets overwhelmed. Signal-to-noise ratio matters. Load what's relevant.

    Building your agent's toolkit

    Start by mapping what the agent needs to do. What systems does it need to touch? That's your tool list. What does it need to remember about past interactions? That's your memory design. What does it need to know before making each decision? That's your context template.

    Then test. Does the agent have the tools to actually help? Does it remember what matters? Is there enough context but not too much?

    Many teams discover that their first agent design is missing tools or memory. You realize the agent wants to check something but doesn't have access. You learn what the agent should remember to avoid repetition. These discoveries lead to better designs.

    The agents that actually work in production are the ones that have been given the tools to act, the memory to learn, and the context to decide. If you're building an agent and thinking through what tools, memory, and context it needs, we can help you design a system that actually works. Reach out for a conversation about your specific use case.