Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions 2025-12-neurips/.python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.13
209 changes: 209 additions & 0 deletions 2025-12-neurips/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,209 @@





# Building an Open Agentic Future

## NeurIPS, 4 December 2025

Slides at <https://github.com/pydantic/talks>

Samuel Colvin




















## what

**Building an Open Agentic Future**

We're at a crossroads - there are two potential ways the future of software can look.

On the one hand, we have:
* A small number of vertically integrated everything platforms
* Who annoint software you have to use (OSS or not)

On the other hand, we have:
* Open standards and open protocols!
* Agent Frameworks that let you build AI applications where you can switch model
provider in seconds
* A choice of libraries where the best software wins

**The preferable choice for developers is obvious!**

















## 1: Pydantic Validation

```py {title="pydantic-validation.py"}
from datetime import date
from pydantic import BaseModel


class City(BaseModel):
name: str
founded: date
location: tuple[float, float]


city = City(name='London', founded='0050-01-01', location=['51.5074', b'0.1278'])
print(repr(city))
```















## 2: Pydantic AI

```py {title="pydantic-ai.py"}
from datetime import date
from typing import TypedDict
from pydantic_ai import Agent
from pydantic import BaseModel

class City(BaseModel):
name: str
founded: date
location: TypedDict('Location', {'lat': float, 'lng': float})

agent = Agent(
'openai:gpt-4.1',
output_type=City,
instructions='Extract information about the city',
)
result = agent.run_sync("London was founded in 50AD it's located at 51.5074, 0.1278")
print(repr(result.output))
```














## 3: Pydantic Logfire

```py {title="pydantic-logfire.py"}
from datetime import date
from typing import TypedDict
from pydantic_ai import Agent
from pydantic import BaseModel

import logfire

logfire.configure()
logfire.instrument_pydantic_ai()

class City(BaseModel):
name: str
founded: date
location: TypedDict('Location', {'lat': float, 'lng': float})

agent = Agent(
'openai:gpt-4.1',
output_type=City,
instructions='Extract information about the city',
)
result = agent.run_sync("London was founded in 50AD it's located at 51.5074, 0.1278")
logfire.info(f'{result.output=}')
```













## 4: Pydantic AI Gateway

```py {title="pydantic-ai-gateway.py"}
from datetime import date
from typing import TypedDict
from pydantic_ai import Agent
from pydantic import BaseModel

class City(BaseModel):
name: str
founded: date
location: TypedDict('Location', {'lat': float, 'lng': float})

agent = Agent(
# 'gateway/openai:gpt-4.1',
'gateway/anthropic:claude-sonnet-4-5',
output_type=City,
instructions='Extract information about the city',
)
result = agent.run_sync("London was founded in 50AD it's located at 51.5074, 0.1278")
print(repr(result.output))
```










## Thank you

Find us:
* <https://pydantic.dev>
* <https://github.com/pydantic>
* <https://x.com/pydantic>
6 changes: 6 additions & 0 deletions 2025-12-neurips/main.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
def main():
print("Hello from 2025-12-neurips!")


if __name__ == "__main__":
main()
9 changes: 9 additions & 0 deletions 2025-12-neurips/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[project]
name = "2025-12-neurips"
version = "0.1.0"
readme = "README.md"
requires-python = ">=3.13"
dependencies = [
"logfire>=4.16.0",
"pydantic-ai>=1.26.0",
]
Loading