Typed request models for the AgentCat public API.
This package holds the event publishing request and response models,
generated from the AgentCat OpenAPI specification. It is consumed by
agentcat/sdk, the supported
integration surface for MCP server authors, which sends the events.
Do not edit this repository by hand. Every release is regenerated from the
specification, which replaces all files except LICENSE.
composer require agentcat/apiRequires PHP 8.3 or later with the json extension. The package has no other
dependencies.
The models are immutable value objects. json_encode() produces the body that
POST https://api.agentcat.com/v1/public/events/ accepts:
<?php
require_once __DIR__ . '/vendor/autoload.php';
use AgentCat\Api\Model\PublishEventRequest;
$event = new PublishEventRequest(
projectId: 'proj_...',
id: 'evt_...',
eventType: 'mcp:tools/call',
timestamp: new DateTimeImmutable(),
resourceName: 'get_weather',
);
$body = json_encode($event, JSON_THROW_ON_ERROR);Call the constructors with named arguments: parameter order is not part of
the API and can change between releases. The server drops events without
id, event_type or timestamp, although the specification marks them
optional.
The encoding follows the API contract:
- Empty free-form objects (
parameters,response,error,identify_data,properties) andtagsencode as{}, never[]. This applies to the top-level value only: passstdClassfor empty objects nested inside it. timestampencodes in UTC with milliseconds, for example2026-10-16T12:00:00.123Z.session_idis always sent;nullasks the server to assign a session.- Other optional fields are omitted when unset.
event_typeis an open string.PublishEventRequest::EVENT_TYPE_KNOWN_VALUESlists the values in the specification.
The publish endpoint takes no API key: project_id identifies the project.
| Language | Generated client |
|---|---|
| TypeScript | agentcat-api |
| Python | agentcat-api |
| Go | agentcat-go-api |
| Ruby | agentcat-api |
| Java | com.agentcat:api |
| .NET | AgentCat.Api |
| Rust | agentcat-api |
MIT © AgentCat, Inc.