Behavior · State · Endpoints

Akka SDK

One programming model for agentic systems.
Scroll
The design intent

An SDK that models entire AI systems.

Akka’s components compose into agentic services that have their own APIs, orchestration, durability, and resilience so that an agent that fails mid-task resumes rather than restarts.

Otherwise you assemble
Agent framework
Orchestration engine
Message broker
Memory / vector store
Job scheduler
API framework
State database
Cache
Akka SDK
One programming model. Every component is a clustered microservice, so the infrastructure you would otherwise integrate is already built in.
clustering durable state streaming scheduling endpoints
The architecture
We’ve been building distributed
systems for 20 years.
Services built with Akka have embedded clustering to make your AI resilient from failures while scaling to millions of nodes.
in-memory actor-based concurrency & clustering
Hot processes that run in memory, replicate across the cluster, and survive any node.
Split-brain operations
Traffic steering
Scale-to-zero
4KB
actors
200M
actors / core
1M
node clusters
in-memory stateful, durable & sharded data
Durable in-memory state that's sharded across the cluster and replayable from its own event journal.
Agent memory
Autonomous swarm tasks
Durable execution workflows
4ms
reads
10ms
writes
PB
cache
in-memory real-time event-driven streaming with backpressure
Continuous, backpressured event flows across components, services, and regions, without an external broker.
CQRS views
Streaming consumers
Streaming integrations
Reliable gRPC replication
1 min
RTO
0b
RPO
The components

Assemble services from composable parts.

Akka Specify

Akka Specify builds any kind of AI system from requirements you already have. You describe the outcome, and Akka generates, governs, and runs the system for you.

Data scientists, product managers, citizen developers, and engineers can all take part, supplying their requirements as text, spreadsheets, graphics, or diagrams.

Your harness
Akka SpecifyAkka MCPAkka CLI
Claude, Codex, or Copilot drives Specify through Akka’s MCP and CLI.
$ claude
> /akka:setup
   Akka CLI · Java · Maven · governance floor
> /akka:specify greeter agent — greet each user
  in a new language every turn, per session
  Inferring definition of done… 17 conditions
  NEEDS_INPUT → 3 decisions to close
> /akka:specify keep 80%, p95 < 5 ms, API-only
  Definition of done locked. Building…
  plan → tasks → implement → verify
   compiles   6/6 tests   p95 4.1 ms
> /akka:status
  READY_TO_SHIP — completion policy met
Component client

The component client is how one component calls another. You get a type-safe handle to an entity, workflow, view, agent, or timer and invoke it directly.

Calls are location transparent, so the target can run on any node in the cluster and the runtime routes to it. You choose synchronous or asynchronous invocation, and the components it calls provide durability and recovery.

endpointcomponentCliententity · workflow · agent
public class CounterEndpoint {
  private final ComponentClient componentClient;
  public CounterEndpoint(ComponentClient componentClient) {
    this.componentClient = componentClient;
  }
  @Get("/{id}")
  public Integer get(String id) {
    return componentClient.forEventSourcedEntity(id)
      .method(CounterEntity::get).invoke();
  }
}
Agents

An agent interacts with an AI model to perform a specific task. It keeps contextual history in session memory, which can be shared with other agents working toward the same goal.

It can expose function tools and call them when the model asks for them.

agentAI model
session memoryfunction tools
@Component(id = "my-agent")
public class MyAgent extends Agent {
  public Effect<String> query(String question) {
    return effects()
      .systemMessage("You are a helpful assistant.")
      .userMessage(question)
      .thenReply();
  }
}
Autonomous agents

A model-driven component that runs as a durable process. It works on typed tasks, each with its own instructions and result schema, and the runtime drives the model through a decision loop until the task is done. Agent and task state persist as it goes, so work survives crashes and restarts.

An agent can delegate to specialists, hand off to peers, or lead a team sharing a task list, so multi-agent systems are assembled from focused agents without writing orchestration code.

taskmodeltooluntil done
survives restartdelegate · hand off
@Component(id = "consulting-coordinator",
  description = "Routes each problem to the right expertise")
public class ConsultingCoordinator extends AutonomousAgent {
  @Override
  public AgentDefinition definition() {
    return define()
      .tools(new ConsultingTools())
      .capability(TaskAcceptance.of(ENGAGEMENT)
        .canHandoffTo(SeniorConsultant.class))
      .capability(Delegation.to(Researcher.class)
        .maxParallelWorkers(2))
      .capability(Delegation.to(FactCheckAgent.class));
  }
}
Workflows

Workflows run long-running, multi-step business processes while you write only the domain logic. They provide durability and consistency, and can call other components and services.

A business transaction lives in one place, and the workflow either keeps it moving or rolls it back when a step fails.

serial · state transitions
startvalidatereserve
fork · parallel
chargenotifyship
join · aggregate
aggregate
complete
@Component(id = "transfer")
public class TransferWorkflow extends Workflow<TransferState> {
  public Effect<Done> startTransfer(Transfer transfer) {
    return effects().updateState(new TransferState(transfer))
      .transitionTo(TransferWorkflow::withdrawStep)
      .thenReply(done());
  }
}
Event sourced entities

Instead of storing the current state, these persist every event that led to it, written to a journal with ACID semantics.

State is rebuilt by replaying those events, which scales horizontally and isolates failures, and gives you a complete history of how the state came to be.

journale1e2e3replaystate
State is rebuilt by replaying its own events.
@Component(id = "shopping-cart")
public class ShoppingCartEntity
    extends EventSourcedEntity<Cart, Event> {
  public Effect<Done> addItem(LineItem item) {
    return effects()
      .persist(new Event.ItemAdded(item))
      .thenReply(state -> Done.getInstance());
  }
}
Key value entities

These persist state as a single current value, keyed by id.

Akka guarantees exactly one instance of each entity across the whole cluster, so commands are handled one at a time with no concurrency to reason about. Active state is held in memory and recovered from durable storage after a restart or rebalance.

order-42{ status: "paid", total: 4200 }
one command at a timein-memory, recovered on restart
@Component(id = "counter")
public class CounterEntity extends KeyValueEntity<Counter> {
  public Effect<Counter> plusOne() {
    Counter c = currentState().increment(1);
    return effects().updateState(c).thenReply(c);
  }
}
Views

Views let you read across many entities, or find an entity by something other than its id.

Each view is built for a specific access pattern and updates as the underlying entity state changes.

entityentityentityview
Read across many entities, or find one by something other than its id.
@Component(id = "customers-by-email")
public class CustomersByEmail extends View {
  @Consume.FromKeyValueEntity(CustomerEntity.class)
  public static class Updater extends TableUpdater<Customer> {}

  @Query("SELECT * FROM customers WHERE email = :email")
  public QueryEffect<Customer> getCustomer(String email) {
    return queryResult();
  }
}
HTTP endpoints

An endpoint is how a service is exposed to the outside world. HTTP endpoints accept and return JSON by default.

Lower-level APIs are available when you need full control over what data is accepted and returned.

POST /orders 200 OK { "id": "order-42" }
Accepts and returns JSON by default.
@HttpEndpoint("/example")
public class ExampleEndpoint extends AbstractHttpEndpoint {
  @Get("/hello/{name}")
  public String hello(String name) {
    return "Hello " + name;
  }
}
gRPC endpoints

gRPC endpoints expose a service through protobuf contracts defined in .proto files, so the service contract is explicit rather than implied.

Binary serialization and protobuf's forward and backward compatibility make service-to-service calls fast and safe to evolve without breaking existing clients.

order.protoprotobuf · binaryclient
An explicit contract that stays safe to evolve.
@GrpcEndpoint
public class CustomerGrpcEndpointImpl
    implements CustomerGrpcEndpoint {
  public Customer getCustomer(GetCustomerRequest in) {
    return Customer.newBuilder().setName("Alice").build();
  }
}
MCP endpoints

MCP endpoints expose a service to MCP clients, including LLM desktop applications and agents running on other services.

What you expose becomes tools the model can call on its own behalf.

your serviceexposes toolsMCP client / model
What you expose becomes tools the model can call on its own.
@McpEndpoint(serverName = "sample", serverVersion = "0.0.1")
public class ExampleMcpEndpoint {
  @McpTool(name = "add", description = "Adds two numbers")
  public String add(int n1, int n2) {
    return Integer.toString(n1 + n2);
  }
}
Timed actions

Timers schedule a call to run later, which is useful for checking whether something completed after the fact.

They are stored by the runtime and guaranteed to run at least once: if the call fails, the timer reschedules itself until it succeeds.

t + 24hfirescall
runs at least oncereschedules on failure
@Component(id = "order-timed-action")
public class OrderTimedAction extends TimedAction {
  public Effect expireOrder(String orderId) {
    // cancel the order if it is still pending
    return effects().done();
  }
}
Consumers

Consumers read a stream of events, from an entity's journal, from key value state changes, or from a message broker topic.

They also produce events outward, which is how an Akka service interacts with systems beyond it.

eventeventeventconsumerevent out
Reads a stream from a journal, state changes, or a broker topic.
@Component(id = "counter-events")
@Consume.FromEventSourcedEntity(CounterEntity.class)
public class CounterEventsConsumer extends Consumer {
  public Effect onEvent(CounterEvent event) {
    return switch (event) {
      case ValueIncreased v -> effects().done();
      default -> effects().ignore();
    };
  }
}
The guarantee

If it compiles, it's production-ready.

You write the domain logic. Resilience and scalability are built into the runtime, so the system that runs on your laptop is the system that runs in production.

mvn compile   mvn test   running on :8080
live · active-active HA · 3 replicas · scales to zero
What you write
  • Domain logic
  • Component behavior
  • Business rules
What the runtime guarantees
  • Clustering & sharding
  • In-memory durable state
  • Failover & replication
  • Active-active HA/DR
  • Elastic scale-to-zero
  • Durable execution
The Akka Agentic AI Platform

An integrated platform.

Akka’s offerings all run within the same runtime and cloud stack in order to produce a single evidence record and a consistent governance model.
Akka Agentic AI Platform
Deliver& Govern
Akka Specify
specs·generation·modernization
Akka Verify
evaluations·guardrails·policies·evidence
Models& Compute
Akka Optimize
SLMs·training·grading·routing
Akka SDK

Everything an agentic system needs.

Behavior, state, and endpoints in one model.
Get started →