PydanticAI Archives - gettectonic.com
Intelligent Adoption Framework

Exploring Open-Source Agentic AI Frameworks

Exploring Open-Source Agentic AI Frameworks: A Comparative Overview Most developers have heard of CrewAI and AutoGen, but fewer realize there are dozens of open-source agentic frameworks available—many released just in the past year. To understand how these frameworks work and how easy they are to use, several of the more popular options were briefly tested. This article explores what each one offers, comparing them to the more established CrewAI and AutoGen. The focus is on LangGraph, Agno, SmolAgents, Mastra, PydanticAI, and Atomic Agents, examining their features, design choices, and underlying philosophies. What Agentic AI Entails Agentic AI revolves around building systems that enable large language models (LLMs) to access accurate knowledge, process data, and take action. Essentially, it uses natural language to automate tasks and workflows. While natural language processing (NLP) for automation isn’t new, the key advancement is the level of autonomy now possible. LLMs can handle ambiguity, make dynamic decisions, and adapt to unstructured tasks—capabilities that were previously limited. However, just because LLMs understand language doesn’t mean they inherently grasp user intent or execute tasks reliably. This is where engineering comes into play—ensuring systems function predictably. For those new to the concept, deeper explanations of Agentic AI can be found here and here. The Role of Frameworks At their very core, agentic frameworks assist with prompt engineering and data routing to and from LLMs. They also provide abstractions that simplify development. Without a framework, developers would manually define system prompts, instructing the LLM to return structured responses (e.g., API calls to execute). The framework then parses these responses and routes them to the appropriate tools. Frameworks typically help in two ways: Additionally, they may assist with: However, some argue that full frameworks can be overkill. If an LLM misuses a tool or the system breaks, debugging becomes difficult due to abstraction layers. Switching models can also be problematic if prompts are tailored to a specific one. This is why some developers end up customizing framework components—such as create_react_agent in LangGraph—for finer control. Popular Frameworks The most well-known frameworks are CrewAI and AutoGen: LangGraph, while less mainstream, is a powerful choice for developers. It uses a graph-based approach, where nodes represent agents or workflows connected via edges. Unlike AutoGen, it emphasizes structured control over agent behavior, making it better suited for deterministic workflows. That said, some criticize LangGraph for overly complex abstractions and a steep learning curve. Emerging Frameworks Several newer frameworks are gaining traction: Common Features Most frameworks share core functionalities: Key Differences Frameworks vary in several areas: Abstraction vs. Control Frameworks differ in abstraction levels and developer control: They also vary in agent autonomy: Developer Experience Debugging challenges exist: Final Thoughts The best way to learn is to experiment. While this overview highlights key differences, factors like enterprise scalability and operational robustness require deeper evaluation. Some developers argue that agent frameworks introduce unnecessary complexity compared to raw SDK usage. However, for those building structured AI systems, these tools offer valuable scaffolding—if chosen wisely. Like Related Posts Who is Salesforce? Who is Salesforce? Here is their story in their own words. From our inception, we’ve proudly embraced the identity of Read more Salesforce Unites Einstein Analytics with Financial CRM Salesforce has unveiled a comprehensive analytics solution tailored for wealth managers, home office professionals, and retail bankers, merging its Financial Read more AI-Driven Propensity Scores AI plays a crucial role in propensity score estimation as it can discern underlying patterns between treatments and confounding variables Read more Tectonic’s Successful Salesforce Track Record Salesforce Technology Services Integrator – Tectonic has successfully delivered Salesforce in a variety of industries including Public Sector, Hospitality, Manufacturing, Read more

Read More
Learning AI

The Open-Source Agent Framework Landscape

The Open-Source Agent Framework Landscape: Beyond CrewAI & AutoGen The AI agent ecosystem has exploded with new frameworks—each offering unique approaches to building autonomous systems. While CrewAI and AutoGen dominate discussions, alternatives like LangGraph, Agno, SmolAgents, Mastra, PydanticAI, and Atomic Agents are gaining traction. Here’s a breakdown of how they compare, their design philosophies, and which might be right for your use case. What Do Agent Frameworks Actually Do? Agentic AI frameworks help structure LLM workflows by handling:✅ Prompt engineering (formatting inputs/outputs)✅ Tool routing (API calls, RAG, function execution)✅ State management (short-term memory)✅ Multi-agent orchestration (collaboration & hierarchies) At their core, they abstract away the manual work of: But too much abstraction can backfire—some developers end up rewriting parts of frameworks (like LangGraph’s create_react_agent) for finer control. The Frameworks Compared 1. The Big Players: CrewAI & AutoGen Framework Best For Key Differentiator CrewAI Quick prototyping High abstraction, hides low-level details AutoGen Research/testing Asynchronous, agent-driven collaboration CrewAI lets you spin up agents fast but can be opaque when debugging. AutoGen excels in freeform agent teamwork but may lack structure for production use. 2. The Rising Stars Framework Philosophy Strengths Weaknesses LangGraph Graph-based workflows Fine-grained control, scalable multi-agent Steep learning curve Agno (ex-Phi-Data) Developer experience Clean docs, plug-and-play Newer, fewer examples SmolAgents Minimalist Code-based routing, Hugging Face integration Limited scalability Mastra (JS) Frontend-friendly Built for web devs Less backend flexibility PydanticAI Type-safe control Predictable outputs, easy debugging Manual orchestration Atomic Agents Lego-like modularity Explicit control, no black boxes More coding required Key Differences in Approach 1. Abstraction Level 2. Agency vs. Control 3. Multi-Agent Support What’s Missing? Not all frameworks handle:🔹 Multimodality (images/audio)🔹 Long-term memory (beyond session state)🔹 Enterprise scalability (LangGraph leads here) Which One Should You Choose? Use Case Recommended Framework Quick prototyping CrewAI, Agno Research/experiments AutoGen, SmolAgents Production multi-agent LangGraph, PydanticAI Strict control & debugging Atomic Agents, PydanticAI Frontend integration Mastra For beginners: Start with Agno or CrewAI.For engineers: LangGraph or PydanticAI offer the most flexibility. Final Thoughts The “best” framework depends on your needs: While some argue these frameworks overcomplicate what SDKs already do, they’re invaluable for scaling agent systems. The space is evolving fast—expect more consolidation and innovation ahead. Try a few, see what clicks, and build something awesome!  l Like Related Posts Who is Salesforce? Who is Salesforce? Here is their story in their own words. From our inception, we’ve proudly embraced the identity of Read more Salesforce Unites Einstein Analytics with Financial CRM Salesforce has unveiled a comprehensive analytics solution tailored for wealth managers, home office professionals, and retail bankers, merging its Financial Read more AI-Driven Propensity Scores AI plays a crucial role in propensity score estimation as it can discern underlying patterns between treatments and confounding variables Read more Tectonic’s Successful Salesforce Track Record Salesforce Technology Services Integrator – Tectonic has successfully delivered Salesforce in a variety of industries including Public Sector, Hospitality, Manufacturing, Read more

Read More
pydanticai

Pydantic AI

The evaluation of agentic applications is most effective when integrated into the development process, rather than being an afterthought. For this to succeed, developers must be able to mock both internal and external dependencies of the agent being built. PydanticAI introduces a groundbreaking framework that supports dependency injection from the start, enabling developers to build agentic applications with an evaluation-driven approach. An architectural parallel can be drawn to the historic Krakow Cloth Hall, a structure refined over centuries through evaluation-driven enhancements. Similarly, PydanticAI allows developers to iteratively address challenges during development, ensuring optimal outcomes. Challenges in Developing GenAI Applications Developers of LLM-based applications face recurring challenges, which become significant during production deployment: To address non-determinism, developers must adopt evaluation-driven development, a method akin to test-driven development. This approach focuses on designing software with guardrails, real-time monitoring, and human oversight, accommodating systems that are only x% correct. The Promise of PydanticAI PydanticAI stands out as an agent framework that supports dependency injection, model-agnostic workflows, and evaluation-driven development. Its design is Pythonic and simplifies testing by allowing the injection of mock dependencies. For instance, in contrast to frameworks like Langchain, where dependency injection is cumbersome, PydanticAI streamlines this process, making the workflows more readable and efficient. Building an Evaluation-Driven Application with PydanticAI Example Use Case: Evaluating Mountain Data By employing tools like Wikipedia as a data source, the agent can fetch accurate mountain heights during production. For testing, developers can inject mocked responses, ensuring predictable outputs and faster development cycles. Advancing Agentic Applications with PydanticAI PydanticAI provides the building blocks for creating scalable, evaluation-driven GenAI applications. Its support for dependency injection, structured outputs, and model-agnostic workflows addresses core challenges, empowering developers to create robust and adaptive LLM-powered systems. This paradigm shift ensures that evaluation is seamlessly embedded into the development lifecycle, paving the way for more reliable and efficient agentic applications. Like Related Posts Who is Salesforce? Who is Salesforce? Here is their story in their own words. From our inception, we’ve proudly embraced the identity of Read more Salesforce Marketing Cloud Transactional Emails Salesforce Marketing Cloud Transactional Emails are immediate, automated, non-promotional messages crucial to business operations and customer satisfaction, such as order Read more Salesforce Unites Einstein Analytics with Financial CRM Salesforce has unveiled a comprehensive analytics solution tailored for wealth managers, home office professionals, and retail bankers, merging its Financial Read more AI-Driven Propensity Scores AI plays a crucial role in propensity score estimation as it can discern underlying patterns between treatments and confounding variables Read more

Read More

Empowering LLMs with a Robust Agent Framework

PydanticAI: Empowering LLMs with a Robust Agent Framework As the Generative AI landscape evolves at a historic pace, AI agents and multi-agent systems are expected to dominate 2025. Industry leaders like AWS, OpenAI, and Microsoft are racing to release frameworks, but among these, PydanticAI stands out for its unique integration of the powerful Pydantic library with large language models (LLMs). Why Pydantic Matters Pydantic, a Python library, simplifies data validation and parsing, making it indispensable for handling external inputs such as JSON, user data, or API responses. By automating data checks (e.g., type validation and format enforcement), Pydantic ensures data integrity while reducing errors and development effort. For instance, instead of manually validating fields like age or email, Pydantic allows you to define models that automatically enforce structure and constraints. Consider the following example: pythonCopy codefrom pydantic import BaseModel, EmailStr class User(BaseModel): name: str age: int email: EmailStr user_data = {“name”: “Alice”, “age”: 25, “email”: “alice@example.com”} user = User(**user_data) print(user.name) # Alice print(user.age) # 25 print(user.email) # alice@example.com If invalid data is provided (e.g., age as a string), Pydantic throws a detailed error, making debugging straightforward. What Makes PydanticAI Special Building on Pydantic’s strengths, PydanticAI brings structured, type-safe responses to LLM-based AI agents. Here are its standout features: Building an AI Agent with PydanticAI Below is an example of creating a PydanticAI-powered bank support agent. The agent interacts with customer data, evaluates risks, and provides structured advice. Installation bashCopy codepip install ‘pydantic-ai-slim[openai,vertexai,logfire]’ Example: Bank Support Agent pythonCopy codefrom dataclasses import dataclass from pydantic import BaseModel, Field from pydantic_ai import Agent, RunContext from bank_database import DatabaseConn @dataclass class SupportDependencies: customer_id: int db: DatabaseConn class SupportResult(BaseModel): support_advice: str = Field(description=”Advice for the customer”) block_card: bool = Field(description=”Whether to block the customer’s card”) risk: int = Field(description=”Risk level of the query”, ge=0, le=10) support_agent = Agent( ‘openai:gpt-4o’, deps_type=SupportDependencies, result_type=SupportResult, system_prompt=( “You are a support agent in our bank. Provide support to customers and assess risk levels.” ), ) @support_agent.system_prompt async def add_customer_name(ctx: RunContext[SupportDependencies]) -> str: customer_name = await ctx.deps.db.customer_name(id=ctx.deps.customer_id) return f”The customer’s name is {customer_name!r}” @support_agent.tool async def customer_balance(ctx: RunContext[SupportDependencies], include_pending: bool) -> float: return await ctx.deps.db.customer_balance( id=ctx.deps.customer_id, include_pending=include_pending ) async def main(): deps = SupportDependencies(customer_id=123, db=DatabaseConn()) result = await support_agent.run(‘What is my balance?’, deps=deps) print(result.data) result = await support_agent.run(‘I just lost my card!’, deps=deps) print(result.data) Key Concepts Why PydanticAI Matters PydanticAI simplifies the development of production-ready AI agents by bridging the gap between unstructured LLM outputs and structured, validated data. Its ability to handle complex workflows with type safety and its seamless integration with modern AI tools make it an essential framework for developers. As we move toward a future dominated by multi-agent AI systems, PydanticAI is poised to be a cornerstone in building reliable, scalable, and secure AI-driven applications. Like1 Related Posts Who is Salesforce? Who is Salesforce? Here is their story in their own words. From our inception, we’ve proudly embraced the identity of Read more Salesforce Unites Einstein Analytics with Financial CRM Salesforce has unveiled a comprehensive analytics solution tailored for wealth managers, home office professionals, and retail bankers, merging its Financial Read more AI-Driven Propensity Scores AI plays a crucial role in propensity score estimation as it can discern underlying patterns between treatments and confounding variables Read more Tectonic’s Successful Salesforce Track Record Salesforce Technology Services Integrator – Tectonic has successfully delivered Salesforce in a variety of industries including Public Sector, Hospitality, Manufacturing, Read more

Read More
gettectonic.com