agentle.agents.a2a.tasks.managment.in_memory

A2A In-Memory Task Manager

This module provides an in-memory implementation of the TaskManager interface. The InMemoryTaskManager stores tasks in a simple in-memory dictionary, which makes it suitable for testing, development, and simple applications that don’t require persistent storage.

Functions

cast(typ, val)

Cast a value to a type.

get_or_create_eventloop()

run_coroutine_sync(coroutine)

Run a coroutine synchronously, creating an event loop if needed.

Classes

Agent(*[, uid, name, description, url, ...])

The main class of the Agentle framework that represents an intelligent agent.

AgentPipeline(*, agents[, debug_mode])

A sequential pipeline of AI agents where the output of one agent becomes the input to the next.

AgentTeam(*, agents[, ...])

A dynamic team of AI agents managed by an orchestrator agent.

Any(*args, **kwargs)

Special type indicating an unconstrained type.

AssistantMessage(*[, role])

Represents a message from an assistant in the system.

GenerationMessageToMessageAdapter()

Adapter for converting generation messages to A2A messages.

InMemoryTaskManager()

In-memory implementation of the TaskManager interface.

JSONRPCError(*, code, message[, data])

Represents error information in JSON-RPC responses.

JSONRPCResponse(*, id[, result, error])

Represents a response in the JSON-RPC format.

Message(*, role, parts[, metadata])

Represents a message exchanged between a user and an agent.

MessageToGenerationMessageAdapter()

Adapter for converting A2A messages to Generation messages.

MutableSequence()

All the operations on a read-write sequence.

Task(*[, id, history, artifacts, metadata])

Represents a unit of work in the A2A protocol.

TaskGetResult(*[, id, error])

Result of a task query in the A2A protocol.

TaskManager()

Abstract base class for task management in the A2A protocol.

TaskQueryParams(*, id[, historyLength, metadata])

Parameters for querying a task in the A2A protocol.

TaskSendParams(*[, id, sessionId, ...])

Parameters for sending a task to an agent in the A2A protocol.

TaskState(*values)

Enum representing the possible states of a task in the A2A protocol.

TypeVar

Type variable.

UserMessage(*[, role])

Represents a message from a user in the system.