Kimi K3 is here. Try it now
large languagePartner Model

Scaled Cognition LogoAPT-1 (Agentic Pretrained Transformer)

Action-prediction model for enterprise CX, delivering deterministic, hallucination-free agents that verify actions and enforce policy architecturally.

Model details

Example usage

APT-1 (Agentic Pretrained Transformer) is Scaled Cognition's flagship model, described as the only frontier model built exclusively for customer experience. Unlike conventional LLMs, it optimizes around action prediction rather than token or language prediction. It's trained on a fully synthetic data pipeline that pairs conversations with the actions that should follow from them — grounding that's largely missing from web-scraped text — and reinforced through agent-to-agent self-play.

The core design goal is reliability over raw capability: APT-1 enforces enterprise policies through architectural constraints rather than prompting, verifies action execution before confirming outcomes to customers.

Learn more about APT-1.

Input
1import os
2from openai import OpenAI
3
4client = OpenAI(
5    api_key=os.environ["MODEL_API_KEY"],
6    base_url=os.environ["MODEL_API_URL"],
7    timeout=120,
8)
9
10POLICIES = [
11    {
12        "id": "rebooking-policy",
13        "text": "Canceled flights may be rebooked at no charge within seven days.",
14    }
15]
16
17TOOLS = [
18    {
19        "type": "function",
20        "function": {
21            "name": "search_flights",
22            "description": "Find flights matching a route and date.",
23            "parameters": {
24                "type": "object",
25                "properties": {
26                    "origin": {
27                        "type": "string",
28                        "description": "Departure airport IATA code.",
29                    },
30                    "destination": {
31                        "type": "string",
32                        "description": "Arrival airport IATA code.",
33                    },
34                    "departure_date": {
35                        "type": "string",
36                        "description": "Date in YYYY-MM-DD form.",
37                    },
38                },
39                "required": [
40                    "origin",
41                    "destination",
42                    "departure_date",
43                ],
44            },
45        },
46    },
47    {
48        "type": "function",
49        "function": {
50            "name": "rebook_flight",
51            "description": "Move the traveler from their canceled flight onto a new one.",
52            "parameters": {
53                "type": "object",
54                "properties": {
55                    "booking_reference": {
56                        "type": "string",
57                        "description": "The traveler's existing booking reference.",
58                    },
59                    "flight_id": {
60                        "type": "string",
61                        "description": "Identifier of the replacement flight.",
62                    },
63                },
64                "required": [
65                    "booking_reference",
66                    "flight_id",
67                ],
68            },
69        },
70    },
71    {
72        "type": "function",
73        "function": {
74            "name": "escalate",
75            "description": "Hand the conversation to a human agent.",
76            "parameters": {
77                "type": "object",
78                "properties": {
79                    "reason": {
80                        "type": "string",
81                        "description": "Why the request needs a human.",
82                    },
83                },
84                "required": ["reason"],
85            },
86        },
87    },
88]
89
90
91def policy_prompt(policies):
92    rules = "\n".join(
93        f"- [{p['id']}] {p['text']}" for p in policies
94    )
95    return (
96        "You are an airline support assistant. Follow these policies exactly "
97        "and cite the policy id when you rely on one:\n"
98        + rules
99    )
100
101
102response = client.chat.completions.create(
103    model=os.getenv("MODEL_ID", "gpt-4o-mini"),
104    messages=[
105        {
106            "role": "system",
107            "content": policy_prompt(POLICIES),
108        },
109        {
110            "role": "user",
111            "content": "My flight was canceled. What rebooking options do I have?",
112        },
113    ],
114    tools=TOOLS,
115    tool_choice="auto",
116)
117
118message = response.choices[0].message
119print(message.content)
120for call in message.tool_calls or []:
121    print(call.function.name, call.function.arguments)
JSON output
1{
2    "id": "chatcmpl-xxxx",
3    "object": "chat.completion",
4    "created": 1753660800,
5    "model": "apt-1",
6    "choices": [
7        {
8            "index": 0,
9            "message": {
10                "role": "assistant",
11                "content": null,
12                "refusal": null,
13                "tool_calls": [
14                    {
15                        "id": "call_xxxx",
16                        "type": "function",
17                        "function": {
18                            "name": "escalate",
19                            "arguments": "{\"reason\":\"Traveler reports canceled flight but no booking reference is known.\"}"
20                        }
21                    }
22                ]
23            },
24            "logprobs": null,
25            "finish_reason": "tool_calls"
26        }
27    ],
28    "usage": {
29        "prompt_tokens": 268,
30        "completion_tokens": 34,
31        "total_tokens": 302,
32        "prompt_tokens_details": {
33            "cached_tokens": 0,
34            "audio_tokens": 0
35        },
36        "completion_tokens_details": {
37            "reasoning_tokens": 0,
38            "audio_tokens": 0
39        }
40    },
41    "service_tier": "default"
42}

🔥 Trending models