There is no consensus definition of what an AI agent is. However, all definitions seem to build on each other. Minimally, an agent is just an LLM combined with the ability to take actions by using tools that iterates until it accomplishes its goal. For example,

context = []
 
while not objective_met:
    action, tool, objective_met = prompt_llm(
        user_prompt,
        system_prompt,
        context,
        tools
    )
    
    if not objective_met:
        observation = execute_tool(tool, action)
        context.append({"action": action, "observation": observation})
 
return context[-1]["observation"]  # Final answer

Tools are a list of predefined tools, descriptions, and optional example prompts that an LLM may choose to use. For example,

tools = [
    Tool(
        name="search_database",
        func=search_database,
        description="Search the customer database by name. Input: customer name string"
    ),
    Tool(
        name="send_email",
        func=lambda args: send_email(**json.loads(args)),
        description="Send email. Input: JSON with {to, subject, body}"
    )
]

Examples

URSA is an agentic workflow toolkit for science, created by LANL, that contains a bunch of examples of what agents do. Here’s an arxiv agent: https://github.com/lanl/ursa/blob/main/docs/arxiv_agent.md.