doconda.tools() into a LangChain StructuredTool (its JSON Schema works as args_schema) and add
them to a ToolNode in your graph. The agent calls create_document, and its last message carries the links to the
Word, PowerPoint, Excel or PDF file.
Steps
- Put your Doconda API key (dashboard → API keys) in
DOCONDA_API_KEYand your model provider’s key (here,OPENAI_API_KEY). - Install the dependencies:
pip install langgraph "langchain[openai]" doconda. - Build the graph with the tools:
create_agent("openai:gpt-5", tools) from langchain.agents builds LangGraph’s
prebuilt agent and returns a compiled graph all the same, with checkpointer, streaming and interrupts.
What you get back
Thetools node adds a ToolMessage with the tool’s summary to the state:
- Links expire after 5 minutes. Keep the
idin the graph state if a later step has to edit the document (edit_document) or get fresh links (get_document). status:readyorfailed. Failed documents are not charged.
Which formats it creates
Without
format, Doconda works it out from the request.
FAQ
Can I use MCP instead of the Python SDK?
Can I use MCP instead of the Python SDK?
Yes. Load the tools with
langchain-mcp-adapters from https://api.eu.doconda.com/mcp, as in
How do I make a LangChain agent return an Excel file?.Can I add a human approval before the document is sent?
Can I add a human approval before the document is sent?
Yes. It’s a regular compiled graph: add an interrupt after the
tools node, show the reviewer the links from
get_document, and continue or ask for changes with edit_document.How much does it cost?
How much does it cost?
A document from a sentence costs €0.15 at
fast, €0.50 at standard and €1.50 at best. See
pricing.Related
- LangGraph: the full guide.
- Doconda in your agent: every tool
doconda.tools()returns.