Rajandran R Creator of OpenAlgo Sketchmaker, RagZ. Building GenAI Applications. Telecom Engineer turned Full-time Derivative Trader. Mostly Trading Nifty, Banknifty, High Liquid Stock Derivatives. Trading the Markets Since 2006 onwards. Using Market Profile and Orderflow for more than a decade. Designed and published 100+ open source trading systems on various trading tools. Now the recent curiosity on building Trading AI Agents.

How to Build AI Agents: Lessons from Anthropic

2 min read

AI agents are one of the most discussed topics in AI right now. Companies are racing to build autonomous systems that can handle complex tasks, but not everything labeled as an “agent” truly fits the definition. The team at Anthropic recently shared their insights on what makes an effective AI agent, distinguishing between workflows and true agentic behavior. Here is what they had to say and how you can apply these principles to building your own AI agents.

What is an AI Agent?

One of the most common misconceptions is that any system using an AI model qualifies as an agent. However, as Erik from Anthropic explains, there’s a distinction between workflows and agents:

  • Workflows: These involve a predefined set of AI calls and processes. For example, taking user input, processing it through a sequence of prompts, and returning a final output. The system follows a rigid, structured approach.
  • Agents: Unlike workflows, agents exhibit autonomy. They decide how many steps to take, what tools to use, and when to stop. A true agent continues to loop through actions until it finds a resolution.

A simple example of a workflow would be classifying a user query and routing it to a predefined response, much like the routing step in this Swarm stock market assistant. In contrast, an AI agent would engage in an open-ended process, refining answers, running additional checks, and iterating until it reaches the best possible outcome.

AI Bootcamp 2.0 for traders and investors

AI FOR TRADERS

AI Bootcamp 2.0 for traders and investors

Use ChatGPT, Claude and AI agents for research, coding and automation in your trading workflow.

  • Prompting and agent workflows for markets
  • Build tools without being a full-time coder
  • 6 courses in one bootcamp
See the bootcamp →by Marketcalls

How to Build AI Agents: Key Patterns

1. Providing the Right Level of Autonomy

AI agents need to operate autonomously but within controlled limits. They should be capable of executing multiple steps dynamically, yet developers must ensure the agent stays within useful bounds. For example, a customer support agent should iterate through problem-solving steps, but it shouldn’t loop indefinitely.

2. Well-Designed Tooling & Documentation

A surprising challenge many AI developers face is poor tool descriptions. According to Erik, many developers put great effort into prompt engineering but provide tools with unclear names and zero documentation. AI models, like humans, need clear and descriptive tool instructions to perform efficiently.

3. Empathizing with the Model’s Perspective

Barry shared an interesting anecdote about debugging AI behavior. He and a colleague would close their eyes for a minute, then briefly look at the screen before shutting their eyes again, mimicking how an AI might process information in bursts. This approach helped them understand why certain agent behaviors seemed counterintuitive. The lesson is to think like the AI when designing prompts and decision-making pathways.

What’s Overhyped and What’s Underhyped About AI Agents?

  • Overhyped: Consumer-facing agents (like vacation booking bots). The challenge is that defining exact user preferences is often as difficult as performing the task itself. Moreover, consumers don’t want fully autonomous actions like booking a flight without human approval.
  • Underhyped: Small, time-saving automations. Even shaving off a minute per task can have massive productivity impacts at scale. AI agents that assist in repetitive coding, document summarization, and iterative search are prime examples.

The Future of AI Agents in 2025

Anthropic’s team predicts that AI agents will see widespread business adoption in the near future. However, while single-agent systems are still being refined, multi-agent environments, where multiple AI agents collaborate, could be the next step. Barry even experimented with AI agents playing social deduction games like Werewolf to explore how they interact in complex scenarios.

Practical Tips for Developers

  1. Measure Results: Before scaling up an AI agent, ensure you have metrics in place to evaluate its effectiveness.
  2. Start Simple: Many successful startups optimize their workflow with a single LLM call before moving to complex agentic behavior.
  3. Build for Future Model Improvements: Your AI system should become more effective as models improve, rather than becoming obsolete.

Conclusion

AI agents are evolving rapidly, but their implementation must be practical and results-driven. Many companies rush to apply agents to problems where simple automation would suffice. Instead, focus on real-world use cases that benefit from iterative, autonomous decision-making. Design workflows carefully, document your tools clearly and measure results.

If you are building AI solutions, start experimenting with agentic frameworks now, keeping scalability, reliability and practical use in mind.

Python Elite membership

MEMBERSHIP

Python Elite membership

15 Python, AI and algo trading programs in one plan, including QuantFlow and AI Bootcamp live mentorship.

  • Python from fundamentals to trading apps
  • Backtesting, broker APIs and OpenAlgo
  • Live QuantFlow and AI Bootcamp sessions
View Python Elite →by Marketcalls

Learn by watching: free videos every week

Market Profile, order flow, Python, AI and OpenAlgo tutorials on YouTube.

Rajandran R Creator of OpenAlgo Sketchmaker, RagZ. Building GenAI Applications. Telecom Engineer turned Full-time Derivative Trader. Mostly Trading Nifty, Banknifty, High Liquid Stock Derivatives. Trading the Markets Since 2006 onwards. Using Market Profile and Orderflow for more than a decade. Designed and published 100+ open source trading systems on various trading tools. Now the recent curiosity on building Trading AI Agents.

Leave a Reply

Get Notifications, Alerts on Market Updates, Trading Tools, Automation & More