A part of Akka Agents, the Akka SDK introduces an Agent component for creating goal-directed agents that have their own memory and interoperate with other agents, tools, and semantic stores.
Today, Akka introduced the Akka Agentic Platform with new offerings: Akka Orchestration, Akka Agents, Akka Memory, and Akka Streaming. They are a comprehensive solution for building, operating, and evaluating autonomous, adaptive, and real-time agentic systems.
As part of Akka Agents, we released an Agent component that enables the creation of goal-directed agents that have their own memory.
@ComponentId("my-agent")
public class MyAgent extends Agent {
public Effect<String> query(String question) {
return effects()
.systemMessage("You are a helpful agent...")
.userMessage(question)
.thenReply();
}
}
We have numerous resources to get you started and productive immediately.
Install the Akka CLI and run any of the examples with akka code init
Docs |
Akka documentation |
Demo |
New Akka SDK Component: Agent |
Examples |
|
Get Started |
Clone and deploy a multi-agent system in minutes. |
Author your first agent |
Create your first agent in a few lines of code. |
Delegation with effects |
A simple, chainable structure for creating instructions that are delegated to the Akka runtime to enact a variety of behaviors. In Akka, the behavior of your agents is decoupled from their execution, enabling you to focus on defining the behavior of agents while Akka decides how the agent’s implementation will be executed. Delegation removes you from worrying about distributed systems, persistence, elasticity, or networking. With Akka’s hosted services, we use delegation to enable swapping out new, improved runtimes while your services are running without a recompilation or redeployment! Effects include:
|
Intrinsic memory |
Akka agents each include session memory. Session memory (usually called short-term memory) provides a durable history for agents to maintain context across multiple interactions. Memory can also be shared across multiple agents collaborating on the same goal.
Akka memory is kept in-memory, in-context and durably persisted automatically by the Akka runtime. The Akka runtime is tested against terabytes of data with an embedded data sharding and rebalancing within Akka clusters. Agents deployed into multiple regions have their memory automatically replicated (and persisted) between regions for failover and disaster recovery. Akka saves user messages, intermediate tool interactions, and AI responses automatically into session memory. Developers do not need to directly invoke or manage memory. Memory can be compressed or managed against a window for managing tokens and performance. You can also integrate third party memory stores using a MemoryProvider. |
Composable |
Akka agents are composable with other Akka components, which when combined enable the creation of multi-agent systems and other types of agentic systems including transactional, digital twin, edge, analytical, and autonomous. |
Model providers |
We have support for every major model type including those from Anthropic, Gemini, Hugging Face, OpenAI, LocalAI, and Ollama. You can add your own models with a custom ModelProvider. You can define a model in an agent from code or configuration.
|
Dynamic prompting |
Support for both system and user messages, defined within code, configuration, or 3rd party evaluations. You can define prompts within a template that are stored in Akka entities (durably persisted, event-driven, and customizable).
|
Inline evaluation |
Execute evaluations of input and output responses to an LLM within the execution context of each call. Create cost- or quality-interrupts that alter agentic workflow. |
Agent orchestration |
Drive agents from an Endpoint, Consumer (streaming ingest) or Workflow. Leverage Akka Orchestration to guide, control and manage multi-agent systems. |
Memory compaction |
Streaming events combined with a summarizer agent offer multiple techniques for memory compaction to reduce the size of the context that is provided to an LLM. |
Function tools |
Define tools that are required by an LLM and handled by an agent.
|
Agent exceptions |
Handle exceptions as part of an effect framework with AI-specific error conditions and handling methods.
|
Streaming agents |
Agents can stream the model response tokens to an endpoint. These tokens can then be pushed to a client using server-sent events (SSE). You can create endpoints that are streaming aware that know how to invoke streaming-aware agents.
|
MCP clients |
Agents can act as MCP clients with the tools available to the agent defined as part of its effects.
|
MCP endpoints |
You can now create MCP servers and host them as an endpoint service. MCP servers can be part of your agentic service or deployed separately. |
Structured responses |
Automatic mapping of structured LLM responses into Java data structures with type and error checking. For example, an LLM that is guided to respond in JSON can have that response mapped to a typed field.
|
Agent TestKit |
Integrated Testkit for executing agent unit and integration tests. You can assert facts (deterministic responses) and integrate evaluation functions (non-deterministic responses).
|
Akka Agents are composable and interoperable with Akka Orchestration, Akka Memory, and Akka Streaming.
Akka Memory |
In addition to Akka Agents having built-in session memory that is durable, you can use Akka Memory to create long-term memory that is shared by multiple agents, users, or sessions. Akka Memory is automatically replicated across regions when deployed across different regions. Additionally, you can create read-only Views of aggregated data across long-term and short-term memory. Think of Views as a pre-defined, read-only query against a cross-section of your memory. Views enable the separation of read/write compute, a critical design pattern when scaling memory into millions of Transactions per Second (TPS). |
Akka Orchestration |
Guide, moderate, and control multi-agent systems even across crashes, delays, or infrastructure failures with sequential, parallel, hierarchical, and human-in-the-loop workflows. Embed a registry for agent, tool, API, and resource governance. |
Akka Streaming |
High performance stream processing for ambient, adaptive, and real-time AI. Continuous processing, aggregation and augmentation of live data, metrics, audio and video. Streams ingest from any source and stream between agents, Akka services and the outside world. |
To support scalability and resilience the Akka runtime forms a cluster and distributes the component instances (including agents) over the nodes in the cluster. The cluster is automatically scaled horizontally by adding or removing nodes depending on the load. Built on the battle-tested, 15-year hardened Akka actor implementation, the runtime provides a proven and highly reliable foundation.
Entity and Workflow components optimize performance by keeping critical data in memory, eliminating the need for constant durable storage access. The runtime intelligently handles sharding and lifecycle management (including passivation), ensuring efficient resource utilization. Notably, Agent session memory leverages Entities and thereby has the same characteristics, including cross-region and cross-cloud replication.
The runtime uses an append-only event log for durable storage, recording all entity changes as events for robust state recovery. Crucially, this event log is also a source for query models, event processing consumers, inter-service communication, and replication.
In contrast, stateless Agent components can run concurrently on all cluster nodes, deriving their state from surrounding Entity and Workflow components. The runtime efficiently manages communication with AI models and tools, eliminating the need for asynchronous programming constructs in your application code.
The integrated component client simplifies development by enabling seamless, location-transparent communication between components (e.g., Workflows calling Entities or Agents) which can be running on different nodes across time and space, with the runtime handling all routing automatically. This component model offers flexibility, enabling the composition of highly advanced systems from focused, single-task components.
Akka agentic services execute on our award-winning actor-based runtime that clusters agents from within to create infinite scale and guaranteed resilience.
Akka agentic services can run on any infrastructure, any cloud, any location. You can deploy them with self-managed instances on bare metal, Kubernetes, Docker, VM, or edge environments. Or, optionally, add Akka Automated Operations to gain multi-region failover, auto-elasticity, persistence management, and multi-tenancy.