Introducing the Agent File (.af): A Standard for Stateful AI Agents
- Ritesh Rout
- May 5
- 4 min read

The Agent File (.af) format was officially launched on April 2, 2025, by Letta, a company specializing in AI agent development. This open standard is designed to encapsulate all essential components of a stateful AI agent—such as memory, tool configurations, execution environment, and model parameters—into a single, portable file.
Key Features of the Agent File (.af):
Portability and Reproducibility: Facilitates seamless transfer of AI agents across different systems, ensuring consistent behavior and configuration.
Collaboration: Enables developers to share and collaborate on agent configurations effortlessly.
Preservation: Allows for the archiving of agent states, preserving their operational context and settings.
Versioning: Supports tracking of changes and iterations in agent development over time.
Letta has provided example .af files, including agents tailored for deep research, customer support, workflow automation, and MemGPT-based agents with advanced memory management. These examples serve as templates for developers to create and customize their own stateful AI agents.
The introduction of the Agent File format addresses critical challenges in the AI agent ecosystem, particularly the need for a standardized method to serialize and share stateful agents. This innovation is a significant step toward developing an operating system for AI agents, enabling systems that can learn and improve through experience.
For more detailed information and access to example .af files, you can visit Letta's official announcement on their website.
What is agent file ?
The AI ecosystem is witnessing rapid growth in agent development, with each framework implementing its own storage mechanisms. Agent File addresses the need for a standard that enables:
The .af file format encapsulates the entire brain of a stateful LLM agent, including:
Core memory blocks
Tool configurations
Memory management strategies
Model parameters
Message traces and state context
How It Works?
Developers create AI agents that rely on memory, external tools, and APIs.
These agents can be exported as a .af file, which encapsulates their:
Memory state (past interactions, learned knowledge)
Tools & API configurations (integrations with external systems)
LLM settings (model parameters, prompts)
The .af file can then be imported into another system, allowing agents to retain their state and functionality across different platforms or users.
Why It Matters?
Preservation – Store AI agents with their history and settings intact.
Portability – Move AI agents seamlessly across different platforms.
Collaboration – Share stateful AI agents with other developers or researchers.
Versioning – Keep track of changes in AI agent configurations over time.
The .af format is a major step towards the standardization of AI agent management, making it easier to develop, distribute, and scale LLM-powered systems.
How can I add Agent File support to my framework?
Adding .af support requires mapping Agent File components (agent state) to your framework's equivalent featureset. The main steps include parsing the schema, translating prompts/tools/memory, and implementing import/export functionality.
For implementation details or to contribute to Agent File, join our Discord community or check the Letta GitHub repository.
What state does .af include?
State Type | Description | Examples |
Memory State | Stores past interactions, long-term knowledge, and context retention. | - User conversation history - Stored facts & preferences - Context window for continuity |
Tool & API State | Saves agent-specific tools, APIs, and external integrations. | - API endpoints (e.g., search, database lookup) - Function calling (e.g., scheduling, automation) - Authentication settings (API keys, OAuth tokens) |
LLM Configuration State | Defines AI model settings, response behavior, and decision-making parameters. | - Model type (GPT-4, Llama, Claude) - System prompt (agent personality & instructions) - Hyperparameters (temperature, max tokens) |
Execution & Workflow State | Manages active workflows, automation steps, and task queues. | - Trigger words for specific actions - Task queues and pending operations - Fallback responses |
Versioning & Provenance | Tracks changes, updates, and authorship history of the .af file. | - Version history (v1.0, v1.1, etc.) - Last modified date - Original creator and contributors |
What Does an .af Agent Do?
An .af agent is an intelligent, LLM-powered system that can remember, reason, and act — just like a human assistant — across different sessions, platforms, or environments. Unlike stateless chatbots that forget everything after a single interaction, .af agents are stateful, meaning they can:
Retain memory of past conversations
Use tools and APIs to perform real-world tasks
Adapt to user needs by learning over time
Move between systems without losing their intelligence
By storing the agent’s memory, tools, LLM settings, and logic in a single portable .af file, developers can share, reuse, and evolve their agents effortlessly.
Whether it's automating workflows, providing customer support, or conducting research, .af agents make AI systems more persistent, flexible, and collaborative than ever before.
Libraries or packages the agent needs:
Library/Package | Purpose | Usage in Agent File |
LangChain | Framework for building LLM-powered apps | - Orchestrates tools, memory, and logic flow |
LlamaIndex | Document indexing & retrieval (RAG) | - Connects agents to external knowledge bases |
MemGPT | Memory manager for long-term and episodic memory | - Enables advanced memory tracing and recall |
OpenAI / Anthropic / Cohere SDKs | Access to LLMs like GPT-4, Claude, etc. | - Core LLM engine for reasoning and text generation |
FastAPI or Flask | Web server backends | - For deploying agents as APIs or services |
pydantic | Data validation and serialization | - Used for structured schema in .af files |
FAISS / Chroma | Vector databases for memory storage | - Enables semantic memory and search |
dotenv | Secure environment variable management | - Stores API keys and tool credentials |
PyYAML or json | File serialization libraries | - For reading/writing .af file formats |
🎉 Say hello to .af — the memory card for AI agents! 🧠📦
The .af (Agent File) isn’t just another tech buzzword — it’s a game-changer 🚀 in the AI universe. For the first time ever, we’ve got a plug-and-play format that wraps up an agent’s entire brainpower 🧠 — memory 🗂️, tools 🔧, prompts 📝, configs ⚙️ — into one tidy, shareable file. 🧳💾
🎮 Imagine saving your favorite video game hero — skills, gear, quests, the whole journey — and sending that exact version to a friend or loading it on another console months later. 🎁 That’s what .af does for AI agents. 💡
Now your agents can:🔁 Travel between clouds, servers, or teams with zero setup hassle🧑🤝🧑 Collaborate across projects and organizations🧠 Actually remember things — like a real assistant should⚡ Get smarter, faster — thanks to an open, extensible format
💡 It’s portable, persistent, and built for builders. Whether you’re fine-tuning workflows or inventing the next-gen AI butler 🤖, .af is your launchpad.
Welcome to the future of agent intelligence. Let’s build it together. 🌍🔗
Comments