Models¶
Pydantic models used across the REST, A2A, ACP, and MCP surfaces.
AgentCard¶
AgentCard
¶
Bases: BaseModel
A2A Agent Card for discovery at /.well-known/agent.json.
The Agent Card describes an agent's capabilities, skills, and how to interact with it. It's served at a well-known URL for discovery.
Example
AgentManifest¶
AgentManifest
¶
Bases: BaseModel
ACP Agent Manifest for discovery at /agents.
Describes essential properties of an agent including identity, capabilities, metadata, and runtime status.
Example
validate_dns_label
classmethod
¶
Validate name follows RFC 1123 DNS label format.
Source code in redis_agent_kit/models.py
Skill¶
Skill
¶
Bases: BaseModel
A capability/skill the agent can perform (A2A).
Skills describe what an agent can do and are advertised in the Agent Card.
Example
Message¶
Message
¶
Bases: BaseModel
A message in a conversation session.
TaskStatus¶
TaskStatus
¶
Bases: StrEnum
Status of a task in its lifecycle.
TaskState¶
TaskState
¶
Bases: BaseModel
State of a task (a single unit of agent work).
TaskUpdate¶
TaskUpdate
¶
Bases: BaseModel
A progress update emitted during task execution.
InputRequest¶
InputRequest
¶
Bases: BaseModel
A request for user input during task execution.
Uses standard JSON Schema for defining expected input structure. Clients can use this schema with form generators, validators, etc.
Example
request = InputRequest(
prompt="Which database should I configure?",
json_schema={
"type": "object",
"properties": {
"database": {
"type": "string",
"title": "Database",
"enum": ["PostgreSQL", "MySQL", "Redis"],
},
"port": {
"type": "integer",
"title": "Port",
"minimum": 1,
"maximum": 65535,
"default": 6379,
},
},
"required": ["database"],
},
)
Attachment¶
Attachment
¶
Bases: BaseModel
An attachment (image, audio, video, file) for multi-modal input.
Attachments can be stored inline (base64) for small files or referenced by URL/key for larger files stored externally (Redis, S3, filesystem).
Example
# Inline image (small, base64)
attachment = Attachment(
type=AttachmentType.IMAGE,
mime_type="image/png",
data="iVBORw0KGgo...", # base64 encoded
filename="screenshot.png",
)
# External reference (large file)
attachment = Attachment(
type=AttachmentType.AUDIO,
mime_type="audio/wav",
url="redis://attachments:task123:audio1", # or s3://, file://
filename="recording.wav",
size_bytes=1024000,
)