File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ Morphik Code Exec Demo
2+
3+ This demo ingests Excel files into Morphik and runs an OpenAI Responses API agent
4+ that can retrieve chunks, list documents, pull page/chunk ranges, and load files
5+ into the code interpreter.
6+
7+ Prerequisites
8+ - Python 3.11+
9+ - uv installed
10+ - Morphik URI
11+ - OpenAI API key
12+
13+ Setup
14+ 1 ) Create a ` .env ` file with your credentials:
15+
16+ ``` bash
17+ MORPHIK_URI=" morphik://<owner_id>:<token>@<host>"
18+ OPENAI_API_KEY=" sk-..."
19+ # Optional: model override
20+ OPENAI_MODEL=" gpt-4.1"
21+ ```
22+
23+ 2 ) Install dependencies:
24+
25+ ``` bash
26+ uv sync
27+ ```
28+
29+ Run the demo (ingest -> status -> agent)
30+ 1 ) Ingest files from ` files/ ` :
31+
32+ ``` bash
33+ uv run ingest.py
34+ ```
35+
36+ 2 ) Check ingestion status:
37+
38+ ``` bash
39+ uv run status.py
40+ ```
41+
42+ 3 ) Run the agent:
43+
44+ ``` bash
45+ uv run agent.py
46+ ```
47+
48+ The agent will prompt for a query and write the final response to ` response.md ` .
You can’t perform that action at this time.
0 commit comments