Morphik Code Exec Demo
This demo ingests Excel files into Morphik and runs an OpenAI Responses API agent that can retrieve chunks, list documents, pull page/chunk ranges, and load files into the code interpreter.
Prerequisites
- Python 3.11+
- uv installed
- Morphik URI
- OpenAI API key
Setup
- Create a
.envfile with your credentials:
MORPHIK_URI="morphik://<owner_id>:<token>@<host>"
OPENAI_API_KEY="sk-..."
# Optional: model override
OPENAI_MODEL="gpt-4.1"- Install dependencies:
uv syncRun the demo (ingest -> status -> agent)
- Ingest files from
files/:
uv run ingest.py- Check ingestion status:
uv run status.py- Run the agent:
uv run agent.pyThe agent will prompt for a query and write the final response to response.md.