Replies: 8 comments 12 replies
-
|
Hey I’m developing https://jxnl.github.io/instructor/ which looks pretty similar to type chat. It works now but I would love to work together with typechat. |
Beta Was this translation helpful? Give feedback.
-
|
Definitely interested in collaboration where possible! Right now we've found pretty good results with TypeScript at the very least as the schema language that gets sent over. Starting out with TypeScript gave us an easy opportunity to quickly validate against the types themselves; however, that doesn't mean that the same approach can't be used with other languages regardless of if TypeScript is leveraged as the "over-the-wire" schema. I think that long-term TypeChat for other languages might be in scope as well, and I'm curious to hear about what works well/could be better in other languages. |
Beta Was this translation helpful? Give feedback.
-
|
Conceivably, one can use https://github.com/YousefED/typescript-json-schema to convert their types to a JSON schema, offline.
Keep using the TypeScript as the over-the-wire format. Related: if you are starting with a JSON schema, convert to TypeScript with something like https://github.com/bcherny/json-schema-to-typescript |
Beta Was this translation helpful? Give feedback.
-
|
I try to combine Python and typechat tool together. When I do 'from typechat import TypeChat', but it shows that ImportError: cannot import name 'TypeChat' from 'typechat' . I do not know how to solve it. I hope can some suggestions. Thanks |
Beta Was this translation helpful? Give feedback.
-
|
There are two project related to the python version of typechat: |
Beta Was this translation helpful? Give feedback.
-
|
Just a question: how do people here feel about the idea of TypeChat for Python being all-async? |
Beta Was this translation helpful? Give feedback.
-
|
I am a computer novice. Why is my TypeChat not working in Python? PyCharm is indicating many import issues, such as the absence of Callable and Doc in typing_extensions, or that the init.py file of TypeChat is empty? |
Beta Was this translation helpful? Give feedback.
-
|
TypeChat's core insight — using TypeScript types as the schema for LLM responses — translates naturally to Python with Pydantic. The type system is the contract, and the LLM is guided to produce outputs that conform to it. For multi-agent systems specifically, typed schemas at agent boundaries are crucial. When Agent A sends a task to Agent B, the "capability manifest" that B accepts should be expressed as a type, not a prose description. TypeChat's approach of round-tripping through the type system to validate LLM outputs is exactly right for this. The Python equivalent pattern we've settled on in KinthAI: from pydantic import BaseModel
from instructor import patch
class AgentCapabilityManifest(BaseModel):
task_type: Literal["retrieval", "synthesis", "code_gen"]
input_schema: dict # JSON Schema for what this agent accepts
output_schema: dict # JSON Schema for what this agent produces
cost_estimate_millicents: int
latency_p95_ms: intThe LLM produces this, it gets validated against the Pydantic model, and if it fails, we retry with the error message (same repair loop as TypeChat). The type is machine-readable so the orchestrator can make routing decisions without parsing prose. The difference from TypeChat's original design: in a multi-agent context you also need the cost and latency fields in the manifest — they're part of the contract that lets an orchestrator decide whether to delegate to this agent. More on capability manifest design: https://blog.kinthai.ai/221-agents-multi-agent-coordination-lessons Is the Python port primarily for LLM response validation, or for agent-to-agent contract enforcement? |
Beta Was this translation helpful? Give feedback.

Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
TypeChat is really great. I wrote a similar app using GPT-3 a year ago for a real-estate company. It was extracting data from unstructured real-estate agents to json files. All pertinent infos that should be searched for by the LLM were declared as json types. Results would be then integrated to an SQL database and used to automatically update a corporate website. Client's management found the idea too far-fetched, too bad not everybody is a visionary computer scientist ;-)
I would definitelay appreciate to be able to use TypeChat with Python language.
Thanks again for this great LLM augmenting tool!
All the best!
Pierre-Emmanuel
Beta Was this translation helpful? Give feedback.
All reactions