Skip to main content

Overview

While other frameworks have separate concepts for tools, state, and schemas, the Agentica SDK’s unique model unifies all of these into a single concept: scope. After all, it’s just code. Agents built with the Agentica SDK operate via REPL and Warp RPC, so they can directly access anything you pass to them. This includes:
  • Functions which replace the need for bespoke “tools”
  • Variables which replace the need for explicit “state” objects
  • Types which replace the need for special “schemas”
This means you may write normal code with normal objects, and agents can use them directly.

Types Replace Schemas

Instead of defining schemas in a special format, just pass your classes. The agent will instantiate them, and if your validation logic fails, the error is passed back to the agent to fix.

Functions Replace Tools

Instead of wrapping functions in special tool definitions or separating the concept of functions and tools, just pass your functions directly.

Variables Replace State

Because the Agentica SDK can warp objects by reference as well as by value, you can give agents access to stateful resources like functions, database connections, third party modules, instantiated API clients, even custom classes! You can either provide such resources to an agentic function by passing them through function arguments — so they can differ from call to call — or as global resources present at the time you define the agentic function itself.

Summary: Why Scope

Scope matches how programming works. In any programming language, functions have scope — they can access variables, call other functions, and use types. The Agentica SDK’s agentic functions and agents work the same way. If agentic functions are just functions, they naturally have scope and we match that expectation. Everything is data. Because the Agentica SDK treats everything — functions, variables, types, even SDK clients — as data, you can pass anything to anything. This includes:
  • Passing functions to agentic functions and vice versa; typed function composition and hand-offs.
  • Passing Agent objects to other agents (enabling dynamic multi-agent systems).
  • Passing SDK clients, database connections, or any object that is live in your codebase.
One concept instead of three. Other frameworks force you to learn separate APIs for tools, state, and schemas. The Agentica SDK just uses scope — the same concept you already know from programming. After all, it’s just code.

Next Steps

Functions vs Agents

Understand when to use each

Agentic Functions

Dive into agentic function usage

Agents

Learn about agent usage

Advanced

Learn how we unwrap MCP