
Security News
New React Server Components Vulnerabilities: DoS and Source Code Exposure
New DoS and source code exposure bugs in React Server Components and Next.js: what’s affected and how to update safely.
ag-ui-protocol
Advanced tools
Python SDK for the Agent-User Interaction (AG-UI) Protocol.
ag-ui-protocol provides Python developers with strongly-typed data structures and event encoding for building AG-UI compatible agent servers. Built on Pydantic for robust validation and automatic camelCase serialization for seamless frontend integration.
pip install ag-ui-protocol
poetry add ag-ui-protocol
pipenv install ag-ui-protocol
from ag_ui.core import TextMessageContentEvent, EventType
from ag_ui.encoder import EventEncoder
# Create a streaming text event
event = TextMessageContentEvent(
type=EventType.TEXT_MESSAGE_CONTENT,
message_id="msg_123",
delta="Hello from Python!"
)
# Encode for HTTP streaming
encoder = EventEncoder()
sse_data = encoder.encode(event)
# Output: data: {"type":"TEXT_MESSAGE_CONTENT","messageId":"msg_123","delta":"Hello from Python!"}\n\n
from ag_ui.core import UserMessage, TextInputContent, BinaryInputContent
message = UserMessage(
id="user-123",
content=[
TextInputContent(text="Please describe this image"),
BinaryInputContent(mime_type="image/png", url="https://example.com/cat.png"),
],
)
payload = message.model_dump(by_alias=True)
# {"id": "user-123", "role": "user", "content": [...]}
ag_ui.core – Types, events, and data models for AG-UI protocolag_ui.encoder – Event encoding utilities for HTTP streamingdocs/conceptsdocs/sdk/pythonBug reports and pull requests are welcome! Please read our contributing guide first.
MIT © 2025 AG-UI Protocol Contributors
FAQs
Unknown package
We found that ag-ui-protocol demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
New DoS and source code exposure bugs in React Server Components and Next.js: what’s affected and how to update safely.

Security News
Socket CEO Feross Aboukhadijeh joins Software Engineering Daily to discuss modern software supply chain attacks and rising AI-driven security risks.

Security News
GitHub has revoked npm classic tokens for publishing; maintainers must migrate, but OpenJS warns OIDC trusted publishing still has risky gaps for critical projects.