Elkar Self-Hosting
You can use Elkar self-hosted version as a simple library with implemented task management and streaming in local memory. Support for other task stores as PostgreSQL or Redis will come soon.
Checkout our GitHub repository
Follow the steps below to get started with Elkar Open Source:
Step 1: Install Elkar SDK
Step 2: Create your Task Handler
The task handler manages a task’s status and artifacts, abstracting away the complexity of interacting with the Task Store. It supports three operations: set_status
, add_messages_to_history
, and upsert_artifact
.
The task handler currently has a strict signature: async def my_handler(task: TaskModifierBase, request_context: RequestContext) -> None.
While this signature is enforced for now, it may become more flexible in the future.
Step 3: Create your Agent Card
Your Agent Card is defined following the requirements from A2A Protocol.
Step 4: Create your A2A Server
Instantiate your A2A Server with In Memory Task Store.
To run this example (e.g., if saved as main.py and you expose server.app as app): uvicorn main:app —host 0.0.0.0 —port 5001