mirror of
https://github.com/langchain-ai/docs.git
synced 2026-08-27 02:41:59 -04:00
16 lines
453 B
Plaintext
16 lines
453 B
Plaintext
```python
|
|
from langchain.agents import create_agent
|
|
from langchain_core.runnables import Runnable
|
|
from langgraph.store.postgres import PostgresStore # type: ignore[import-not-found]
|
|
|
|
DB_URI = "postgresql://postgres:postgres@localhost:5432/postgres?sslmode=disable"
|
|
|
|
with PostgresStore.from_conn_string(DB_URI) as store:
|
|
store.setup()
|
|
agent: Runnable = create_agent(
|
|
"claude-sonnet-4-6",
|
|
tools=[],
|
|
store=store,
|
|
)
|
|
```
|